VirtualBox

source: kBuild/trunk/src/gmake/tests/scripts/misc/general3@ 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: 1.1 KB
Line 
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;
Note: See TracBrowser for help on using the repository browser.

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