diff options
author | Steven Knight <knight@baldmt.com> | 2004-10-27 11:22:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-10-27 11:22:02 (GMT) |
commit | db2f5ec5d3c155c8d542528f49f0f98451465a4c (patch) | |
tree | 9d59419a813718c769363ce4ce5e924607dab434 | |
parent | c3d0b21a6dfd673934ca8184fdf1df45566b321c (diff) | |
download | SCons-db2f5ec5d3c155c8d542528f49f0f98451465a4c.zip SCons-db2f5ec5d3c155c8d542528f49f0f98451465a4c.tar.gz SCons-db2f5ec5d3c155c8d542528f49f0f98451465a4c.tar.bz2 |
Improved regular expression for removing pairs from command-line strings. (Wayne Lee)
-rw-r--r-- | src/CHANGES.txt | 5 | ||||
-rw-r--r-- | src/engine/SCons/Util.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 579811e..d9a397f 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -113,6 +113,11 @@ RELEASE 0.97 - XXX for another target, to avoid trying to build it again when it comes up in the target list. + From Wayne Lee: + + - Avoid "maximum recursion limit" errors when removing $(-$) pairs + from long command lines. + From Clive Levinson: - Make ParseConfig() recognize and add -mno-cygwin to $LINKFLAGS and diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index b713b57..b2bae65 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -509,7 +509,7 @@ SUBST_RAW = 1 SUBST_SIG = 2 _rm = re.compile(r'\$[()]') -_remove = re.compile(r'\$\(([^\$]|\$[^\(])*?\$\)') +_remove = re.compile(r'\$\([^\$]*(\$[^\)][^\$]*)*\$\)') # Indexed by the SUBST_* constants above. _regex_remove = [ _rm, None, _remove ] |