Last change
on this file since 53 was 53, checked in by bird, 21 years ago |
Initial revision
|
-
Property svn:eol-style
set to
native
|
File size:
987 bytes
|
Line | |
---|
1 | # -*-perl-*-
|
---|
2 |
|
---|
3 | $description = "Test make -B (always remake) option.\n";
|
---|
4 |
|
---|
5 | $details = "\
|
---|
6 | Construct a simple makefile that builds a target.
|
---|
7 | Invoke make once, so it builds everything. Invoke it again and verify
|
---|
8 | that nothing is built. Then invoke it with -B and verify that everything
|
---|
9 | is built again.";
|
---|
10 |
|
---|
11 | open(MAKEFILE,"> $makefile");
|
---|
12 |
|
---|
13 | print MAKEFILE <<'EOF';
|
---|
14 | .SUFFIXES:
|
---|
15 |
|
---|
16 | .PHONY: all
|
---|
17 | all: foo
|
---|
18 |
|
---|
19 | foo: bar.x
|
---|
20 | @echo cp $< $@
|
---|
21 | @echo "" > $@
|
---|
22 | EOF
|
---|
23 |
|
---|
24 | close(MAKEFILE);
|
---|
25 |
|
---|
26 |
|
---|
27 | &touch('bar.x');
|
---|
28 |
|
---|
29 | &run_make_with_options($makefile, '', &get_logfile);
|
---|
30 | $answer = "cp bar.x foo\n";
|
---|
31 | &compare_output($answer, &get_logfile(1));
|
---|
32 |
|
---|
33 | &run_make_with_options($makefile, '', &get_logfile);
|
---|
34 | $answer = "$make_name: Nothing to be done for `all'.\n";
|
---|
35 | &compare_output($answer, &get_logfile(1));
|
---|
36 |
|
---|
37 | &run_make_with_options($makefile, '-B', &get_logfile);
|
---|
38 | $answer = "cp bar.x foo\n";
|
---|
39 | &compare_output($answer, &get_logfile(1));
|
---|
40 |
|
---|
41 | unlink('bar.x', 'foo') unless $keep;
|
---|
42 |
|
---|
43 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.