summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-01-16 13:04:23 -0700
committerMats Wichmann <mats@linux.com>2019-01-16 13:07:54 -0700
commit8c669448e9ef3bcd7c3c16a81beb56770ae7b445 (patch)
tree68c1ef20ba915a7c2aec38f618d8222378201fa5
parentb04db00ba0818a1f22c08491b50fc7977cbe8bbd (diff)
downloadscons-git-8c669448e9ef3bcd7c3c16a81beb56770ae7b445.tar.gz
Change TEMPFILEEXTENSION to TEMPFILESUFFIX
All the other file extension variables end in SUFFIX, so change this new one to match for consistency. Added doc entry. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--src/CHANGES.txt4
-rw-r--r--src/engine/SCons/Platform/__init__.py8
-rw-r--r--src/engine/SCons/Platform/__init__.xml24
3 files changed, 26 insertions, 10 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 8059f5d95..450052ccb 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -14,8 +14,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Improve finding of Microsoft compiler: add a 'products' wildcard
in case 2017 Build Tools only is installed as it is considered a separate
product from the default Visual Studio
- - Add TEMPFILEEXTENSION as in the patch attached to issue #2431,
- updated to current codebase.
+ - Add TEMPFILESUFFIX to allow a customizable filename extension, as
+ described in the patch attached to issue #2431.
From Daniel Moody:
- Improved support for VC14.1 and Visual Studio 2017, as well as arm and arm64 targets.
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index 75c483942..db5b94752 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/engine/SCons/Platform/__init__.py
@@ -205,11 +205,11 @@ class TempFileMunge(object):
# We use the .lnk suffix for the benefit of the Phar Lap
# linkloc linker, which likes to append an .lnk suffix if
# none is given.
- if env.has_key('TEMPFILEEXTENSION'):
- extension = env.subst('$TEMPFILEEXTENSION')
+ if env.has_key('TEMPFILESUFFIX'):
+ suffix = env.subst('$TEMPFILESUFFIX')
else:
- extension = '.lnk' # TODO: better way to pick default?
- (fd, tmp) = tempfile.mkstemp(extension, text=True)
+ suffix = '.lnk' # TODO: better way to pick default?
+ fd, tmp = tempfile.mkstemp(suffix, text=True)
native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp))
diff --git a/src/engine/SCons/Platform/__init__.xml b/src/engine/SCons/Platform/__init__.xml
index 080236990..f11327877 100644
--- a/src/engine/SCons/Platform/__init__.xml
+++ b/src/engine/SCons/Platform/__init__.xml
@@ -232,13 +232,29 @@ The suffix used for shared object file names.
<summary>
<para>
The prefix for a temporary file used
-to execute lines longer than $MAXLINELENGTH.
-The default is '@'.
-This may be set for toolchains that use other values,
-such as '-@' for the diab compiler
+to store lines lines longer than $MAXLINELENGTH
+as operations which call out to a shell will fail
+if the line is too long, which particularly
+impacts linking.
+The default is '@', which works for the Microsoft
+and GNU toolchains on Windows.
+Set this appropriately for other toolchains,
+for example '-@' for the diab compiler
or '-via' for ARM toolchain.
</para>
</summary>
</cvar>
+<cvar name="TEMPFILESUFFIX">
+<summary>
+<para>
+The suffix used for the temporary file name
+used for long command lines. The name should
+include the dot ('.') if one is wanted as
+it will not be added automatically.
+The default is '.lnk'.
+</para>
+</summary>
+</cvar>
+
</sconsdoc>