[Scons-users] Is a post-build function possible ?
    William Deegan 
    bill at baddogconsulting.com
       
    Thu Jun 28 01:24:25 EDT 2012
    
    
  
On 06/26/2012 11:26 AM, Evan Driscoll wrote:
> On 06/26/2012 01:31 PM, Kyle J Strand wrote:
>> 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?
>
> I think it is. But even that shouldn't be depended on: the --random 
> option will make it untrue (at least if the docs are correct and I'm 
> reading it right), and of course it could always change from version 
> to version.
A common mistake for people coming to SCons from other build tools is 
that they should/can specify the order that build steps are run in.
SCons is designed to allow you to specify the dependencies (and SCons 
will scan an figure out other dependencies), after which it builds a 
DAG, which it then traverses to find build steps to run.
So if you could hold the whole DAG in your head, you could predict the 
order that build steps would run in.
(Unless you set --random, and even then I'd bet the random is psuedo 
random and could be predicted.. ;)
<soapbox>
So let me reiterate... when using SCons.. don't think build order, just 
think dependencies. It's a bit of a paradigm shift from the way people 
usually use Make (which should also be used only to specify 
dependencies.. but allows you to also specify order).
</soapbox>
-Bill
-Bill
    
    
More information about the Scons-users
mailing list