[Scons-users] Emiter usage
Adam Dobrowolski
pholat at gmail.com
Mon Sep 19 12:46:31 EDT 2016
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)
Best regards,
Adam
On poniedziałek, 19 września 2016 18:12:25 CEST Dirk Bächle wrote:
> Hi Adam,
>
> On 19.09.2016 17:58, Adam Dobrowolski wrote:
> > I did. In example value and variant_dir are independent. I wanted to have
> > them dependent. But I can store a new value in this second Environment
> > and that would be fine I guess.
> >
> > What I wanted to omit was copying ~10 SConscript calls just to fill in two
> > variables - I thought that there might be a cleaner way of doing it.
> > If there were another ifdef - for example for architecture (ARM/x86) this
> > would mean the same copy again, wouldn't it?
> >
> > One last question: will it work fine if I loop over all the components
> > SConscripts and Glob over it's products catalog? Than instead of copying I
> > can have a list of SConscripts, all I call with both setups (or more if
> > needed) in for each loop.
>
> sorry but I can't follow you anymore here. I'd need a concrete example, I
> guess...but maybe someone else can chime in.
>
> Regards,
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list