5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
28 Verify that the -d option is ignored.
33 test = TestSCons.TestSCons()
35 test.write('SConstruct', "")
37 test.run(arguments = '-d .',
38 stderr = "Warning: ignoring -d option\n")
46 test.write('SConstruct', """
48 env.Program(target = 'aaa', source = 'aaa.c')
49 env.Program(target = 'bbb', source = 'bbb.c')
50 SConscript('subdir/SConscript')
53 test.write(['subdir', 'SConscript'], """
55 env.Program(target = 'ccc', source = 'ccc.c')
56 env.Program(target = 'ddd', source = 'ddd.c')
59 test.write('aaa.c', """
61 main(int argc, char *argv)
69 test.write('bbb.c', """
71 main(int argc, char *argv)
79 test.write(['subdir', 'ccc.c'], """
81 main(int argc, char *argv)
84 printf("subdir/ccc.c\n");
89 test.write(['subdir', 'ddd.c'], """
91 main(int argc, char *argv)
94 printf("subdir/ddd.c\n");
99 test.run(arguments = '-d .', stdout = """
104 Rebuilding aaa.o: out of date.
106 Rebuilding aaa: out of date.
113 Rebuilding bbb.o: out of date.
115 Rebuilding bbb: out of date.
118 Target subdir/ccc/g: subdir/ccc.o
119 Checking subdir/ccc/g
120 Checking subdir/ccc/g.o
121 Checking subdir/ccc/g.c
122 Rebuilding subdir/ccc/g.o: out of date.
123 cc -c -o subdir/ccc/g.o subdir/ccc.c
124 Rebuilding subdir/ccc/g: out of date.
125 cc -o subdir/ccc/g subdir/ccc.o
126 Target subdir/ccc/g.o: subdir/ccc.c
127 Target subdir/ddd/g: subdir/ddd.o
128 Checking subdir/ddd/g
129 Checking subdir/ddd/g.o
130 Checking subdir/ddd/g.c
131 Rebuilding subdir/ddd/g.o: out of date.
132 cc -c -o subdir/ddd/g.o subdir/ddd.c
133 Rebuilding subdir/ddd/g: out of date.
134 cc -o subdir/ddd/g subdir/ddd.o
135 Target subdir/ddd/g.o: subdir/ddd.c
138 test.run(program = test.workpath('aaa'), stdout = "aaa.c\n")
139 test.run(program = test.workpath('bbb'), stdout = "bbb.c\n")
140 test.run(program = test.workpath('subdir/ccc'), stdout = "subdir/ccc.c\n")
141 test.run(program = test.workpath('subdir/ddd'), stdout = "subdir/ddd.c\n")