VirtualBox

source: kBuild/trunk/src/gmake/tests/scripts/options/dash-B@ 53

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 = "\
6Construct a simple makefile that builds a target.
7Invoke make once, so it builds everything. Invoke it again and verify
8that nothing is built. Then invoke it with -B and verify that everything
9is built again.";
10
11open(MAKEFILE,"> $makefile");
12
13print MAKEFILE <<'EOF';
14.SUFFIXES:
15
16.PHONY: all
17all: foo
18
19foo: bar.x
20 @echo cp $< $@
21 @echo "" > $@
22EOF
23
24close(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
41unlink('bar.x', 'foo') unless $keep;
42
431;
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette