|
Last change
on this file since 2580 was 2580, checked in by bird, 12 years ago |
|
Importing the make-3-82 CVS tag with --auto-props but no keywords.
|
|
File size:
1014 bytes
|
| Line | |
|---|
| 1 | # -*-perl-*-
|
|---|
| 2 |
|
|---|
| 3 | $description = "Test the filter-out function.";
|
|---|
| 4 |
|
|---|
| 5 | $details = "The makefile created in this test has two variables. The
|
|---|
| 6 | filter-out function is first used to discard names ending in
|
|---|
| 7 | .o with a single simple pattern. The second filter-out function
|
|---|
| 8 | augments the simple pattern with three literal names, which are
|
|---|
| 9 | also added to the text argument. This tests an internal hash table
|
|---|
| 10 | which is only used if there are multiple literals present in both
|
|---|
| 11 | the pattern and text arguments. The result of both filter-out
|
|---|
| 12 | functions is the same single .elc name.\n";
|
|---|
| 13 |
|
|---|
| 14 | open(MAKEFILE,"> $makefile");
|
|---|
| 15 |
|
|---|
| 16 | print MAKEFILE <<'EOF';
|
|---|
| 17 | files1 := $(filter-out %.o, foo.elc bar.o lose.o)
|
|---|
| 18 | files2 := $(filter-out foo.i bar.i lose.i %.o, foo.i bar.i lose.i foo.elc bar.o lose.o)
|
|---|
| 19 | all: ; @echo $(files1) $(files2)
|
|---|
| 20 | EOF
|
|---|
| 21 |
|
|---|
| 22 | close(MAKEFILE);
|
|---|
| 23 |
|
|---|
| 24 | &run_make_with_options($makefile, "", &get_logfile, 0);
|
|---|
| 25 | $answer = "foo.elc foo.elc\n";
|
|---|
| 26 | &compare_output($answer,&get_logfile(1));
|
|---|
| 27 |
|
|---|
| 28 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.