Blame tests/scripts/variables/MAKELEVEL
|
Packit |
26a39e |
# -*-perl-*-
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
$description = "The following test creates a makefile to test
|
|
Packit |
26a39e |
makelevels in Make. It prints \$(MAKELEVEL) and then
|
|
Packit |
26a39e |
prints the environment variable MAKELEVEL";
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
open(MAKEFILE,"> $makefile");
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
# The Contents of the MAKEFILE ...
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
print MAKEFILE <
|
|
Packit |
26a39e |
all:
|
|
Packit |
26a39e |
\t\@echo MAKELEVEL is \$(MAKELEVEL)
|
|
Packit |
26a39e |
\techo \$\$MAKELEVEL
|
|
Packit |
26a39e |
EOF
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
# END of Contents of MAKEFILE
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
close(MAKEFILE);
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
# RUN MAKE
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
&run_make_with_options($makefile,"",&get_logfile);
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
# SET ANSWER
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
$answer = "MAKELEVEL is 0\necho \$MAKELEVEL\n1\n";
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
# COMPARE RESULTS
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
&compare_output($answer,&get_logfile(1));
|
|
Packit |
26a39e |
|
|
Packit |
26a39e |
1;
|