From: William Deegan Date: Sun, 1 Oct 2017 01:13:07 +0000 (-0700) Subject: add fix for mistaking $$( for $( and breaking subst. Reported by Noah Hoffman noah... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7a846e6c44b3ae20f8575c9823fc7cbe6d920d7;p=platform%2Fupstream%2Fscons.git add fix for mistaking $$( for $( and breaking subst. Reported by Noah Hoffman noah.hoffman at gmail.com in: https://pairlist4.pair.net/pipermail/scons-users/2017-September/006352.html --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 0e742ec5..3b717ff8 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,6 +15,12 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Fixed a regression in scons-3.0.0 where "from __future__ import print_function" was imposed on the scope where SConstruct is executed, breaking existing builds using PY 2.7. + From William Deegan: + - Fix broken subst logic where a string with "$$(abc)" was being treated as "$(abc) and the + logic for removing the signature escapes was then failing because there was no closing "$)". + This was introduced by a pull request to allow recursive variable evaluations to yield a string + such as "$( $( some stuff $) $)". + RELEASE 3.0.0 - Mon, 18 Sep 2017 08:32:04 -0700 NOTE: This is a major release. You should expect that some targets may rebuild when upgrading. diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index a68b54db..68d247f8 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -338,7 +338,10 @@ SUBST_RAW = 1 SUBST_SIG = 2 _rm = re.compile(r'\$[()]') -_rm_split = re.compile(r'(\$[()])') + +# Note the pattern below only matches $( or $) when there is no +# preceeding $. (Thus the (?