summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-06-05 02:51:24 (GMT)
committerSteven Knight <knight@baldmt.com>2002-06-05 02:51:24 (GMT)
commit549e4f245d3dd789fa7eef16e43299a4766ec2cd (patch)
treecef7ecc0a93ad4d29a4189551f77e85b960c414a /src
parent78d38667226c4e01ea8d3b1026b2d6db5492d75b (diff)
downloadSCons-549e4f245d3dd789fa7eef16e43299a4766ec2cd.zip
SCons-549e4f245d3dd789fa7eef16e43299a4766ec2cd.tar.gz
SCons-549e4f245d3dd789fa7eef16e43299a4766ec2cd.tar.bz2
Fix --implicit-cache if the scanner returns an empty list. (Jeff Petkau)
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt4
-rw-r--r--src/engine/SCons/Sig/SigTests.py7
-rw-r--r--src/engine/SCons/Sig/__init__.py9
3 files changed, 17 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index db75777..0d8e475 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -54,6 +54,10 @@ RELEASE 0.08 -
- Added a --debug=time option to print SCons execution times.
+ From Jeff Petkau:
+
+ - Fix --implicit-cache if the scanner returns an empty list.
+
From Zed Shaw:
- Add an Append() method to Environments, to append values to
diff --git a/src/engine/SCons/Sig/SigTests.py b/src/engine/SCons/Sig/SigTests.py
index 1004e6e..7931947 100644
--- a/src/engine/SCons/Sig/SigTests.py
+++ b/src/engine/SCons/Sig/SigTests.py
@@ -495,6 +495,13 @@ class SConsignEntryTestCase(unittest.TestCase):
assert e.get_implicit() == ['foo bletch', 'bar']
assert e.render(m) == "123 456 789 foo bletch\0bar"
+ e = SCons.Sig.SConsignEntry(m, "987 654 321")
+ assert e.timestamp == 987
+ assert e.bsig == 654
+ assert e.csig == 321
+ assert e.get_implicit() == []
+ assert e.render(m) == "987 654 321 " # note trailing space
+
class SConsignFileTestCase(unittest.TestCase):
def runTest(self):
diff --git a/src/engine/SCons/Sig/__init__.py b/src/engine/SCons/Sig/__init__.py
index 2c8edad..a13557a 100644
--- a/src/engine/SCons/Sig/__init__.py
+++ b/src/engine/SCons/Sig/__init__.py
@@ -61,8 +61,9 @@ class SConsignEntry:
if arr[2] == '-': self.csig = None
else: self.csig = module.from_string(arr[2])
- if arr[3] == '-': self.implicit = None
- else: self.implicit = arr[3]
+ if len(arr) < 4: self.implicit = ''
+ elif arr[3] == '-': self.implicit = None
+ else: self.implicit = arr[3]
except IndexError:
pass
@@ -82,8 +83,10 @@ class SConsignEntry:
return '%s %s %s %s' % (timestamp, bsig, csig, implicit)
def get_implicit(self):
- if not self.implicit:
+ if self.implicit is None:
return None
+ elif self.implicit == '':
+ return []
else:
return string.split(self.implicit, '\0')