mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-27 03:16:44 +00:00
add make-4.3.tar.gz
This commit is contained in:
parent
0a0997a872
commit
19f70a154e
458 changed files with 239669 additions and 0 deletions
85
third_party/make/tests/scripts/options/dash-f
vendored
Normal file
85
third_party/make/tests/scripts/options/dash-f
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
$description = "The following test tests that if you specify greater \n"
|
||||
."than one '-f makefilename' on the command line, \n"
|
||||
."that make concatenates them. This test creates three \n"
|
||||
."makefiles and specifies all of them with the -f option \n"
|
||||
."on the command line. To make sure they were concatenated, \n"
|
||||
."we then call make with the rules from the concatenated \n"
|
||||
."makefiles one at a time. Finally, it calls all three \n"
|
||||
."rules in one call to make and checks that the output\n"
|
||||
."is in the correct order.";
|
||||
|
||||
$makefile2 = &get_tmpfile;
|
||||
$makefile3 = &get_tmpfile;
|
||||
|
||||
open(MAKEFILE,"> $makefile");
|
||||
|
||||
# The Contents of the MAKEFILE ...
|
||||
|
||||
print MAKEFILE "all: \n";
|
||||
print MAKEFILE "\t\@echo This is the output from the original makefile\n";
|
||||
|
||||
# END of Contents of MAKEFILE
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
# Create a second makefile
|
||||
open(MAKEFILE,"> $makefile2");
|
||||
print MAKEFILE "TWO: \n";
|
||||
print MAKEFILE "\t\@echo This is the output from makefile 2\n";
|
||||
close(MAKEFILE);
|
||||
|
||||
# Create a third makefile
|
||||
open(MAKEFILE,"> $makefile3");
|
||||
print MAKEFILE "THREE: \n";
|
||||
print MAKEFILE "\t\@echo This is the output from makefile 3\n";
|
||||
close(MAKEFILE);
|
||||
|
||||
|
||||
# Create the answer to what should be produced by this Makefile
|
||||
$answer = "This is the output from the original makefile\n";
|
||||
|
||||
# Run make to catch the default rule
|
||||
&run_make_with_options($makefile,"-f $makefile2 -f $makefile3",&get_logfile,0);
|
||||
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
# Run Make again with the rule from the second makefile: TWO
|
||||
$answer = "This is the output from makefile 2\n";
|
||||
|
||||
&run_make_with_options($makefile,"-f $makefile2 -f $makefile3 TWO",&get_logfile,0);
|
||||
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
# Run Make again with the rule from the third makefile: THREE
|
||||
|
||||
$answer = "This is the output from makefile 3\n";
|
||||
&run_make_with_options($makefile,
|
||||
"-f $makefile2 -f $makefile3 THREE",
|
||||
&get_logfile,
|
||||
0);
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
# Run Make again with ALL three rules in the order 2 1 3 to make sure
|
||||
# that all rules are executed in the proper order
|
||||
|
||||
$answer = "This is the output from makefile 2\n";
|
||||
$answer .= "This is the output from the original makefile\n";
|
||||
$answer .= "This is the output from makefile 3\n";
|
||||
&run_make_with_options($makefile,
|
||||
"-f $makefile2 -f $makefile3 TWO all THREE",
|
||||
&get_logfile,
|
||||
0);
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue