[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SCons help needed

Le 17/01/2016 08:50, Andrey Rahmatullin a écrit :
> My package, xboxdrv, fails to build when the CPPFLAGS envvar has more than
> one flag. That's because the code doesn't consider those flags separate.
> The SCons docs [0] say "the default value for $CCFLAGS is an internal
> SCons object which automatically converts the options we specified as a
> string into a list" but this feature is apparently not used in the code.
> Here is the (slightly simplified) code:
> env = Environment(ENV=os.environ, BUILDERS = {
>     'DBusGlue' : Builder(action = build_dbus_glue),
>     'Bin2H'    : Builder(action = build_bin2h)
>     })
> opts = Variables(['custom.py'], ARGUMENTS)
> opts.Add('CPPFLAGS', 'Additional preprocessor flags')
> opts.Update(env)
> env.MergeFlags({'CPPFLAGS': ['-g', '-O3', '-Wall', '-ansi', '-pedantic']})
> After this the env['CPPFLAGS'] list contains '-Wdate-time -D_FORTIFY_SOURCE=2'
> as the first item, while ideally those should be two items.

I encountered a similar problem with Pingus, and fixed it with CLVar [1].

Hope this helps,


Reply to: