- 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
import cPickle
import dis
import os
+import re
import string
import sys
import subprocess
i = i+1
return string.join(result, '')
+strip_quotes = re.compile('^[\'"](.*)[\'"]$')
+
def _callable_contents(obj):
"""Return the signature contents of a callable Python object.
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
test.write('SConstruct', """
env = Environment()
-bb = Action('%s $CHANGED_TARGETS -- $CHANGED_SOURCES',
+env.PrependENVPath('PATHEXT', '.PY')
+bb = Action(r'"%s" $CHANGED_TARGETS -- $CHANGED_SOURCES',
batch_key=True,
targets='CHANGED_TARGETS')
env['BUILDERS']['Batch'] = Builder(action=bb)
envNone.BuildFile('fileNone.out', 'file.in')
envFalse.BuildFile('fileFalse.out', 'file.in')
envTrue.BuildFile('fileTrue.out', 'file.in')
+envTrue.BuildFile('fileQuote.out', 'file.in', BUILD_PY='"build.py"')
""" % locals())
test.must_match('fileNone.out', expect_none % 'fileNone.out')
test.must_match('fileFalse.out', expect_none % 'fileFalse.out')
test.must_match('fileTrue.out', expect_none % 'fileTrue.out')
+test.must_match('fileQuote.out', expect_none % 'fileQuote.out')
test.must_match('fileNone.out', expect_none % 'fileNone.out')
test.must_match('fileFalse.out', expect_none % 'fileFalse.out')
test.must_match('fileTrue.out', expect_extra % 'fileTrue.out')
+test.must_match('fileQuote.out', expect_extra % 'fileQuote.out')
test.pass_test()