Last change
on this file since 2591 was 2591, checked in by bird, 13 years ago |
kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.
|
File size:
1.1 KB
|
Line | |
---|
1 | # -*-perl-*-
|
---|
2 |
|
---|
3 | $description = "Test the interaction of the -lfoo feature and vpath";
|
---|
4 | $details = "";
|
---|
5 |
|
---|
6 | open(MAKEFILE,"> $makefile");
|
---|
7 |
|
---|
8 | # The Contents of the MAKEFILE ...
|
---|
9 |
|
---|
10 | print MAKEFILE "vpath %.a a1\n";
|
---|
11 | print MAKEFILE "vpath %.so b1\n";
|
---|
12 | print MAKEFILE "vpath % a2 b2\n";
|
---|
13 | print MAKEFILE "vpath % b3\n";
|
---|
14 | print MAKEFILE "all: -l1 -l2 -l3; \@echo \$^\n";
|
---|
15 |
|
---|
16 | # END of Contents of MAKEFILE
|
---|
17 |
|
---|
18 | close(MAKEFILE);
|
---|
19 |
|
---|
20 | mkdir("a1", 0777);
|
---|
21 | mkdir("b1", 0777);
|
---|
22 | mkdir("a2", 0777);
|
---|
23 | mkdir("b2", 0777);
|
---|
24 | mkdir("b3", 0777);
|
---|
25 |
|
---|
26 | @files_to_touch = ("a1${pathsep}lib1.a",
|
---|
27 | "b1${pathsep}lib1.so",
|
---|
28 | "a2${pathsep}lib2.a",
|
---|
29 | "b2${pathsep}lib2.so",
|
---|
30 | "lib3.a",
|
---|
31 | "b3${pathsep}lib3.so");
|
---|
32 |
|
---|
33 | &touch(@files_to_touch);
|
---|
34 |
|
---|
35 | &run_make_with_options($makefile,"",&get_logfile);
|
---|
36 |
|
---|
37 | # Create the answer to what should be produced by this Makefile
|
---|
38 | $answer = "a1${pathsep}lib1.a a2${pathsep}lib2.a lib3.a\n";
|
---|
39 |
|
---|
40 | if (&compare_output($answer,&get_logfile(1)))
|
---|
41 | {
|
---|
42 | unlink @files_to_touch;
|
---|
43 | rmdir("a1");
|
---|
44 | rmdir("b1");
|
---|
45 | rmdir("a2");
|
---|
46 | rmdir("b2");
|
---|
47 | rmdir("b3");
|
---|
48 | }
|
---|
49 |
|
---|
50 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.