[Scons-users] Use Sconscript call in Sconscript file

Pierre-Luc Boily pierreluc.boily at gmail.com
Thu Mar 7 14:05:39 EST 2019


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/simulation_fwk/core/logger_c',
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


More information about the Scons-users mailing list