diff options
| author | Steven Knight <knight@baldmt.com> | 2004-09-01 00:03:16 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-09-01 00:03:16 (GMT) |
| commit | a2ba55e47988f6d7e602f558e08feef219be934e (patch) | |
| tree | c1504d1d0c2dfd118c24c1920e28a037c932ed02 /src/engine/SCons/Environment.py | |
| parent | e966ff8d4b3581dc6194adfb70718445a0bbb41b (diff) | |
| download | SCons-a2ba55e47988f6d7e602f558e08feef219be934e.zip SCons-a2ba55e47988f6d7e602f558e08feef219be934e.tar.gz SCons-a2ba55e47988f6d7e602f558e08feef219be934e.tar.bz2 | |
Allow to contain File Nodes. Have ParseConfig add libraries to . Add support for -framework. (Gary Oberbrunner)
Diffstat (limited to 'src/engine/SCons/Environment.py')
| -rw-r--r-- | src/engine/SCons/Environment.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index aeae272..9e58ff6 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -739,7 +739,7 @@ class Base: """ # the default parse function - def parse_conf(env, output): + def parse_conf(env, output, fs=self.fs): dict = { 'ASFLAGS' : [], 'CCFLAGS' : [], @@ -749,12 +749,15 @@ class Base: 'LIBS' : [], 'LINKFLAGS' : [], } - static_libs = [] params = string.split(output) + append_next_arg_to='' # for multi-word args for arg in params: - if arg[0] != '-': - static_libs.append(arg) + if append_next_arg_to: + dict[append_next_arg_to].append(arg) + append_next_arg_to = '' + elif arg[0] != '-': + dict['LIBS'].append(fs.File(arg)) elif arg[:2] == '-L': dict['LIBPATH'].append(arg[2:]) elif arg[:2] == '-l': @@ -767,13 +770,15 @@ class Base: dict['LINKFLAGS'].append(arg) elif arg[:4] == '-Wp,': dict['CPPFLAGS'].append(arg) + elif arg == '-framework': + dict['LINKFLAGS'].append(arg) + append_next_arg_to='LINKFLAGS' elif arg == '-pthread': dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) else: dict['CCFLAGS'].append(arg) apply(env.Append, (), dict) - return static_libs if function is None: function = parse_conf |
