diff options
| author | Steven Knight <knight@baldmt.com> | 2003-10-18 19:22:25 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2003-10-18 19:22:25 (GMT) |
| commit | e48bef4f0520f04d71dfa2654621f3aa8a4fabe9 (patch) | |
| tree | eb654ea23be6a82f3a29d8b451e652d9cd2e883b /src/engine/SCons/Environment.py | |
| parent | 528ebad33f8ecbe8401ef779ce64648a7de0851a (diff) | |
| download | SCons-e48bef4f0520f04d71dfa2654621f3aa8a4fabe9.zip SCons-e48bef4f0520f04d71dfa2654621f3aa8a4fabe9.tar.gz SCons-e48bef4f0520f04d71dfa2654621f3aa8a4fabe9.tar.bz2 | |
Allow SConsignFile() to take a dbm module argument; portability fixes. (Ralf W. Grosse-Kunstleve) Make ParseConfig() and env.Append() work regardless of initial construction variable values. Make new Dir() support work with empty directories and timestamps. Make the new Queue-based Job implementation portable to Python 1.5.2.
Diffstat (limited to 'src/engine/SCons/Environment.py')
| -rw-r--r-- | src/engine/SCons/Environment.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index f8ff6c3..e320f05 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -427,10 +427,14 @@ class Base: self._dict[key] = kw[key] elif SCons.Util.is_List(self._dict[key]) and not \ SCons.Util.is_List(kw[key]): - self._dict[key] = self._dict[key] + [ kw[key] ] + if not kw[key] is None and kw[key] != '': + self._dict[key] = self._dict[key] + [ kw[key] ] elif SCons.Util.is_List(kw[key]) and not \ SCons.Util.is_List(self._dict[key]): - self._dict[key] = [ self._dict[key] ] + kw[key] + if self._dict[key] is None or self._dict[key] == '': + self._dict[key] = kw[key] + else: + self._dict[key] = [ self._dict[key] ] + kw[key] elif SCons.Util.is_Dict(self._dict[key]) and \ SCons.Util.is_Dict(kw[key]): self._dict[key].update(kw[key]) @@ -549,34 +553,30 @@ class Base: # the default parse function def parse_conf(env, output): - env_dict = env.Dictionary() + dict = { + 'CPPPATH' : [], + 'LIBPATH' : [], + 'LIBS' : [], + 'CCFLAGS' : [], + } static_libs = [] - # setup all the dictionary options - if not env_dict.has_key('CPPPATH'): - env_dict['CPPPATH'] = [] - if not env_dict.has_key('LIBPATH'): - env_dict['LIBPATH'] = [] - if not env_dict.has_key('LIBS'): - env_dict['LIBS'] = [] - if not env_dict.has_key('CCFLAGS') or env_dict['CCFLAGS'] == "": - env_dict['CCFLAGS'] = [] - params = string.split(output) for arg in params: switch = arg[0:1] opt = arg[1:2] if switch == '-': if opt == 'L': - env_dict['LIBPATH'].append(arg[2:]) + dict['LIBPATH'].append(arg[2:]) elif opt == 'l': - env_dict['LIBS'].append(arg[2:]) + dict['LIBS'].append(arg[2:]) elif opt == 'I': - env_dict['CPPPATH'].append(arg[2:]) + dict['CPPPATH'].append(arg[2:]) else: - env_dict['CCFLAGS'].append(arg) + dict['CCFLAGS'].append(arg) else: static_libs.append(arg) + apply(env.Append, (), dict) return static_libs if function is None: @@ -940,11 +940,11 @@ class Base: nkw = self.subst_kw(kw) return apply(SCons.Scanner.Base, nargs, nkw) - def SConsignFile(self, name=".sconsign.dbm"): + def SConsignFile(self, name=".sconsign.dbm", dbm_module=None): name = self.subst(name) if not os.path.isabs(name): name = os.path.join(str(self.fs.SConstruct_dir), name) - SCons.Sig.SConsignFile(name) + SCons.Sig.SConsignFile(name, dbm_module) def SideEffect(self, side_effect, target): """Tell scons that side_effects are built as side |
