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

SCons help needed

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')
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.


Attachment: signature.asc
Description: PGP signature

Reply to: