summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Util.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-20 12:44:02 (GMT)
committerSteven Knight <knight@baldmt.com>2005-08-20 12:44:02 (GMT)
commite50a8da8cd0201e3f567e2d87c14b5c2ab2126de (patch)
treee8e031b63ffbd10f59613892e5ee10c08e223ffe /src/engine/SCons/Util.py
parent3a5d4f0de360edb40bc68af414b275849ca92690 (diff)
downloadSCons-e50a8da8cd0201e3f567e2d87c14b5c2ab2126de.zip
SCons-e50a8da8cd0201e3f567e2d87c14b5c2ab2126de.tar.gz
SCons-e50a8da8cd0201e3f567e2d87c14b5c2ab2126de.tar.bz2
Handle files with white space when in temporary files. (Stanislav Baranov)
Diffstat (limited to 'src/engine/SCons/Util.py')
-rw-r--r--src/engine/SCons/Util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index a4516e9..084975a 100644
--- a/src/engine/SCons/Util.py
+++ b/src/engine/SCons/Util.py
@@ -546,11 +546,12 @@ _regex_remove = [ _rm, None, _remove ]
#
# " " [white space]
# "non-white-space" [without any dollar signs]
+# '"with-space-or-not"' [without any dollar signs]
# "$" [single dollar sign]
#
_dollar_exps_str = r'\$[\$\(\)]|\$[_a-zA-Z][\.\w]*|\${[^}]*}'
_dollar_exps = re.compile(r'(%s)' % _dollar_exps_str)
-_separate_args = re.compile(r'(%s|\s+|[^\s\$]+|\$)' % _dollar_exps_str)
+_separate_args = re.compile(r'(%s|\s+|[^"\s\$]+|"[^"\$]+"|\$)' % _dollar_exps_str)
# This regular expression is used to replace strings of multiple white
# space characters in the string result from the scons_subst() function.
@@ -890,6 +891,8 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv
else:
self.next_word()
else:
+ if a[0] == '"' and a[-1] == '"':
+ a = a[1:-1]
self.expand(a, lvars, within_list)
else:
self.expand(args, lvars, within_list)