Re: Use Sconscript call in Sconscript file
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CESD70k66uK6+xc-PeoabZY9RcO=a9MgwGUARP8OMw8_Q@mail.gmail.com> |
On Thu, Mar 7, 2019 at 2:17 PM Pierre-Luc Boily <[email protected]> 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 > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users