[Scons-users] Is a post-build function possible ?
Kyle J Strand
Kyle.Strand at beckman.com
Tue Jun 26 14:31:28 EDT 2012
Yes, doing a clean SCons build with -j1 multiple times generates identical
output, but I thought the original point about the build actions being
"random" was just that they don't necessarily happen in the order listed
in the SConstruct and SConsign files (yes, "random" is the wrong word
since it's deterministic, but it may not be predictable, either). Is this
correct?
-----------------------------------------------------------------------
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036
scons-users-bounces at scons.org wrote on 06/26/2012 11:35:00 AM:
> William Deegan <bill at baddogconsulting.com>
> Sent by: scons-users-bounces at scons.org
>
> 06/26/2012 11:35 AM
>
> Please respond to
> SCons users mailing list <scons-users at scons.org>
>
> To
>
> SCons users mailing list <scons-users at scons.org>
>
> cc
>
> Subject
>
> Re: [Scons-users] Is a post-build function possible ?
>
> Ray,
>
> On Jun 26, 2012, at 4:00 AM, Ray Pasco wrote:
>
> On 2012-06-25 10:30 PM, William Deegan wrote:
> Ray,
> On Jun 25, 2012, at 6:24 PM, Ray Pasco wrote:
>
> I understand that execution order is random for Program(), Action(),
> etc., because [sic]. 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
>
>
> Thanks, AddPostAction looks like what I need.
>
> I'm just trying to "black box" just the high-level basics of SCons.
> I should have been more specific: If I create a single environment
> and then call Environment.Program() twice for two independent
> targets, wouldn't the actual execution of the Program calls be
> random despite what order they appear in the SConstruct file ?
>
> Nope. Shouldn't be random.
> The algorithm is deterministic as far as I know.
> If you run -j anything, it may seem random, but that's likely due to
> variations in the runtime of the many jobs run.
> If you run SCons 10 times without -j, for a clean build, you should
> (as far as i know) see it do the same compiles in the same order.
>
> -Bill_______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
The server made the following annotations
---------------------------------------------------------------------------------
This message contains information that may be privileged or confidential and is the property of Beckman Coulter, Inc. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20120626/7579b6d3/attachment-0001.htm>
More information about the Scons-users
mailing list