[Scons-users] Emiter usage

Dirk Bächle tshortik at gmx.de
Mon Sep 19 13:31:56 EDT 2016


Adam,

On 19.09.2016 18:46, Adam Dobrowolski wrote:
> Hi Dirk,
>
> Great thanks up to now, I meant something like that:
>
> #!/bin/python
>
> x86_env = Environment(<something for x86);
> x86_deb = env.Clone();
> x86_deb.Append(CXXFLAGS=['-g3','-O2'])
> arm_env = Environment(<something for arm>);
> arm_deb = env.Clone();
> arm_deb.Append(CXXFLAGS=['-g3','-O2'])
>
> libs = [
>          "lib1/SConscript",
>          "lib2/SConscript",
>          "lib3/SConscript",
>          (...)
>          "libN/SConscript",
>          ]
>
> for script in libs:
>      SConscript(script, exports={'env' : x86_env}, variant_dir='x86_release')
>      SConscript(script, exports={'env' : x86_deb}, variant_dir='x86_debug')
>      SConscript(script, exports={'env' : arm_env}, variant_dir='arm_release')
>      SConscript(script, exports={'env' : arm_deb}, variant_dir='arm_debug')
>
> # These SConscripts use products of earlier SConscripts in for loop
> # For 10 SCOnscripts it would be 40 products in total
> # These are sourced with Glob("*")
> X86_REL = SConscript("x86_release/SConcsript")
> X86_DEB = SConscript("x86_debug/SConcsript")
> ARM_REL = SConscript("arm_release/SConcsript")
> ARM_DEB = SConscript("arm_debug/SConcsript")
>
> Alias('X86_REL',X86_REL)
> Alias('X86_DEB',X86_DEB)
> Alias('ARM_REL',ARM_REL)
> Alias('ARM_DEB',ARM_DEB)
>

what I get from this is that you want to be able to call "scons X86_REL", such that only the corresponding subtree is built. If this 
is correct, doesn't it contradict the specifications made in your first mail:


 > What I need to do is:
 > Generate different output on different compilation variable.
 >
 > Exemplary problem: one app version is build with -DDEBUG variable, and second one is without. Now I can build DEBUG app (or one
 > without) by changing the Environment by hand. But I would love to build both in one run.


, especially for the last sentence?

Regards,

Dirk




More information about the Scons-users mailing list