[Scons-users] env.Command with build explicit build
William Deegan
bill at baddogconsulting.com
Sun Aug 12 01:40:17 EDT 2012
Kraus,
On Aug 11, 2012, at 11:39 AM, Kraus Philipp <philipp.kraus at flashpixx.de> wrote:
> Hello,
>
> I'm using an env.Command call with a own function for running some externel command:
> My function shows
>
> def runfunc(target, source, env) :
> ### do something in preprocess ###
> if a :
> run command 1
> elif b :
> run command 2
> elif c :
> ### build shared library with scons env.SharedLibrary ####
> return []
>
> My problem is the case c. I need at this point a env.SharedLibrary call, so
> that a shared library is build after the function is run. I can create the env
> (which is not a clone of the parameter env, it must be its own structure)
> but in which way I can run the build process explicit?
> I need something link
>
> envlib = Environment()
> set parameter to envlib
> envlib.SharedLibrary(target="mylib", sources= [...])
> do envlib
>
> Do you have an idea to solve the problem?
I'm not really sure what it is you want to do from the description above.
Do you know a,b,and c at the time you SConscript is executed, or not until the build tree is being processed by SCons?
If not can you provide a more full example?
If you do, then you probably want a Pseudo-builder, see:
http://www.scons.org/doc/production/HTML/scons-user/c3938.html
No builders are run when the SConstruct/SConscript is processed. They are used to build the DAG for SCons to decide what needs to built, and then the actions they specify are executed.
Hope that helps.
-Bill
More information about the Scons-users
mailing list