[Scons-users] Build Default target when passing a target

Pierre-Luc Boily pierreluc.boily at gmail.com
Mon Nov 11 22:00:14 EST 2019


Hello,

I have the following sconscript : 

progName = 'SpeechGenerator'
prg           = env.buildProgram('SpeechGenerator.exe',
['SpeechGeneratorApp.cpp', 'SpeechGenerator.rc'])
installTgts  = env.install_speech_generator(prg)
Default(env.Alias(progName, installTgts))

I implemented a mechanism where if you do
>scons SpeechGenerator

Only the needed sconscript will be load and executed.  All artefacts in
variant dir are built and artefacts are also installed outside the variant
dir (with install_speech_generator).  This works because SpeechGenerator
alias.

There is something that I'd like to do but it doesn't work.  If I do :
>scons path/to/speechGenerator

I also have a mechanism where it loads only one sconscript, but then, only
artefacts in variant dir are generated.  I know it is normal, because the
target path/to/speechGenerator doesn't refer to the install directory that
is outside of variant dir

But I am just wondering if it is something possible to force the execution
of a Default target that is outside of the command line target

My goal is I would like to give multiple alternative to the developers.  I
know some of them would prefer to do
>scons path/to/speechGenerator
or 
path/to/speechGenerator>scons -u .
and other will do
>scons speechGenerator

Would be great of those 3 alternatives generate artefacts in the install
directory that is outside of the variant dir

thx

thx



--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html


More information about the Scons-users mailing list