[Scons-users] SConscripts on the fly

Eric Lunderberg eric.lunderberg at gmail.com
Tue May 16 11:13:18 EDT 2017


As a potential alternative, if the SConscripts can be automatically
generated from a top-level SConstruct, why not instead generate the build
actions directly?  That way, the intermediate SConscript would not need to
be generated at all.  If some directories require customized behavior, then
those directories could be the only ones that contain a SConscript, and the
top-level SConstruct could preferentially use such a SConscript if it
exists.

On Tue, May 16, 2017 at 11:02 AM, William Blevins <wblevins001 at gmail.com>
wrote:

> I've never tried doing something like that but maybe making a custom
> builder that produces sconscript files would be appropriate.
>
> On May 16, 2017 10:23 AM, "Spencer Yost" <syost at triad.rr.com> wrote:
>
>> Thanks again for y'all's help a few weeks ago, we have SCons behaving
>> pretty much as we expect. Still tweaking and playing to put together a
>> final show and tell.
>>
>> Quick history:  As you may recall, we have hundreds of packages in a
>> reverse domain tree that encompasses 10,000+  files.  We have decided that
>> we would prefer creating the SConscript file in each package dynamically on
>> the fly. There are several reasons for this that I will not bore you with.
>>
>> I'm trying to figure out the best way to do this. A PreAction() clearly
>> won't work. I could use brute force and simply execute something out of the
>> top level SConstruct where we find them and call SConscript(), but that
>> seems like a hack.  It just "seems" like there should be a better way.
>>
>> What would you folks consider to be best practice for creating
>> SConscripts on the fly?
>>
>> Thanks in advance!
>>
>> Spencer Yost
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170516/9f0c1c00/attachment.html>


More information about the Scons-users mailing list