[Scons-users] Builder execution order?

William Deegan bill at baddogconsulting.com
Fri Jan 17 00:03:48 EST 2014


Delbert,

On Jan 16, 2014, at 4:21 PM, delbert dev <delbertum at gmail.com> wrote:


> In the root of my git repo I have a SConstruct file that calls some subscripts (SConscript):

>

> subscripts = [

> ['A/SConscript', 'testA'],

> ['B/SConscript', 'testB']

> ]

> for c in subscripts:

> odir = outputdir + '/' + c[1]

> SConscript(c[0],

> variant_dir = odir,

> duplicate = 0,

> exports = ['env', 'odir'])

>

>

> As a result I can simply call 'scons' from the root and all the above projects will be build. If I only want to build B I simply type 'scons testB' (I guess this here: http://www.scons.org/doc/production/HTML/scons-user/c3186.html#AEN3191 would be a better approach?)

>

> In project B I am using the two scripts defined here (which I have copied to site_scons/site_tools ):

> http://www.scons.org/wiki/DownloadUnpack

>

>

>

> env.Tool('URLDownload', '#site_scons/site_tools')

> env.Tool('Unpack', '#site_scons/site_tools')

>

> env.Replace(URLDOWNLOAD_USEURLFILENAME = False )

> ouutdir = Entry('outdir')

> a = env.Alias('abc', env.URLDownload(gtestOutputFile, gtestUrl))

> b = env.Alias('xyz', env.Unpack( ouutdir, gtestOutputFile ))

>

>

> but when I run 'scons abc' it appears that it runs xyz first (complain about the file not existing).

>

> If I remove b a is executed just fine. And if I re-enable b it extract the file downloaded in a. Why is b run before a?


Try running:
scons --tree=prune
That should give a visual picture of the dependencies that SCons expects.

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140116/0051d3c0/attachment.html


More information about the Scons-users mailing list