Environment.py (scons-4.2.0) | : | Environment.py (SCons-4.3.0) | ||
---|---|---|---|---|
skipping to change at line 962 | skipping to change at line 962 | |||
if platform is None: | if platform is None: | |||
platform = self._dict.get('PLATFORM', None) | platform = self._dict.get('PLATFORM', None) | |||
if platform is None: | if platform is None: | |||
platform = SCons.Platform.Platform() | platform = SCons.Platform.Platform() | |||
if is_String(platform): | if is_String(platform): | |||
platform = SCons.Platform.Platform(platform) | platform = SCons.Platform.Platform(platform) | |||
self._dict['PLATFORM'] = str(platform) | self._dict['PLATFORM'] = str(platform) | |||
platform(self) | platform(self) | |||
self._dict['HOST_OS'] = self._dict.get('HOST_OS',None) | # these should be set by the platform, backstop just in case | |||
self._dict['HOST_ARCH'] = self._dict.get('HOST_ARCH',None) | self._dict['HOST_OS'] = self._dict.get('HOST_OS', None) | |||
self._dict['HOST_ARCH'] = self._dict.get('HOST_ARCH', None) | ||||
# Now set defaults for TARGET_{OS|ARCH} | ||||
self._dict['TARGET_OS'] = self._dict.get('TARGET_OS',None) | # these are not currently set by the platform, give them a default | |||
self._dict['TARGET_ARCH'] = self._dict.get('TARGET_ARCH',None) | self._dict['TARGET_OS'] = self._dict.get('TARGET_OS', None) | |||
self._dict['TARGET_ARCH'] = self._dict.get('TARGET_ARCH', None) | ||||
# Apply the passed-in and customizable variables to the | # Apply the passed-in and customizable variables to the | |||
# environment before calling the tools, because they may use | # environment before calling the tools, because they may use | |||
# some of them during initialization. | # some of them during initialization. | |||
if 'options' in kw: | if 'options' in kw: | |||
# Backwards compatibility: they may stll be using the | # Backwards compatibility: they may stll be using the | |||
# old "options" keyword. | # old "options" keyword. | |||
variables = kw['options'] | variables = kw['options'] | |||
del kw['options'] | del kw['options'] | |||
self.Replace(**kw) | self.Replace(**kw) | |||
skipping to change at line 2236 | skipping to change at line 2237 | |||
t.add_prerequisite(plist) | t.add_prerequisite(plist) | |||
return tlist | return tlist | |||
def Scanner(self, *args, **kw): | def Scanner(self, *args, **kw): | |||
nargs = [] | nargs = [] | |||
for arg in args: | for arg in args: | |||
if is_String(arg): | if is_String(arg): | |||
arg = self.subst(arg) | arg = self.subst(arg) | |||
nargs.append(arg) | nargs.append(arg) | |||
nkw = self.subst_kw(kw) | nkw = self.subst_kw(kw) | |||
return SCons.Scanner.Base(*nargs, **nkw) | return SCons.Scanner.ScannerBase(*nargs, **nkw) | |||
def SConsignFile(self, name=".sconsign", dbm_module=None): | def SConsignFile(self, name=SCons.SConsign.current_sconsign_filename(), dbm_ module=None): | |||
if name is not None: | if name is not None: | |||
name = self.subst(name) | name = self.subst(name) | |||
if not os.path.isabs(name): | if not os.path.isabs(name): | |||
name = os.path.join(str(self.fs.SConstruct_dir), name) | name = os.path.join(str(self.fs.SConstruct_dir), name) | |||
if name: | if name: | |||
name = os.path.normpath(name) | name = os.path.normpath(name) | |||
sconsign_dir = os.path.dirname(name) | sconsign_dir = os.path.dirname(name) | |||
if sconsign_dir and not os.path.exists(sconsign_dir): | if sconsign_dir and not os.path.exists(sconsign_dir): | |||
self.Execute(SCons.Defaults.Mkdir(sconsign_dir)) | self.Execute(SCons.Defaults.Mkdir(sconsign_dir)) | |||
SCons.SConsign.File(name, dbm_module) | SCons.SConsign.File(name, dbm_module) | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 9 lines changed or added |