Home | History | Annotate | Download | only in variables
      1 #                                                                    -*-perl-*-
      2 
      3 $description = "Test the MAKEFILE_LIST variable.";
      4 
      5 $makefile2 = &get_tmpfile;
      6 
      7 open(MAKEFILE,"> $makefile");
      8 print MAKEFILE <<EOF;
      9 m1 := \$(MAKEFILE_LIST)
     10 include $makefile2
     11 m3 := \$(MAKEFILE_LIST)
     12 
     13 all:
     14 \t\@echo \$(m1)
     15 \t\@echo \$(m2)
     16 \t\@echo \$(m3)
     17 EOF
     18 close(MAKEFILE);
     19 
     20 
     21 open(MAKEFILE,"> $makefile2");
     22 print MAKEFILE "m2 := \$(MAKEFILE_LIST)\n";
     23 close(MAKEFILE);
     24 
     25 
     26 &run_make_with_options($makefile, "", &get_logfile);
     27 $answer = "$makefile\n$makefile $makefile2\n$makefile $makefile2\n";
     28 &compare_output($answer,&get_logfile(1));
     29 
     30 1;
     31