8 |
that nothing is built. Then invoke it with -B and verify that everything |
that nothing is built. Then invoke it with -B and verify that everything |
9 |
is built again."; |
is built again."; |
10 |
|
|
11 |
open(MAKEFILE,"> $makefile"); |
&touch('bar.x'); |
12 |
|
|
13 |
print MAKEFILE <<'EOF'; |
run_make_test(' |
14 |
.SUFFIXES: |
.SUFFIXES: |
15 |
|
|
16 |
.PHONY: all |
.PHONY: all |
19 |
foo: bar.x |
foo: bar.x |
20 |
@echo cp $< $@ |
@echo cp $< $@ |
21 |
@echo "" > $@ |
@echo "" > $@ |
22 |
EOF |
', |
23 |
|
'', 'cp bar.x foo'); |
24 |
|
|
25 |
close(MAKEFILE); |
run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); |
26 |
|
run_make_test(undef, '-B', 'cp bar.x foo'); |
27 |
|
|
28 |
|
# Put the timestamp for foo into the future; it should still be remade. |
29 |
|
|
30 |
|
utouch(1000, 'foo'); |
31 |
|
run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); |
32 |
|
run_make_test(undef, '-B', 'cp bar.x foo'); |
33 |
|
|
|
&touch('bar.x'); |
|
34 |
|
|
35 |
&run_make_with_options($makefile, '', &get_logfile); |
# Clean up |
|
$answer = "cp bar.x foo\n"; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
|
|
|
|
&run_make_with_options($makefile, '', &get_logfile); |
|
|
$answer = "$make_name: Nothing to be done for `all'.\n"; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
|
|
|
|
&run_make_with_options($makefile, '-B', &get_logfile); |
|
|
$answer = "cp bar.x foo\n"; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
36 |
|
|
37 |
unlink('bar.x', 'foo') unless $keep; |
rmfiles('bar.x', 'foo'); |
38 |
|
|
39 |
1; |
1; |