1*69606e3fSchristos# -*-perl-*- 2*69606e3fSchristos 3*69606e3fSchristos$description = "The following test creates a makefile to test MAKE \n" 4*69606e3fSchristos ."(very generic)"; 5*69606e3fSchristos 6*69606e3fSchristos$details = "DETAILS"; 7*69606e3fSchristos 8*69606e3fSchristosopen(MAKEFILE,"> $makefile"); 9*69606e3fSchristos 10*69606e3fSchristos# The Contents of the MAKEFILE ... 11*69606e3fSchristos 12*69606e3fSchristosprint MAKEFILE "TMP := \$(MAKE)\n"; 13*69606e3fSchristosprint MAKEFILE "MAKE := \$(subst X=\$(X),,\$(MAKE))\n\n"; 14*69606e3fSchristosprint MAKEFILE "all:\n"; 15*69606e3fSchristosprint MAKEFILE "\t\@echo \$(TMP)\n"; 16*69606e3fSchristosprint MAKEFILE "\t\$(MAKE) -f $makefile foo\n\n"; 17*69606e3fSchristosprint MAKEFILE "foo:\n"; 18*69606e3fSchristosprint MAKEFILE "\t\@echo \$(MAKE)\n"; 19*69606e3fSchristos 20*69606e3fSchristos# END of Contents of MAKEFILE 21*69606e3fSchristos 22*69606e3fSchristosclose(MAKEFILE); 23*69606e3fSchristos 24*69606e3fSchristos# Create the answer to what should be produced by this Makefile 25*69606e3fSchristos$answer = "$mkpath\n$mkpath -f $makefile foo\n" 26*69606e3fSchristos . "${make_name}[1]: Entering directory `$pwd'\n" 27*69606e3fSchristos . "$mkpath\n${make_name}[1]: Leaving directory `$pwd'\n"; 28*69606e3fSchristos 29*69606e3fSchristos&run_make_with_options($makefile,"",&get_logfile,0); 30*69606e3fSchristos 31*69606e3fSchristos&rmfiles("foo"); 32*69606e3fSchristos# COMPARE RESULTS 33*69606e3fSchristos&compare_output($answer,&get_logfile(1)); 34*69606e3fSchristos 35*69606e3fSchristos1; 36