[Scons-users] passing variables on the command-line

Stefan Seefeld stefan at seefeld.name
Tue Jun 21 08:17:02 EDT 2016


So, what's the verdict ? Bug or Feature ?

        Stefan


On 18.06.2016 06:21, Stefan Seefeld wrote:
> On 17.06.2016 17:59, Bill Deegan wrote:
>> Can you create a minimum working example of the config check + string
>> CFLAGS for me to take a look at?
>> That'll help me recommend whether to file a bug or not.
> Sure. Here is a minimal SConstruct file:
>
>   vars = Variables('config.py', ARGUMENTS)
>   vars.Add('CCFLAGS')
>   env = Environment(variables=vars)
>   env.Append(CCFLAGS = '-Wall')
>   vars.Save('config.py', env)
>   print(env['CCFLAGS'])
>
>
> Run this with `scons CCFLAGS=-Wall`, and observe the output (and the
> value of CCFLAGS in the saved config.py) to be an invalid '-Wall-Wall'.
>
>  workaround is to replace the second line by
>
>     vars.Add('CCFLAGS', converter=lambda v:v.split())
>
>
>     Stefan
>


-- 

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



More information about the Scons-users mailing list