1 1.1 christos # -*-perl-*- 2 1.1 christos 3 1.1 christos $description = "The following test creates a makefile to test 4 1.1 christos makelevels in Make. It prints \$(MAKELEVEL) and then 5 1.1 christos prints the environment variable MAKELEVEL"; 6 1.1 christos 7 1.1 christos open(MAKEFILE,"> $makefile"); 8 1.1 christos 9 1.1 christos # The Contents of the MAKEFILE ... 10 1.1 christos 11 1.1 christos print MAKEFILE <<EOF; 12 1.1 christos all: 13 1.1 christos \t\@echo MAKELEVEL is \$(MAKELEVEL) 14 1.1 christos \techo \$\$MAKELEVEL 15 1.1 christos EOF 16 1.1 christos 17 1.1 christos # END of Contents of MAKEFILE 18 1.1 christos 19 1.1 christos close(MAKEFILE); 20 1.1 christos 21 1.1 christos # RUN MAKE 22 1.1 christos 23 1.1 christos &run_make_with_options($makefile,"",&get_logfile); 24 1.1 christos 25 1.1 christos # SET ANSWER 26 1.1 christos 27 1.1 christos $answer = "MAKELEVEL is 0\necho \$MAKELEVEL\n1\n"; 28 1.1 christos 29 1.1 christos # COMPARE RESULTS 30 1.1 christos 31 1.1 christos &compare_output($answer,&get_logfile(1)); 32 1.1 christos 33 1.1 christos 1; 34