3 $description = "Test vpath for particular classes of filenames.";
7 @files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h",
8 "$workdir${pathsep}kbd.c","$workdir${pathsep}command.h",
9 "$workdir${pathsep}commands.c","$workdir${pathsep}display.c",
10 "$workdir${pathsep}buffer.h","$workdir${pathsep}insert.c",
11 "$workdir${pathsep}command.c");
13 &touch(@files_to_touch);
19 objects = main.o kbd.o commands.o display.o insert.o
20 edit: $(objects) ; @echo cc -o $@ $^
21 main.o : main.c defs.h ; @echo cc -c $(firstword $^)
22 kbd.o : kbd.c defs.h command.h ; @echo cc -c kbd.c
23 commands.o : command.c defs.h command.h ; @echo cc -c commands.c
24 display.o : display.c defs.h buffer.h ; @echo cc -c display.c
25 insert.o : insert.c defs.h buffer.h ; @echo cc -c insert.c
27 '', "cc -c $workdir${pathsep}main.c\ncc -c kbd.c\ncc -c commands.c\n"
28 ."cc -c display.c\ncc -c insert.c\n"
29 ."cc -o edit main.o kbd.o commands.o display.o insert.o\n");
31 unlink(@files_to_touch);
33 # TEST 2: after vpath lookup ensure we don't get incorrect circular dependency
34 # warnings due to change of struct file ptr. Savannah bug #13529.
36 mkdir('vpath-d', 0777);
41 default: vpath-d/a vpath-d/b
46 '', "#MAKE#: Nothing to be done for 'default'.\n");
60 all: ; @echo ALL IS WELL
64 # Test interaction of -lfoo and vpath
66 my @dirs_to_make = qw(a1 b1 a2 b2 b3);
67 for my $d (@dirs_to_make) {
71 my @files_to_touch = ("a1${pathsep}lib1.a",
73 "b1${pathsep}lib1.so",
75 "b2${pathsep}lib2.so",
77 "b3${pathsep}lib3.so");
78 &touch(@files_to_touch);
80 my $answer = "a1${pathsep}lib1.a a1${pathsep}libc.a " .
81 "a2${pathsep}lib2.a lib3.a\n";
82 if ($port_type eq 'VMS-DCL') {
92 all: -l1 -lc -l2 -l3; @echo $^
96 unlink(@files_to_touch);
97 for my $d (@dirs_to_make) {
101 # Check that if we find find files with VPATH, we don't do pattern search
107 %.x: ; @echo pattern $@
108 vpa/foo.x: ; @echo vpath $@
110 'foo.x', "vpath vpa/foo.x\n");