mirror of
https://github.com/mirror/make.git
synced 2025-01-10 04:10:37 +08:00
32 lines
762 B
Perl
32 lines
762 B
Perl
# -*-perl-*-
|
|
$description = "Test the -n option.\n";
|
|
|
|
$details = "Try various uses of -n and ensure they all give the correct results.\n";
|
|
|
|
open(MAKEFILE, "> $makefile");
|
|
|
|
# The Contents of the MAKEFILE ...
|
|
|
|
print MAKEFILE <<'EOMAKE';
|
|
|
|
final: intermediate ; echo >> $@
|
|
intermediate: orig ; echo >> $@
|
|
|
|
EOMAKE
|
|
|
|
close(MAKEFILE);
|
|
|
|
&touch('orig');
|
|
|
|
&run_make_with_options($makefile, "", &get_logfile);
|
|
$answer = "echo >> intermediate\necho >> final\n";
|
|
&compare_output($answer, &get_logfile(1));
|
|
|
|
&run_make_with_options($makefile, "-Worig -n", &get_logfile);
|
|
$answer = "echo >> intermediate\necho >> final\n";
|
|
&compare_output($answer, &get_logfile(1));
|
|
|
|
unlink('orig', 'intermediate', 'final');
|
|
|
|
1;
|