summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/SCons/Builder.py15
-rw-r--r--test/option--implicit-cache.py23
2 files changed, 26 insertions, 12 deletions
diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py
index bb68c93..42c9484 100644
--- a/src/engine/SCons/Builder.py
+++ b/src/engine/SCons/Builder.py
@@ -342,10 +342,7 @@ class ListBuilder:
def __init__(self, builder, env, tlist):
self.builder = builder
- self.scanner = builder.scanner
- self.env = env
self.tlist = tlist
- self.multi = builder.multi
self.name = "ListBuilder(%s)"%builder.name
def execute(self, **kw):
@@ -362,15 +359,6 @@ class ListBuilder:
t.build()
return self.status
- def get_raw_contents(self, **kw):
- return apply(self.builder.get_raw_contents, (), kw)
-
- def get_contents(self, **kw):
- return apply(self.builder.get_contents, (), kw)
-
- def src_suffixes(self, env, args):
- return self.builder.src_suffixes(env, args)
-
def targets(self, node):
"""Return the list of targets for this builder instance.
"""
@@ -379,6 +367,9 @@ class ListBuilder:
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)
+ def __getattr__(self, name):
+ return getattr(self.builder, name)
+
class MultiStepBuilder(BuilderBase):
"""This is a builder subclass that can build targets in
multiple steps. The src_builder parameter to the constructor
diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py
index 704668b..6ebff3a 100644
--- a/test/option--implicit-cache.py
+++ b/test/option--implicit-cache.py
@@ -30,8 +30,10 @@ import TestSCons
if sys.platform == 'win32':
_exe = '.exe'
+ _obj = '.obj'
else:
_exe = ''
+ _obj = '.o'
prog = 'prog' + _exe
subdir_prog = os.path.join('subdir', 'prog' + _exe)
@@ -58,6 +60,8 @@ def copy(target, source, env):
open(str(target[0]), 'wt').write(open(str(source[0]), 'rt').read())
nodep = env.Command('nodeps.c', 'nodeps.in', action=copy)
env.Program('nodeps', 'nodeps.c')
+
+env.Object(['one', 'two'], ['one.c'])
""")
test.write(['subdir', 'SConscript'],
@@ -120,7 +124,12 @@ r"""
#define BAR_STRING "subdir/include/bar.h 1\n"
""")
+test.write('one.c' ,
+r"""
+#include <foo.h>
+void one(void) { }
+""")
test.run(arguments = "--implicit-cache " + args)
@@ -242,5 +251,19 @@ test.run(program = test.workpath(variant_prog),
# test in the face of a file with no dependencies where the source file is generated:
test.run(arguments = "--implicit-cache nodeps%s"%_exe)
+test.write('nodeps.in',
+r"""
+#include <foo.h>
+
+int
+main(int argc, char *argv[])
+{
+ argv[argc++] = "--";
+ return 0;
+}
+""")
+
+test.run(arguments = "--implicit-cache one%s"%_obj)
+test.run(arguments = "--implicit-cache one%s"%_obj)
test.pass_test()