|
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 = "\
|
|---|
| 4 | This tests random features of the parser that need to be supported, and
|
|---|
| 5 | which have either broken at some point in the past or seem likely to
|
|---|
| 6 | break.";
|
|---|
| 7 |
|
|---|
| 8 | $makefile2 = &get_tmpfile;
|
|---|
| 9 |
|
|---|
| 10 | open(MAKEFILE,"> $makefile");
|
|---|
| 11 |
|
|---|
| 12 | # The contents of the Makefile ...
|
|---|
| 13 |
|
|---|
| 14 | print MAKEFILE <<EOF;
|
|---|
| 15 | # We want to allow both empty commands _and_ commands that resolve to empty.
|
|---|
| 16 | EMPTY =
|
|---|
| 17 |
|
|---|
| 18 | .PHONY: all a1 a2 a3 a4
|
|---|
| 19 | all: a1 a2 a3 a4
|
|---|
| 20 |
|
|---|
| 21 | a1:;
|
|---|
| 22 | a2:
|
|---|
| 23 | \t
|
|---|
| 24 | a3:;\$(EMPTY)
|
|---|
| 25 | a4:
|
|---|
| 26 | \t\$(EMPTY)
|
|---|
| 27 |
|
|---|
| 28 | \# Non-empty lines that expand to nothing should also be ignored.
|
|---|
| 29 | STR = \# Some spaces
|
|---|
| 30 | TAB = \t \# A TAB and some spaces
|
|---|
| 31 |
|
|---|
| 32 | \$(STR)
|
|---|
| 33 |
|
|---|
| 34 | \$(STR) \$(TAB)
|
|---|
| 35 |
|
|---|
| 36 | EOF
|
|---|
| 37 |
|
|---|
| 38 | close(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 |
|
|---|
| 49 | open(MAKEFILE, "> $makefile2");
|
|---|
| 50 | print MAKEFILE "all:;\@echo FOO = \$(FOO)\nFOO = foo";
|
|---|
| 51 | close(MAKEFILE);
|
|---|
| 52 |
|
|---|
| 53 | &run_make_with_options($makefile2,"",&get_logfile);
|
|---|
| 54 | $answer = "FOO = foo\n";
|
|---|
| 55 | &compare_output($answer,&get_logfile(1));
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.