From 0ffaa445c912caef643ad78e2203c7463ca388ab Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 19 Feb 2009 22:27:45 +0000 Subject: Spell the Windows environment variables consistently "SystemDrive" and "SystemRoot" instead of "SYSTEMDRIVE" and "SYSTEMROOT". --- QMTest/scons_tdb.py | 2 +- bin/scons-test.py | 2 +- doc/man/scons.1 | 10 +++++----- src/CHANGES.txt | 3 +++ src/engine/SCons/Platform/win32.py | 12 ++++++------ src/engine/SCons/Tool/Perforce.py | 2 +- test/QT/installed.py | 2 +- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/QMTest/scons_tdb.py b/QMTest/scons_tdb.py index 2262808..b725d3f 100644 --- a/QMTest/scons_tdb.py +++ b/QMTest/scons_tdb.py @@ -188,7 +188,7 @@ environ_keys = [ 'MSDEVDIR', 'OS', 'PATHEXT', - 'SYSTEMROOT', + 'SystemRoot', 'TEMP', 'TMP', 'USERNAME', diff --git a/bin/scons-test.py b/bin/scons-test.py index 593a1a3..aa03d72 100644 --- a/bin/scons-test.py +++ b/bin/scons-test.py @@ -182,7 +182,7 @@ if format == '--xml': 'MSDEVDIR', 'OS', 'PATHEXT', - 'SYSTEMROOT', + 'SystemRoot', 'TEMP', 'TMP', 'USERNAME', diff --git a/doc/man/scons.1 b/doc/man/scons.1 index d1f9dcd..ba51518 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -1600,9 +1600,9 @@ and suffixes appropriate for the platform. Note that the .B win32 platform adds the -.B SYSTEMDRIVE +.B SystemDrive and -.B SYSTEMROOT +.B SystemRoot variables from the user's external environment to the construction environment's .B ENV @@ -4730,7 +4730,7 @@ P4LANGUAGE, P4PASSWD, P4PORT, P4USER, -SYSTEMROOT, +SystemRoot, USER, and USERNAME. @@ -4761,9 +4761,9 @@ env.Platform('posix') Note that the .B win32 platform adds the -.B SYSTEMDRIVE +.B SystemDrive and -.B SYSTEMROOT +.B SystemRoot variables from the user's external environment to the construction environment's .B ENV diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 6eb5d5b..6d5aa37 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -39,6 +39,9 @@ RELEASE X.X.X - XXX for the Microsoft linker, the OS/2 ilink linker and the Phar Lap linkloc linker. + - Spell the Windows environment variables consistently "SystemDrive" + and "SystemRoot" instead of "SYSTEMDRIVE" and "SYSTEMROOT". + From Robert P. J. Day: - User's Guide updates. diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index 79d73b3..890b925 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -192,7 +192,7 @@ def escape(x): def get_system_root(): # A resonable default if we can't read the registry try: - val = os.environ['SYSTEMROOT'] + val = os.environ['SystemRoot'] except KeyError: val = "C:/WINDOWS" pass @@ -268,8 +268,8 @@ def generate(env): # contain an ENV and a PATH. if not cmd_interp: systemroot = r'C:\Windows' - if os.environ.has_key('SYSTEMROOT'): - systemroot = os.environ['SYSTEMROOT'] + if os.environ.has_key('SystemRoot'): + systemroot = os.environ['SystemRoot'] tmp_path = systemroot + os.pathsep + \ os.path.join(systemroot,'System32') tmp_pathext = '.com;.exe;.bat;.cmd' @@ -291,12 +291,12 @@ def generate(env): # Import things from the external environment to the construction # environment's ENV. This is a potential slippery slope, because we # *don't* want to make builds dependent on the user's environment by - # default. We're doing this for SYSTEMROOT, though, because it's + # default. We're doing this for SystemRoot, though, because it's # needed for anything that uses sockets, and seldom changes, and - # for SYSTEMDRIVE because it's related. + # for SystemDrive because it's related. # # Weigh the impact carefully before adding other variables to this list. - import_env = [ 'SYSTEMDRIVE', 'SYSTEMROOT', 'TEMP', 'TMP' ] + import_env = [ 'SystemDrive', 'SystemRoot', 'TEMP', 'TMP' ] for var in import_env: v = os.environ.get(var) if v: diff --git a/src/engine/SCons/Tool/Perforce.py b/src/engine/SCons/Tool/Perforce.py index ba3a953..8d30d12 100644 --- a/src/engine/SCons/Tool/Perforce.py +++ b/src/engine/SCons/Tool/Perforce.py @@ -47,7 +47,7 @@ from SCons.Tool.PharLapCommon import addPathIfNotExists # Variables that we want to import from the base OS environment. _import_env = [ 'P4PORT', 'P4CLIENT', 'P4USER', 'USER', 'USERNAME', 'P4PASSWD', - 'P4CHARSET', 'P4LANGUAGE', 'SYSTEMROOT' ] + 'P4CHARSET', 'P4LANGUAGE', 'SystemRoot' ] PerforceAction = SCons.Action.Action('$P4COM', '$P4COMSTR') diff --git a/test/QT/installed.py b/test/QT/installed.py index e9d2e16..c79f958 100644 --- a/test/QT/installed.py +++ b/test/QT/installed.py @@ -62,7 +62,7 @@ env = Environment(tools=['default','qt'], ENV={'PATH':ENV_PATH, 'PATHEXT':os.environ.get('PATHEXT'), 'HOME':os.getcwd(), - 'SYSTEMROOT':ENV.get('SYSTEMROOT')}, + 'SystemRoot':ENV.get('SystemRoot')}, # moc / uic want to write stuff in ~/.qt CXXFILESUFFIX=".cpp") -- cgit v0.12