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