mirror of
https://github.com/mirror/make.git
synced 2025-03-25 01:00:30 +08:00
A few test bug fixes:
* Never use "touch" in make rules; it breaks on most sub-second supporting systems. Use echo "" > $@ instead. * Forgot to close test makefiles before using them! All the above worked fine on Linux but failed miserably on Solaris.
This commit is contained in:
parent
5297a83b27
commit
bc91c0b23f
@ -51,7 +51,6 @@ close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile,"",&get_logfile,0);
|
||||
|
||||
# Create the answer to what should be produced by this Makefile
|
||||
$answer = "arg1 NOT equal arg2
|
||||
arg2 equals arg5
|
||||
arg3 NOT equal arg4
|
||||
@ -59,8 +58,6 @@ variable is undefined
|
||||
arg4 is defined
|
||||
";
|
||||
|
||||
# COMPARE RESULTS
|
||||
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
@ -92,6 +89,8 @@ all:; @echo DEF=$(DEF) DEF2=$(DEF2)
|
||||
|
||||
EOF
|
||||
|
||||
close(MAKEFILE)
|
||||
|
||||
&run_make_with_options($makefile2,"",&get_logfile,0);
|
||||
$answer = "DEF=yes DEF2=yes\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
@ -131,6 +131,8 @@ all:
|
||||
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile2,"",&get_logfile,0);
|
||||
$answer = "foo=f-ok bar=b-ok\nfoo=f-ok bar=b-ok\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
@ -164,6 +166,8 @@ all:
|
||||
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile3,"",&get_logfile,0);
|
||||
$answer = "foo=f-ok bar=b-ok\nfoo= bar=\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
@ -18,7 +18,7 @@ all: foo
|
||||
|
||||
foo: bar.x
|
||||
@echo cp $< $@
|
||||
@touch $@
|
||||
@echo "" > $@
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
@ -62,6 +62,8 @@ $(dir)/foo $(dir)/bar: $@.x $$@.x $$$@.x $$$$@.x $$(@D).x $$(@F).x
|
||||
$(dir)/x.z $(dir)/y.z: $(dir)/%.z : $@.% $$@.% $$$@.% $$$$@.% $$(@D).% $$(@F).%
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile2, "$dir/foo $dir/bar", &get_logfile);
|
||||
$answer = ".x\n$dir/foo.x\n\$.x\n\$@.x\n$dir.x\nfoo.x\n$dir/bar.x\nbar.x\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
Loading…
Reference in New Issue
Block a user