mirror of
https://github.com/mirror/make.git
synced 2026-08-31 03:38:03 +08:00
Fixed stem termination and stem triple-expansion bugs.
This commit is contained in:
@@ -183,6 +183,42 @@ foo.c: ; @echo $@
|
||||
foo.o: {foo.c} foo.c
|
||||
');
|
||||
|
||||
# Test #7: Test stem from the middle of the name.
|
||||
#
|
||||
run_make_test('
|
||||
foobarbaz:
|
||||
|
||||
foo%baz: % $$*.1
|
||||
@echo $*
|
||||
|
||||
bar bar.1:
|
||||
@echo $@
|
||||
|
||||
',
|
||||
'',
|
||||
'bar
|
||||
bar.1
|
||||
bar
|
||||
');
|
||||
|
||||
# Test #8: Make sure stem triple-expansion does not happen.
|
||||
#
|
||||
run_make_test('
|
||||
foo$$bar:
|
||||
|
||||
f%r: % $$*.1
|
||||
@echo \'$*\'
|
||||
|
||||
oo$$ba oo$$ba.1:
|
||||
@echo \'$@\'
|
||||
|
||||
',
|
||||
'',
|
||||
'oo$ba
|
||||
oo$ba.1
|
||||
oo$ba
|
||||
');
|
||||
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
@@ -102,5 +102,23 @@ baz.a.1
|
||||
baz.a.2
|
||||
');
|
||||
|
||||
|
||||
# Test #4: Make sure stem triple-expansion does not happen.
|
||||
#
|
||||
run_make_test('
|
||||
foo$$bar: f%r: % $$*.1
|
||||
@echo \'$*\'
|
||||
|
||||
oo$$ba oo$$ba.1:
|
||||
@echo \'$@\'
|
||||
|
||||
',
|
||||
'',
|
||||
'oo$ba
|
||||
oo$ba.1
|
||||
oo$ba
|
||||
');
|
||||
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
@@ -55,11 +55,11 @@ unlink('foo.el', 'bar.c', 'lose.c');
|
||||
|
||||
$makefile2 = &get_tmpfile;
|
||||
open(MAKEFILE, "> $makefile2");
|
||||
print MAKEFILE "foo: foo%: % ; \@echo $@\n";
|
||||
print MAKEFILE "foo: foo%: % ; \@echo \$@\n";
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile2, '', &get_logfile, 512);
|
||||
$answer = "$makefile2:1: *** target `foo' leaves prerequisite pattern empty. Stop.\n";
|
||||
&run_make_with_options($makefile2, '', &get_logfile);
|
||||
$answer = "foo\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
# TEST #5 -- bug #12180: core dump on a stat pattern rule with an empty
|
||||
|
||||
Reference in New Issue
Block a user