- Add a missing newline to the end of the --debug=explain "unknown
reasons" message.
+ - Enhance ParseConfig() to work properly for spaces in between the -I,
+ -L and -l options and their arguments.
+
From Clive Levinson:
- Make ParseConfig() recognize and add -mno-cygwin to $LINKFLAGS and
elif arg[0] != '-':
dict['LIBS'].append(fs.File(arg))
elif arg[:2] == '-L':
- dict['LIBPATH'].append(arg[2:])
+ if arg[2:]:
+ dict['LIBPATH'].append(arg[2:])
+ else:
+ append_next_arg_to = 'LIBPATH'
elif arg[:2] == '-l':
- dict['LIBS'].append(arg[2:])
+ if arg[2:]:
+ dict['LIBS'].append(arg[2:])
+ else:
+ append_next_arg_to = 'LIBS'
elif arg[:2] == '-I':
- dict['CPPPATH'].append(arg[2:])
+ if arg[2:]:
+ dict['CPPPATH'].append(arg[2:])
+ else:
+ append_next_arg_to = 'CPPPATH'
elif arg[:4] == '-Wa,':
dict['ASFLAGS'].append(arg)
elif arg[:4] == '-Wl,':
save_command.append(command)
class fake_file:
def read(self):
- return "-I/usr/include/fum -Ibar -X\n" + \
- "-L/usr/fax -Lfoo -lxxx " + \
+ return "-I/usr/include/fum -I bar -X\n" + \
+ "-L/usr/fax -L foo -lxxx -l yyy " + \
"-Wa,-as -Wl,-link -Wp,-cpp abc " + \
"-pthread -framework Carbon " + \
"-mno-cygwin -mwindows"
assert env['CPPPATH'] == ['string', '/usr/include/fum', 'bar'], env['CPPPATH']
assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS']
assert env['LIBPATH'] == ['list', '/usr/fax', 'foo'], env['LIBPATH']
- assert env['LIBS'] == ['xxx', env.File('abc')], env['LIBS']
+ assert env['LIBS'] == ['xxx', 'yyy', env.File('abc')], env['LIBS']
assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', '-framework', 'Carbon', '-mno-cygwin', '-mwindows'], env['LINKFLAGS']
assert env['CCFLAGS'] == ['', '-X', '-pthread', '-mno-cygwin'], env['CCFLAGS']
finally: