[Scons-users] Builder execution order?

Gary Oberbrunner garyo at oberbrunner.com
Sat Jan 18 18:24:21 EST 2014


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


More information about the Scons-users mailing list