[Scons-users] Builder execution order?

delbert dev delbertum at gmail.com
Sun Jan 19 15:56:23 EST 2014


Yes setting UNPACKLIST does this trick, I missed that from the
documentation, thanks! But its pretty tedious to write out the whole list
of expected files. I have skipped the Unpack builder because of this and
now I simply do:

pkg = env.URLDownload(gtestOutputFile, gtestUrl)
outdir = "xxc"
if platform.system().lower() == 'windows':
"print call 7zip"
else:
unzipit = Command('unzip stuff', [], 'unzip ' + gtestOutputFile + ' -d
' + outdir)

Not perfect but it does the job.



On Sun, Jan 19, 2014 at 12:24 AM, Gary Oberbrunner <garyo at oberbrunner.com>wrote:


> On Sat, Jan 18, 2014 at 2:53 PM, delbert dev <delbertum at gmail.com> wrote:

> > URLDOWNLOAD_USEURLFILENAME=False makes it possible to override that it

> > should NOT use the filename from the url.

>

> I looked at the source and I'm not sure that's correct. If you care

> to, you might want to insert a few print statements to see what it's

> doing.

>

> >

> > I tried this:

> >

> > pkg = env.URLDownload(gtestOutputFile, gtestUrl)

> > dir = env.Unpack( ouutdir, gtestOutputFile )

> > Depends(dir, pkg)

> > a = env.Alias('abc', pkg)

> > b = env.Alias('xyz', dir)

> >

> > scons: *** source file [gtest-1.7.0.zip] must be exist Stop.

>

> Just inspecting the source code to that contributed builder (which

> contains that message), it looks like the Unpack builder requires its

> source to already exist -- which seems like a bug to me. I notice in

> the discussion and in the example on that page, he uses a special

> "hack" variable UNPACKLIST; maybe that's the only way it works.

>

> > and it gives the same result.

> >

> > It appears to me that scons is not designed to design/implement a

> buildflow

> > (like ant, maven, gradle etc.) but are specialized to simply

> > compiling/building a single cross platform cpp/c binary.

>

> No, that's not correct. SCons builds a complete dependency graph

> (what "target" files/dirs depend on what other files/dirs) and then

> builds any of those graph nodes (files/dirs) which aren't up to date,

> in dependency order. However this pair of builders is a little unusual

> because the original source is a custom type of node, and the target

> of Unpack is a previously-unknown list of files. That's probably why

> the author has UNPACKLIST in there.

>

> I suspect either the contributed builder you're using is wrong, or

> you're using it in a way he didn't expect.

>

> > Maybe its time to give this a try:

> >

> http://www.gradleware.com/news/blog/creating-world-class-cc-build-system-gradle

> >

> http://www.gradle.org/docs/current/userguide/userguide_single.html#native_binaries:languages

> >

> http://www.gradle.org/docs/current/userguide/userguide_single.html#nativeBinaries

>

> Indeed, you're welcome to try those -- if they work better for you it

> may be your simplest route.

>

> --

> Gary

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140119/487cbd63/attachment.htm


More information about the Scons-users mailing list