diff options
author | Manish Vachharajani <manishv@unbounded.systems> | 2017-03-22 22:28:28 (GMT) |
---|---|---|
committer | Manish Vachharajani <manishv@unbounded.systems> | 2017-03-22 22:28:28 (GMT) |
commit | c5eead8a1737e6ef4a63dfba11226a4ae2fb9c98 (patch) | |
tree | 9e25ff4d6a4c9059798011508b02fc10533581a4 | |
parent | 76aa6cb5d4ec8661223480aa9914c28f6f6b5e6d (diff) | |
download | SCons-c5eead8a1737e6ef4a63dfba11226a4ae2fb9c98.zip SCons-c5eead8a1737e6ef4a63dfba11226a4ae2fb9c98.tar.gz SCons-c5eead8a1737e6ef4a63dfba11226a4ae2fb9c98.tar.bz2 |
Push version to Python 2.7 as minimum required.
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 2 | ||||
-rw-r--r-- | test/Dir/Dir.py | 25 |
3 files changed, 28 insertions, 1 deletions
diff --git a/debian/control b/debian/control index afba6f6..5fbf0eb 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: scons Section: devel Priority: optional Maintainer: Moshe Zadka <moshez@debian.org> -Build-Depends-Indep: debhelper (>> 5.0.0), python-dev (>> 2.4) +Build-Depends-Indep: debhelper (>> 5.0.0), python-dev (>> 2.7) Standards-Version: 3.5.6 Package: scons diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index f455edb..d846b7c 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -1872,6 +1872,8 @@ class Dir(Base): for kid in self.children(): if kid.get_state() > up_to_date: return 0 +# else if kid.changed_since_last_build_node(): +# return 0 return 1 def rdir(self): diff --git a/test/Dir/Dir.py b/test/Dir/Dir.py index 2e8204c..88763a4 100644 --- a/test/Dir/Dir.py +++ b/test/Dir/Dir.py @@ -71,6 +71,31 @@ env.MD(target='sub2', source=['SConstruct'], OVERRIDE='foo') test.run() +#The following test creates a builder with only a directory target, +#updates its source, and ensures that the directory target is +#considered out of date and rebuilt. + +test.write('foo-contents.txt', """Hello, """) +test.write('SConstruct', """\ +import os + +def mkdir_and_copy(target=None, source=None, env=None): + os.mkdir(str(target[0])) + os.copy(str(source[0]), str(target[0])) + +mac_builder = Builder(action=mkdir_and_copy) +env = Environment() +env.Append(BUILDERS = {'MAC': mac_builder} +env.MAC(target='foo', src='foo-contents.txt') +""") + +#Build foo +test.not_up_to_date('foo') +test.up_to) + +test.write('foo-contents.txt', """Hello, World!""") +test.not_up_to_date('foo') + test.pass_test() # Local Variables: |