test.write('SConstruct', """
Foo = Builder(name = "Foo",
- action = "%s build.py $TARGET $SOURCES subdir/foo.dep")
+ action = r"%s build.py $TARGET $SOURCES subdir/foo.dep")
Bar = Builder(name = "Bar",
- action = "%s build.py $TARGET $SOURCES subdir/bar.dep")
+ action = r"%s build.py $TARGET $SOURCES subdir/bar.dep")
env = Environment(BUILDERS = [Foo, Bar])
env.Depends(target = ['f1.out', 'f2.out'], dependency = 'subdir/foo.dep')
env.Depends(target = 'f3.out', dependency = 'subdir/bar.dep')
test.write('SConstruct', """
import os
-Bld = Builder(name = 'Bld', action = "%s build.py $TARGET $SOURCES")
+Bld = Builder(name = 'Bld', action = r"%s build.py $TARGET $SOURCES")
env1 = Environment(ENV = {'X' : 'env1'}, BUILDERS = [Bld])
env2 = Environment(ENV = {'X' : 'env2'}, BUILDERS = [Bld])
env1.Bld(target = 'env1.out', source = 'input')
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "test/option--test.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
import sys
env.Program('foo', 'foo.c bar.c')
""")
-test.write('foo.c', """
+test.write('foo.c', r"""
#include "foo.h"
int main(int argc, char *argv[])
{
test.run(arguments = "--debug=tree " + foo)
+import SCons.Defaults
+obj = SCons.Defaults.ConstructionEnvironment['OBJSUFFIX']
tree = """
-+-foo
- +-foo.o
++-%s
+ +-foo%s
| +-foo.c
| +-foo.h
| +-bar.h
- +-bar.o
+ +-bar%s
+-bar.c
+-bar.h
+-foo.h
-"""
+""" % (foo, obj,obj)
assert string.find(test.stdout(), tree) != -1