MAKE 871 B

123456789101112131415161718192021222324252627282930313233
  1. $description = "The following test creates a makefile to test MAKE \n"
  2. ."(very generic)";
  3. $details = "DETAILS";
  4. open(MAKEFILE,"> $makefile");
  5. # The Contents of the MAKEFILE ...
  6. print MAKEFILE "TMP := \$(MAKE)\n";
  7. print MAKEFILE "MAKE := \$(subst X=\$(X),,\$(MAKE))\n\n";
  8. print MAKEFILE "all:\n";
  9. print MAKEFILE "\t\@echo \$(TMP)\n";
  10. print MAKEFILE "\t\$(MAKE) -f $makefile foo\n\n";
  11. print MAKEFILE "foo:\n";
  12. print MAKEFILE "\t\@echo \$(MAKE)\n";
  13. # END of Contents of MAKEFILE
  14. close(MAKEFILE);
  15. # Create the answer to what should be produced by this Makefile
  16. $answer = "$mkpath\n$mkpath -f $makefile foo\n"
  17. . "${make_name}[1]: Entering directory `$pwd'\n"
  18. . "$mkpath\n${make_name}[1]: Leaving directory `$pwd'\n";
  19. &run_make_with_options($makefile,"",&get_logfile,0);
  20. &delete("foo");
  21. # COMPARE RESULTS
  22. &compare_output($answer,&get_logfile(1));
  23. 1;