VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/misc/general3@ 486

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

Initial revision

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.1 KB
 
1# -*-perl-*-
2
3$description = "\
4This tests random features of the parser that need to be supported, and
5which have either broken at some point in the past or seem likely to
6break.";
7
8$makefile2 = &get_tmpfile;
9
10open(MAKEFILE,"> $makefile");
11
12# The contents of the Makefile ...
13
14print MAKEFILE <<EOF;
15# We want to allow both empty commands _and_ commands that resolve to empty.
16EMPTY =
17
18.PHONY: all a1 a2 a3 a4
19all: a1 a2 a3 a4
20
21a1:;
22a2:
23\t
24a3:;\$(EMPTY)
25a4:
26\t\$(EMPTY)
27
28\# Non-empty lines that expand to nothing should also be ignored.
29STR = \# Some spaces
30TAB = \t \# A TAB and some spaces
31
32\$(STR)
33
34\$(STR) \$(TAB)
35
36EOF
37
38close(MAKEFILE);
39
40&run_make_with_options($makefile,"",&get_logfile);
41$answer = "$make_name: Nothing to be done for `all'.\n";
42&compare_output($answer,&get_logfile(1));
43
44
45# TEST 2
46
47# Make sure files without trailing newlines are handled properly.
48
49open(MAKEFILE, "> $makefile2");
50print MAKEFILE "all:;\@echo FOO = \$(FOO)\nFOO = foo";
51close(MAKEFILE);
52
53&run_make_with_options($makefile2,"",&get_logfile);
54$answer = "FOO = foo\n";
55&compare_output($answer,&get_logfile(1));
56
57
581;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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