1$description = "This is part 2 in a series to test the vpath directive\n"
2              ."It tests the three forms of the directive:\n"
3              ."     vpath pattern directive\n"
4              ."     vpath pattern  (clears path associated with pattern)\n"
5              ."     vpath          (clears all paths specified with vpath)\n";
6
7$details = "This test simply adds many search paths using various vpath\n"
8          ."directive forms and clears them afterwards.  It has a simple\n"
9          ."rule to print a message at the end to confirm that the makefile\n"
10          ."ran with no errors.\n";
11
12open(MAKEFILE,"> $makefile");
13
14# The Contents of the MAKEFILE ...
15
16print MAKEFILE "VPATH = $workdir:$sourcedir\n";
17print MAKEFILE "vpath %.c foo\n";
18print MAKEFILE "vpath %.c $workdir\n";
19print MAKEFILE "vpath %.c $sourcedir\n";
20print MAKEFILE "vpath %.h $workdir\n";
21print MAKEFILE "vpath %.c\n";
22print MAKEFILE "vpath\n";
23print MAKEFILE "all:\n";
24print MAKEFILE "\t\@echo ALL IS WELL\n";
25# END of Contents of MAKEFILE
26
27close(MAKEFILE);
28
29&run_make_with_options($makefile,"",&get_logfile);
30
31# Create the answer to what should be produced by this Makefile
32$answer = "ALL IS WELL\n";
33
34&compare_output($answer,&get_logfile(1));
35
361;
37
38
39
40
41
42
43
44
45
46