VirtualBox

source: kBuild/branches/GNU/src/gmake/tests/scripts/options/dash-B@ 54

最後變更 在這個檔案從54是 53,由 bird 提交於 21 年 前

Initial revision

  • 屬性 svn:eol-style 設為 native
檔案大小: 987 位元組
 
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;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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