[Scons-users] Use Sconscript call in Sconscript file

Pierre-Luc Boily pierreluc.boily at gmail.com
Thu Mar 7 17:20:25 EST 2019


Thx.  I thought that I tried that.. it looks like is it not the case.  It
works like a charm....

Le jeu. 7 mars 2019, à 15 h 27, Bill Deegan <bill at baddogconsulting.com> a
écrit :

>
>
> On Thu, Mar 7, 2019 at 2:17 PM Pierre-Luc Boily <pierreluc.boily at gmail.com>
> wrote:
>
>> Hello,
>>
>> Sorry if this has been already asked.  I searched this topic and I found
>> nothing relevant...
>>
>> So, our current scons architecture reads ALL SConscripts and they are all
>> read from SConsctruct.  This is good when you want to build the whole
>> product.  But our product is huge a the dependency tree monstrous.
>>
>> I'd like to speed up the build when we compile an alias\sub-component of
>> the
>> product by having smaller tree.
>>
>> So, what I am trying to do is to instead of invoking all Sconscript from
>> the
>> SConstruct, I try to move Sconscript call inside Sconscript file.  I
>> already
>> read Chapter 14. Hierarchical Builds, but I can this make to work.  I
>> think
>> that I misuse the variant dir or maybe our code architecture not suit well
>> for the hierarchy build.  See :
>>
>> *Sconstruct:*
>> SConscript('#/fwk/systemServices/stupd/core/stupd.sc',
>> exports='envService
>> vcxprojList', variant_dir='build/fwk/systemServices/stupd/', duplicate=0)
>>
>> *Sconscript stupd.sc:*
>> libraries = SConscript('fwk/simulation_fwk/core/logger_c/logger_c.sc',
>> exports='envService', variant_dir='build/fwk/systemServices/stupd/',
>> duplicate=0)
>>
>
> All these paths are relative and would be relative to the variantdir
> specified in the parent..
> so
> build/fwk/systemServices/stupd/fwk/simulation_fwk/core/logger_c/
> logger_c.sc
> And the variant dir would be:
> build/fwk/systemServices/stupd/build/fwk/systemServices/stupd/
>
> Likely you really want:
> libraries = SConscript('#fwk/simulation_fwk/core/logger_c/logger_c.sc',
> exports='envService', variant_dir='#build/fwk/systemServices/stupd/',
> duplicate=0)
>
> ?
>
>
>
>>
>> libraries += env.buildLibrary(env.libName(), env.Glob('*.c*',
>> exclude='*_test*'))
>> env.Append(LIBS = libraries + ['stdc++'])
>>
>>
>> env.buildProgram('stupd', ['stupd_main.c'])
>>
>> Default(env.installInLink('stupd'))
>>
>> *Output error:*
>> scons: warning: Ignoring missing SConscript
>> 'build/fwk/systemServices/stupd/build/fwk/simulation_fwk/core/logger_c/
>> logger_c.sc'
>>
>> *Question*
>> Is it possible to achieve what I want to do?  I understand that subsidary
>> Sconscript shall reside under SConscript file variant dir passed as
>> argument, but would it be possible to use absolute path? I tried with no
>> luck.
>>
>> As you can see, /fwk/simulation_fwk/core/logger_c/logger_c.sc/ is not
>> under
>> /fwk/systemServices/stupd/core/stupd.sc/, so it might be a problem.
>>
>> Thank you
>>
>>
>>
>>
>> --
>> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
>> _______________________________________________
>> 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/20190307/a8e7e9ef/attachment-0001.html>


More information about the Scons-users mailing list