[Scons-users] Doing a build time Glob()

Marc Branchaud marcnarc at xiplink.com
Thu Nov 28 17:23:59 EST 2013


On 13-11-28 02:49 PM, Dirk Bächle wrote:

> Hi,

>

> On 28.11.2013 17:05, Marc Branchaud wrote:

>> On 13-11-28 04:04 AM, Pico Geyer wrote:

>>> [...]

>>> This is one of my top frustrations when using SCons to run external

>>> (non-SCons) builds. AFAIK there is no built-in way to do what you ask.

>>>

>>> SCons desperately needs to know about every file it deals with: Either the

>>> file is an original source (that exists in the "clean" project) or SCons

>>> knows how to build the file.

>

> but isn't this true of every build system? If you tell "make" to install a

> file, you either have to add a rule that tells it how to create the source,

> or the file has to exist already. Otherwise you get a "don't know how to

> create xyz" error, and this is what I'd expect from a decent build tool.


SCons is more draconian about side-effects than other systems (like with the
deleting of unrecognized files).

Another aspect of this is that it's very difficult to work with SCons if your
build tools don't create files with predictable names (e.g. Google Web Toolkit).

There are clear benefits to having a static dependency tree, and to being
strict about things that aren't in that tree. But I feel that SCons is a
little too militant, and it would be easier to use SCons to control non-SCons
builds if there were some mechanism for updating the dependency tree after a
Builder has run.

I'd love to be able to say that a Builder's target is all the files that are
in (& below) a directory after the Builder runs, even though I don't know
what each of those files will be called.

With make, I can have target A install a bunch of header files, then have
target B compile something that uses those files, and B can depend on A, and
I don't have tell make any of the names of the header files. Sure this plays
fast-n-loose with the dependencies, and sometimes this can trip make up, but
sometimes fast-n-loose is exactly what you need.

M.



More information about the Scons-users mailing list