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