diff options
author | Paul Smith <psmith@gnu.org> | 1999-09-14 02:03:19 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-09-14 02:03:19 +0000 |
commit | 0d366b668244112846554c42045ff1d9956276ed (patch) | |
tree | 3802242fe18a5e90d889f5d1ac66fb487361888b /tests/scripts/features/recursion | |
parent | 4121dea6a59367b4431cbe7a3c43d74fec9fd832 (diff) | |
download | gunmake-0d366b668244112846554c42045ff1d9956276ed.tar.gz |
* Added the test suite to the main distribution.
Diffstat (limited to 'tests/scripts/features/recursion')
-rw-r--r-- | tests/scripts/features/recursion | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/scripts/features/recursion b/tests/scripts/features/recursion new file mode 100644 index 0000000..444f7ce --- /dev/null +++ b/tests/scripts/features/recursion @@ -0,0 +1,61 @@ +# -*-perl-*- +$description = "The following test creates a makefile to ...\n"; + +$details = "DETAILS"; + +open(MAKEFILE,"> $makefile"); + +# The Contents of the MAKEFILE ... + +print MAKEFILE "all: \n" + ."\t\$(MAKE) -f $makefile foo \n" + ."foo: \n" + ."\t\@echo \$(MAKE) \n" + ."\t\@echo MAKELEVEL = \$(MAKELEVEL)\n" + ."\t\$(MAKE) -f $makefile last \n" + ."last: \n" + ."\t\@echo \$(MAKE) \n" + ."\t\@echo MAKELEVEL = \$(MAKELEVEL) \n" + ."\t\@echo THE END\n"; + +# END of Contents of MAKEFILE + +close(MAKEFILE); + +if ($vos) +{ + $answer = "$make_name: Entering directory \`$pwd\'\n" + ."make 'CFLAGS=-O' -f $makefile foo \n" + ."make CFLAGS=-O\n" + ."MAKELEVEL = 0\n" + ."make 'CFLAGS=-O' -f $makefile last \n" + ."make CFLAGS=-O\n" + ."MAKELEVEL = 0\n" + ."THE END\n" + ."$make_name: Leaving directory `$pwd'\n"; +} +else +{ + $answer = "$make_name: Entering directory `$pwd'\n" + ."$mkpath -f $makefile foo \n" + ."${make_name}[1]: Entering directory `$pwd'\n" + ."$mkpath\n" + ."MAKELEVEL = 1\n" + ."$mkpath -f $makefile last \n" + ."${make_name}[2]: Entering directory `$pwd'\n" + ."$mkpath\n" + ."MAKELEVEL = 2\n" + ."THE END\n" + ."${make_name}[2]: Leaving directory `$pwd'\n" + ."${make_name}[1]: Leaving directory `$pwd'\n" + ."$make_name: Leaving directory `$pwd'\n"; +} + +$mkoptions = "CFLAGS=-O -w"; +$mkoptions .= " -j 2" if ($parallel_jobs); + +&run_make_with_options($makefile,$mkoptions,&get_logfile,0); + +&compare_output($answer,&get_logfile(1)); + +1; |