[Scons-users] SConscripts on the fly

Spencer Yost syost at triad.rr.com
Tue May 16 18:27:39 EDT 2017


Thanks folks,

Part of the reason is because our current build system uses a file in each package that specifies specific linkage instructions (i.e. libraries), final deliverable ownership and permissions,  installation directories, etc.  It also specifies different types of build behavior(compile, simple copy, authomated unit test, etc).

With a simple pearl program using the config:: STD package to read the old file, I can generate an SConscript on the fly very easily that will mimic final deliverables of the old system.   Since it's so easy I figured just going that route would be the best way to showcase SCons.  I also like how we can use this mechanism to ease the transition from old system to new system.

I may have mentioned it, I'm not sure. What I am trying to do is to convince a very large development department that the way we build stuff is antiquated, complicated and difficult to port and we need to move to SCons. So right now I do have to try to stay on the easiest, quickest path to an impressive show and tell without cutting too many corners insofar as best practices because I also don't want SCons looking like a bunch of python hacks embedded in package directories



Spencer Yost

> On May 16, 2017, at 12:16 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
> 
> +1 on Eric's sugguestion.
> Unless you're planning on using variant_dir in your SConscript calls to build multiple variants.
> 
> -Bill
> 
>> On Tue, May 16, 2017 at 8:13 AM, Eric Lunderberg <eric.lunderberg at gmail.com> wrote:
>> 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
>>> 
>> 
>> 
>> _______________________________________________
>> 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/23a22359/attachment-0001.html>


More information about the Scons-users mailing list