Fix a problem with --debug=explain when actions change due to expanded construction...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 17 Jun 2004 04:31:46 +0000 (04:31 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 17 Jun 2004 04:31:46 +0000 (04:31 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@994 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Node/__init__.py
test/explain.py

index 64226a623761c985a889f540a8d2d9cb6c4a63cb..51e66287a87d4f5910fb04622474c899b9b9a549 100644 (file)
@@ -563,8 +563,8 @@ class Node:
             binfo.bimplicitsigs = implicitsigs
 
             if has_builder:
-                binfo.bact = str(executor)
-                binfo.bactsig = calc.module.signature(executor)
+                binfo.bact = executor.get_contents()
+                binfo.bactsig = bactsig
 
         binfo.bsig = calc.module.collect(filter(None, sigs))
 
@@ -901,6 +901,11 @@ class Node:
             elif osig[k] != nsig[k]:
                 lines.append("`%s' changed\n" % k)
 
+        if len(lines) == 0 and old_bkids != new_bkids:
+            lines.append("the dependency order changed:\n" +
+                         "%sold: %s\n" % (' '*15, old_bkids) +
+                         "%snew: %s\n" % (' '*15, new_bkids))
+
         if len(lines) == 0:
             newact, newactsig = self.binfo.bact, self.binfo.bactsig
             if old.bact != newact:
@@ -909,9 +914,7 @@ class Node:
                              "%snew: %s\n" % (' '*15, newact))
 
         if len(lines) == 0:
-            lines.append("the dependency order changed:\n" +
-                         "%sold: %s\n" % (' '*15, old_bkids) +
-                         "%snew: %s\n" % (' '*15, new_bkids))
+            return "rebuilding `%s' for unknown reasons" % self
 
         preamble = "rebuilding `%s' because" % self
         if len(lines) == 1:
index 4526ca940428716bd357d8348964f9a99136e214..d614065c137aa768fa8718b8e3245fec4f24b243 100644 (file)
@@ -40,7 +40,8 @@ test = TestSCons.TestSCons()
 test.subdir('work1', ['work1', 'src'], ['work1', 'src', 'subdir'],
             'work2', ['work2', 'src'], ['work2', 'src', 'subdir'],
             'work3', ['work3', 'src'], ['work3', 'src', 'subdir'],
-            'work4', ['work4', 'src'], ['work4', 'src', 'subdir'])
+            'work4', ['work4', 'src'], ['work4', 'src', 'subdir'],
+            'work5', ['work5', 'src'], ['work5', 'src', 'subdir'])
 
 subdir_file6 = os.path.join('subdir', 'file6')
 subdir_file6_in = os.path.join('subdir', 'file6.in')
@@ -110,7 +111,7 @@ Import("env")
 env.Cat('file1', 'file1.in')
 env.Cat('file2', 'file2.k')
 env.Cat('file3', ['xxx', 'yyy', 'zzz'])
-env.Command('file4', 'file4.in', r"%s %s $TARGET - $SOURCES")
+env.Command('file4', 'file4.in', r"%s %s $TARGET $FILE4FLAG $SOURCES", FILE4FLAG="-")
 env.Cat('file5', 'file5.k')
 env.Cat('subdir/file6', 'subdir/file6.in')
 """ % (python, cat_py))
@@ -299,13 +300,13 @@ test.must_match(['work1', 'src', 'file3'], "zzz 2\nyyy 2\nxxx 1\n")
 #
 test.write(['work1', 'src', 'SConscript'], """\
 Import("env")
-env.Command('file4', 'file4.in', r"%s %s $TARGET $SOURCES")
+env.Command('file4', 'file4.in', r"%s %s $TARGET $FILE4FLAG $SOURCES", FILE4FLAG="")
 """ % (python, cat_py))
 
 test.run(chdir='work1/src',arguments=args, stdout=test.wrap_stdout("""\
 scons: rebuilding `file4' because the build action changed:
-               old: %s %s $TARGET - $SOURCES
-               new: %s %s $TARGET $SOURCES
+               old: %s %s file4 - file4.in
+               new: %s %s file4 file4.in
 %s %s file4 file4.in
 """ % (python, cat_py,
        python, cat_py,