[Scons-users] Is a post-build function possible ?

William Deegan bill at baddogconsulting.com
Mon Jun 25 22:30:28 EDT 2012


Ray,
On Jun 25, 2012, at 6:24 PM, Ray Pasco wrote:


> I understand that execution order is random for Program(), Action(), etc., because the tasks are within a dictionary which is inherently unordered. But, is there a way to execute a post-build command or function which is defined within file SContruct ? (This would be similar to the wxPython method CallAfter(). )


Order is not random. A DAG (directed acyclic graph) is constructed based on the dependencies, both explicit and implicit.

You can use the python atexit to have something done at the end of the SCons run.
http://docs.python.org/library/atexit.html

Or you can use AddPostAction() to be run after a target is built.
(see: http://scons.org/doc/production/HTML/scons-man.html and search for AddPostAction() )

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20120625/25cee341/attachment.html>


More information about the Scons-users mailing list