summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-01-20 14:21:54 (GMT)
committerSteven Knight <knight@baldmt.com>2009-01-20 14:21:54 (GMT)
commit45c2d7045d61b6d572faeebae73096311c16fdeb (patch)
treede81e9dd6a5c7b4571b08241fbcaf0278a0a287f /src
parentb8955d8e914ee2df82cefd954038b9e2f43d6120 (diff)
downloadSCons-45c2d7045d61b6d572faeebae73096311c16fdeb.zip
SCons-45c2d7045d61b6d572faeebae73096311c16fdeb.tar.gz
SCons-45c2d7045d61b6d572faeebae73096311c16fdeb.tar.bz2
Detect implicit command dependencies even when the command is quoted.
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Action.py9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 56b216e..aa4543e 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -17,6 +17,9 @@ RELEASE X.X.X - XXX
- Add sources for files whose targets don't exist in $CHANGED_SOURCES.
+ - Detect implicit dependencies on commands even when the command is
+ quoted.
+
RELEASE 1.2.0.d20090113 - Tue, 13 Jan 2009 02:50:30 -0800
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py
index e106e74..96a48a7 100644
--- a/src/engine/SCons/Action.py
+++ b/src/engine/SCons/Action.py
@@ -102,6 +102,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import cPickle
import dis
import os
+import re
import string
import sys
import subprocess
@@ -154,6 +155,8 @@ else:
i = i+1
return string.join(result, '')
+strip_quotes = re.compile('^[\'"](.*)[\'"]$')
+
def _callable_contents(obj):
"""Return the signature contents of a callable Python object.
@@ -822,7 +825,11 @@ class CommandAction(_ActionAction):
res = []
for cmd_line in cmd_list:
if cmd_line:
- d = env.WhereIs(str(cmd_line[0]))
+ d = str(cmd_line[0])
+ m = strip_quotes.match(d)
+ if m:
+ d = m.group(1)
+ d = env.WhereIs(d)
if d:
res.append(env.fs.File(d))
return res