From 00c3ada748b164ecf909727fa81f521dde72fda9 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Wed, 31 Oct 2001 03:47:18 +0000 Subject: Make the (s) and variables upper-case. --- src/engine/SCons/Builder.py | 6 +++--- src/engine/SCons/BuilderTests.py | 10 +++++----- src/engine/SCons/Defaults.py | 16 ++++++++-------- src/engine/SCons/UtilTests.py | 26 +++++++++++++------------- test/Command.py | 8 ++++---- test/Default.py | 6 +++--- test/Depends.py | 4 ++-- test/ENV.py | 2 +- test/Library.py | 2 +- test/builderrors.py | 12 ++++++------ test/multiline.py | 6 +++--- test/option--.py | 2 +- test/option-c.py | 2 +- test/option-i.py | 4 ++-- test/option-j.py | 2 +- test/option-k.py | 4 ++-- test/option-n.py | 2 +- test/option-s.py | 2 +- test/subdir.py | 2 +- test/up-to-date.py | 2 +- 20 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 7febeb2..4023530 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -312,13 +312,13 @@ class CommandAction(ActionBase): t = kw['target'] if type(t) is type(""): t = [t] - loc['targets'] = PathList(map(os.path.normpath, t)) - loc['target'] = loc['targets'][0] + loc['TARGETS'] = PathList(map(os.path.normpath, t)) + loc['TARGET'] = loc['TARGETS'][0] if kw.has_key('source'): s = kw['source'] if type(s) is type(""): s = [s] - loc['sources'] = PathList(map(os.path.normpath, s)) + loc['SOURCES'] = PathList(map(os.path.normpath, s)) glob = {} if kw.has_key('env'): diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 6c9c678..e24784d 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -121,7 +121,7 @@ class BuilderTestCase(unittest.TestCase): c = test.read(outfile, 'r') assert c == "act.py: xyzzy\n", c - cmd2 = r'%s %s %s $target' % (python, act_py, outfile) + cmd2 = r'%s %s %s $TARGET' % (python, act_py, outfile) builder = SCons.Builder.Builder(action = cmd2) r = builder.execute(target = 'foo') @@ -129,7 +129,7 @@ class BuilderTestCase(unittest.TestCase): c = test.read(outfile, 'r') assert c == "act.py: foo\n", c - cmd3 = r'%s %s %s ${targets}' % (python, act_py, outfile) + cmd3 = r'%s %s %s ${TARGETS}' % (python, act_py, outfile) builder = SCons.Builder.Builder(action = cmd3) r = builder.execute(target = ['aaa', 'bbb']) @@ -137,7 +137,7 @@ class BuilderTestCase(unittest.TestCase): c = test.read(outfile, 'r') assert c == "act.py: aaa bbb\n", c - cmd4 = r'%s %s %s $sources' % (python, act_py, outfile) + cmd4 = r'%s %s %s $SOURCES' % (python, act_py, outfile) builder = SCons.Builder.Builder(action = cmd4) r = builder.execute(source = ['one', 'two']) @@ -145,7 +145,7 @@ class BuilderTestCase(unittest.TestCase): c = test.read(outfile, 'r') assert c == "act.py: one two\n", c - cmd4 = r'%s %s %s ${sources[:2]}' % (python, act_py, outfile) + cmd4 = r'%s %s %s ${SOURCES[:2]}' % (python, act_py, outfile) builder = SCons.Builder.Builder(action = cmd4) r = builder.execute(source = ['three', 'four', 'five']) @@ -153,7 +153,7 @@ class BuilderTestCase(unittest.TestCase): c = test.read(outfile, 'r') assert c == "act.py: three four\n", c - cmd5 = r'%s %s %s $target XYZZY' % (python, act_py, outfile) + cmd5 = r'%s %s %s $TARGET XYZZY' % (python, act_py, outfile) builder = SCons.Builder.Builder(action = cmd5) r = builder.execute(target = 'out5', env = {'ENV' : {'XYZZY' : 'xyzzy'}}) diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index 1c5fda5..9008026 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -71,16 +71,16 @@ if os.name == 'posix': ConstructionEnvironment = { 'CC' : 'cc', 'CCFLAGS' : '', - 'CCCOM' : '$CC $CCFLAGS -c -o $target $sources', + 'CCCOM' : '$CC $CCFLAGS -c -o $TARGET $SOURCES', 'CXX' : 'c++', 'CXXFLAGS' : '$CCFLAGS', - 'CXXCOM' : '$CXX $CXXFLAGS -c -o $target $sources', + 'CXXCOM' : '$CXX $CXXFLAGS -c -o $TARGET $SOURCES', 'LINK' : '$CXX', 'LINKFLAGS' : '', - 'LINKCOM' : '$LINK $LINKFLAGS -o $target $sources', + 'LINKCOM' : '$LINK $LINKFLAGS -o $TARGET $SOURCES', 'AR' : 'ar', 'ARFLAGS' : 'r', - 'ARCOM' : '$AR $ARFLAGS $target $sources\nranlib $target', + 'ARCOM' : '$AR $ARFLAGS $TARGET $SOURCES\nranlib $TARGET', 'BUILDERS' : [Object, Program, Library], 'OBJPREFIX' : '', 'OBJSUFFIX' : '.o', @@ -96,16 +96,16 @@ elif os.name == 'nt': ConstructionEnvironment = { 'CC' : 'cl', 'CCFLAGS' : '/nologo', - 'CCCOM' : '$CC $CCFLAGS /c $sources /Fo$target', + 'CCCOM' : '$CC $CCFLAGS /c $SOURCES /Fo$TARGET', 'CXX' : '$CC', 'CXXFLAGS' : '$CCFLAGS', - 'CXXCOM' : '$CXX $CXXFLAGS /c $sources /Fo$target', + 'CXXCOM' : '$CXX $CXXFLAGS /c $SOURCES /Fo$TARGET', 'LINK' : 'link', 'LINKFLAGS' : '', - 'LINKCOM' : '$LINK $LINKFLAGS /out:$target $sources', + 'LINKCOM' : '$LINK $LINKFLAGS /out:$TARGET $SOURCES', 'AR' : 'lib', 'ARFLAGS' : '/nologo', - 'ARCOM' : '$AR $ARFLAGS /out:$target $sources', + 'ARCOM' : '$AR $ARFLAGS /out:$TARGET $SOURCES', 'BUILDERS' : [Object, Program, Library], 'OBJPREFIX' : '', 'OBJSUFFIX' : '.obj', diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py index f8829da..59ce344 100644 --- a/src/engine/SCons/UtilTests.py +++ b/src/engine/SCons/UtilTests.py @@ -77,11 +77,11 @@ class UtilTestCase(unittest.TestCase): def test_subst(self): """Test the subst function.""" loc = {} - loc['targets'] = PathList(map(os.path.normpath, [ "./foo/bar.exe", + loc['TARGETS'] = PathList(map(os.path.normpath, [ "./foo/bar.exe", "/bar/baz.obj", "../foo/baz.obj" ])) - loc['target'] = loc['targets'][0] - loc['sources'] = PathList(map(os.path.normpath, [ "./foo/blah.cpp", + loc['TARGET'] = loc['TARGETS'][0] + loc['SOURCES'] = PathList(map(os.path.normpath, [ "./foo/blah.cpp", "/bar/ack.cpp", "../foo/ack.c" ])) loc['xxx'] = None @@ -94,34 +94,34 @@ class UtilTestCase(unittest.TestCase): return string.replace(str, '/', os.sep) - newcom = scons_subst("test $targets $sources", loc, {}) + newcom = scons_subst("test $TARGETS $SOURCES", loc, {}) assert newcom == cvt("test foo/bar.exe /bar/baz.obj ../foo/baz.obj foo/blah.cpp /bar/ack.cpp ../foo/ack.c") - newcom = scons_subst("test ${targets[:]} ${sources[0]}", loc, {}) + newcom = scons_subst("test ${TARGETS[:]} ${SOURCES[0]}", loc, {}) assert newcom == cvt("test foo/bar.exe /bar/baz.obj ../foo/baz.obj foo/blah.cpp") - newcom = scons_subst("test ${targets[1:]}v", loc, {}) + newcom = scons_subst("test ${TARGETS[1:]}v", loc, {}) assert newcom == cvt("test /bar/baz.obj ../foo/baz.objv") - newcom = scons_subst("test $target", loc, {}) + newcom = scons_subst("test $TARGET", loc, {}) assert newcom == cvt("test foo/bar.exe") - newcom = scons_subst("test $target$source[0]", loc, {}) + newcom = scons_subst("test $TARGET$SOURCE[0]", loc, {}) assert newcom == cvt("test foo/bar.exe[0]") - newcom = scons_subst("test ${target.file}", loc, {}) + newcom = scons_subst("test ${TARGET.file}", loc, {}) assert newcom == cvt("test bar.exe") - newcom = scons_subst("test ${target.filebase}", loc, {}) + newcom = scons_subst("test ${TARGET.filebase}", loc, {}) assert newcom == cvt("test bar") - newcom = scons_subst("test ${target.suffix}", loc, {}) + newcom = scons_subst("test ${TARGET.suffix}", loc, {}) assert newcom == cvt("test .exe") - newcom = scons_subst("test ${target.base}", loc, {}) + newcom = scons_subst("test ${TARGET.base}", loc, {}) assert newcom == cvt("test foo/bar") - newcom = scons_subst("test ${target.dir}", loc, {}) + newcom = scons_subst("test ${TARGET.dir}", loc, {}) assert newcom == cvt("test foo") newcom = scons_subst("test $xxx", loc, {}) diff --git a/test/Command.py b/test/Command.py index e9d7452..2b704fc 100644 --- a/test/Command.py +++ b/test/Command.py @@ -42,12 +42,12 @@ file.close() test.write('SConstruct', """ env = Environment() env.Command(target = 'f1.out', source = 'f1.in', - action = r'%s build.py $target $sources') + action = r'%s build.py $TARGET $SOURCES') env.Command(target = 'f2.out', source = 'f2.in', - action = r'%s' + " build.py temp2 $sources\\n" + r'%s' + " build.py $target temp2") + action = r'%s' + " build.py temp2 $SOURCES\\n" + r'%s' + " build.py $TARGET temp2") env.Command(target = 'f3.out', source = 'f3.in', - action = [r'%s build.py temp3 $sources', - r'%s build.py $target temp3']) + action = [r'%s build.py temp3 $SOURCES', + r'%s build.py $TARGET temp3']) # Eventually, add ability to do execute Python code. """ % (python, python, python, python, python)) diff --git a/test/Default.py b/test/Default.py index 9155660..93e6be6 100644 --- a/test/Default.py +++ b/test/Default.py @@ -43,7 +43,7 @@ file.close() """) test.write(['one', 'SConstruct'], """ -B = Builder(name = 'B', action = r'%s ../build.py $target $sources') +B = Builder(name = 'B', action = r'%s ../build.py $TARGET $SOURCES') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') @@ -51,7 +51,7 @@ Default('foo.out') """ % python) test.write(['two', 'SConstruct'], """ -B = Builder(name = 'B', action = r'%s ../build.py $target $sources') +B = Builder(name = 'B', action = r'%s ../build.py $TARGET $SOURCES') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') @@ -59,7 +59,7 @@ Default('foo.out', 'bar.out') """ % python) test.write(['three', 'SConstruct'], """ -B = Builder(name = 'B', action = r'%s ../build.py $target $sources') +B = Builder(name = 'B', action = r'%s ../build.py $TARGET $SOURCES') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') diff --git a/test/Depends.py b/test/Depends.py index 5fb0479..822573a 100644 --- a/test/Depends.py +++ b/test/Depends.py @@ -43,9 +43,9 @@ file.close() test.write('SConstruct', """ Foo = Builder(name = "Foo", - action = "%s build.py $target $sources subdir/foo.dep") + action = "%s build.py $TARGET $SOURCES subdir/foo.dep") Bar = Builder(name = "Bar", - action = "%s build.py $target $sources subdir/bar.dep") + action = "%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') diff --git a/test/ENV.py b/test/ENV.py index 1ff699d..50032df 100644 --- a/test/ENV.py +++ b/test/ENV.py @@ -40,7 +40,7 @@ test.write('SConstruct', """ import os bin1_path = r'%s' + os.pathsep + os.environ['PATH'] bin2_path = r'%s' + os.pathsep + os.environ['PATH'] -Bld = Builder(name = 'Bld', action = "build.py $target $sources") +Bld = Builder(name = 'Bld', action = "build.py $TARGET $SOURCES") bin1 = Environment(ENV = {'PATH' : bin1_path}, BUILDERS = [Bld]) bin2 = Environment(ENV = {'PATH' : bin2_path}, BUILDERS = [Bld]) bin1.Bld(target = 'bin1.out', source = 'input') diff --git a/test/Library.py b/test/Library.py index 7e832ca..3c50f3d 100644 --- a/test/Library.py +++ b/test/Library.py @@ -31,7 +31,7 @@ test = TestSCons.TestSCons() #XXX Need to switch TestBld to Program() when LIBS variable is working. test.write('SConstruct', """ TestBld = Builder(name='TestBld', - action='cc -o $target $sources -L./ -lfoo1 -lfoo2 -lfoo3') + action='cc -o $TARGET $SOURCES -L./ -lfoo1 -lfoo2 -lfoo3') env = Environment(BUILDERS=[ TestBld, Library ]) env.Library(target = 'foo1', source = 'f1.c') env.Library(target = 'foo2', source = 'f2a.c f2b.c f2c.c') diff --git a/test/builderrors.py b/test/builderrors.py index 769215a..c76568e 100644 --- a/test/builderrors.py +++ b/test/builderrors.py @@ -46,8 +46,8 @@ sys.exit(exitval) """) test.write(['one', 'SConstruct'], """ -B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $target $sources') -B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $target $sources') +B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $TARGET $SOURCES') +B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $TARGET $SOURCES') env = Environment(BUILDERS = [B0, B1]) env.B1(target = 'f1.out', source = 'f1.in') env.B0(target = 'f2.out', source = 'f2.in') @@ -66,8 +66,8 @@ test.fail_test(os.path.exists(test.workpath('f2.out'))) test.fail_test(os.path.exists(test.workpath('f3.out'))) test.write(['two', 'SConstruct'], """ -B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $target $sources') -B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $target $sources') +B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $TARGET $SOURCES') +B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $TARGET $SOURCES') env = Environment(BUILDERS = [B0, B1]) env.B0(target = 'f1.out', source = 'f1.in') env.B1(target = 'f2.out', source = 'f2.in') @@ -86,8 +86,8 @@ test.fail_test(os.path.exists(test.workpath('f2.out'))) test.fail_test(os.path.exists(test.workpath('f3.out'))) test.write(['three', 'SConstruct'], """ -B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $target $sources') -B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $target $sources') +B0 = Builder(name = 'B0', action = r'%s ../build.py 0 $TARGET $SOURCES') +B1 = Builder(name = 'B1', action = r'%s ../build.py 1 $TARGET $SOURCES') env = Environment(BUILDERS = [B0, B1]) env.B0(target = 'f1.out', source = 'f1.in') env.B0(target = 'f2.out', source = 'f2.in') diff --git a/test/multiline.py b/test/multiline.py index 7560d55..9b7ee61 100644 --- a/test/multiline.py +++ b/test/multiline.py @@ -42,9 +42,9 @@ sys.exit(0) """) test.write('SConstruct', """ -B1 = Builder(name = 'B1', action = [r'%s build.py .temp $sources', - r'%s build.py $targets .temp']) -B2 = Builder(name = 'B2', action = r'%s' + " build.py .temp $sources\\n" + r'%s' + " build.py $targets .temp") +B1 = Builder(name = 'B1', action = [r'%s build.py .temp $SOURCES', + r'%s build.py $TARGETS .temp']) +B2 = Builder(name = 'B2', action = r'%s' + " build.py .temp $SOURCES\\n" + r'%s' + " build.py $TARGETS .temp") env = Environment(BUILDERS = [B1, B2]) env.B1(target = 'foo1.out', source = 'foo1.in') env.B2(target = 'foo2.out', source = 'foo2.in') diff --git a/test/option--.py b/test/option--.py index 5370488..ada5f58 100644 --- a/test/option--.py +++ b/test/option--.py @@ -42,7 +42,7 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = r'%s build.py $targets') + action = r'%s build.py $TARGETS') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = '-f1.out', source = 'f1.in') env.MyBuild(target = '-f2.out', source = 'f2.in') diff --git a/test/option-c.py b/test/option-c.py index b188d53..105db49 100644 --- a/test/option-c.py +++ b/test/option-c.py @@ -41,7 +41,7 @@ file.close() """) test.write('SConstruct', """ -B = Builder(name = 'B', action = r'%s build.py $targets $sources') +B = Builder(name = 'B', action = r'%s build.py $TARGETS $SOURCES') env = Environment(BUILDERS = [B]) env.B(target = 'foo1.out', source = 'foo1.in') env.B(target = 'foo2.out', source = 'foo2.in') diff --git a/test/option-i.py b/test/option-i.py index 8991550..d572be6 100644 --- a/test/option-i.py +++ b/test/option-i.py @@ -46,8 +46,8 @@ sys.exit(1) """) test.write('SConstruct', """ -Succeed = Builder(name = "Succeed", action = r'%s succeed.py $targets') -Fail = Builder(name = "Fail", action = r'%s fail.py $targets') +Succeed = Builder(name = "Succeed", action = r'%s succeed.py $TARGETS') +Fail = Builder(name = "Fail", action = r'%s fail.py $TARGETS') env = Environment(BUILDERS = [Succeed, Fail]) env.Fail(target = 'aaa.1', source = 'aaa.in') env.Succeed(target = 'aaa.out', source = 'aaa.1') diff --git a/test/option-j.py b/test/option-j.py index 3eb0b12..168f2b5 100644 --- a/test/option-j.py +++ b/test/option-j.py @@ -53,7 +53,7 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = r'%s build.py $targets') + action = r'%s build.py $TARGETS') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = 'f1', source = 'f1.in') env.MyBuild(target = 'f2', source = 'f2.in') diff --git a/test/option-k.py b/test/option-k.py index 6b9e89a..83e4020 100644 --- a/test/option-k.py +++ b/test/option-k.py @@ -46,8 +46,8 @@ sys.exit(1) """) test.write('SConstruct', """ -Succeed = Builder(name = "Succeed", action = r'%s succeed.py $targets') -Fail = Builder(name = "Fail", action = r'%s fail.py $targets') +Succeed = Builder(name = "Succeed", action = r'%s succeed.py $TARGETS') +Fail = Builder(name = "Fail", action = r'%s fail.py $TARGETS') env = Environment(BUILDERS = [Succeed, Fail]) env.Fail(target = 'aaa.1', source = 'aaa.in') env.Succeed(target = 'aaa.out', source = 'aaa.1') diff --git a/test/option-n.py b/test/option-n.py index 0a5a225..23c6bd7 100644 --- a/test/option-n.py +++ b/test/option-n.py @@ -42,7 +42,7 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = r'%s build.py $targets') + action = r'%s build.py $TARGETS') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = 'f1.out', source = 'f1.in') env.MyBuild(target = 'f2.out', source = 'f2.in') diff --git a/test/option-s.py b/test/option-s.py index 666060e..b34a02e 100644 --- a/test/option-s.py +++ b/test/option-s.py @@ -42,7 +42,7 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = r'%s build.py $target') + action = r'%s build.py $TARGET') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = 'f1.out', source = 'f1.in') env.MyBuild(target = 'f2.out', source = 'f2.in') diff --git a/test/subdir.py b/test/subdir.py index 7071b54..2161195 100644 --- a/test/subdir.py +++ b/test/subdir.py @@ -40,7 +40,7 @@ file.close() """) test.write('SConstruct', """ -B = Builder(name = "B", action = "python build.py $targets $sources") +B = Builder(name = "B", action = "python build.py $TARGETS $SOURCES") env = Environment(BUILDERS = [B]) env.B(target = 'subdir/f1.out', source = 'subdir/f1.in') env.B(target = 'subdir/f2.out', source = 'subdir/f2.in') diff --git a/test/up-to-date.py b/test/up-to-date.py index dd7d86a..7620409 100644 --- a/test/up-to-date.py +++ b/test/up-to-date.py @@ -42,7 +42,7 @@ file.close() """) test.write('SConstruct', """ -B = Builder(name = "B", action = r'%s build.py $targets $sources') +B = Builder(name = "B", action = r'%s build.py $TARGETS $SOURCES') env = Environment(BUILDERS = [B]) env.B(target = 'f1.out', source = 'f1.in') env.B(target = 'f2.out', source = 'f2.in') -- cgit v0.12