[Scons-users] Retrieving variables

Stefan Seefeld stefan at seefeld.name
Tue Jun 14 14:46:03 EDT 2016


Hi Bill,

thanks for the quick reply.

On 14.06.2016 14:32, Bill Deegan wrote:
> Stefan,
>
> For what you want to do, you're probably best initializing tools=[] in
> your Environment.
> Then setting TARGET_ARCH, then env.Tool(...) for each/all the tools
> you want to use.
> Or just have a Environment(tools=[],variables=vars) just for
> retrieving the value.

Can you elaborate a bit on what that would do ? Note that in my real
code I already use a 'tools' argument. What do you mean by "Then setting
TARGET_ARCH" specifically ? Setting this after the Environment is
constructed is what I was trying to figure out.

I find this recipe in the scons manual page:

env = Environment(...)
t = Tool('msvc')
t(env)  # adds 'msvc' to the TOOLS variable


which presumably would let me specify the TARGET_ARCH as a Tool()
argument, yes ? (This is another point I'd like to make: I find it very
hard to find a comprehensive documentation that lists all the available
arguments for those functions / methods, such as Tool().)

While this may work, it really looks like a kludge.

>
> Why not use --arch= instead of arch=?
>
> Also, why not use site_scons/ instead of bin.SCons ?

bin.SCons is my build directory, where I want all generated files to be
stored, including the scons caches.

Thanks,
        Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Scons-users mailing list