1# -*-perl-*- 2 3$description = "This script tests to make sure that Remke looks for 4parent default makefiles in the correct order (GNUmakefile,makefile,Makefile)"; 5 6mkdir "work/options/testing"; 7chdir "work/options/testing"; 8 9# Create a makefile called "GNUmakefile" 10my $makefile = "GNUmakefile"; 11my $log_filename_orig = $log_filename; 12$log_filename = "../../../$log_filename"; 13 14open(MAKEFILE,"> $makefile"); 15print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n"; 16close(MAKEFILE); 17 18run_make_with_options("","-c",&get_logfile(1)); 19 20chdir "../../.."; 21$log_filename = $log_filename_orig; 22compare_output("It chose GNUmakefile\n",&get_logfile(1)); 23 24chdir "work/options/testing"; 25$log_filename = "../../../$log_filename"; 26run_make_with_options("","--search-parent",&get_logfile(2)); 27 28chdir "../../.."; 29$log_filename = $log_filename_orig; 30compare_output("It chose GNUmakefile\n",&get_logfile(2)); 31 32# FIXME: add a test without the option -c to see that this fails. 33chdir "work/options/testing"; 34 35# $log_filename = "../../../$log_filename"; 36# run_make_with_options("","",&get_logfile(3)); 37 38unlink($makefile); 39chdir ".."; 40rmdir "testing"; 41chdir "../.."; 42 431; 44