mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-28 15:57:48 +00:00
5345adf82f
* variable.h (enum variable_flavor: Add a new flavor for appended values that shouldn't be expanded. * variable.c (do_variable_definition): If given this new flavor, do not expand the value before appending it. * read.c (eval_makefile): Use this new flavor for MAKEFILE_LIST * tests/scripts/variables/MFILE_LIST: Test filenames containing '$'.
40 lines
817 B
Perl
40 lines
817 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test the MAKEFILE_LIST variable.";
|
|
|
|
create_file('incl2', "m2 := \$(MAKEFILE_LIST)\n");
|
|
|
|
run_make_test(qq!
|
|
m1 := \$(MAKEFILE_LIST)
|
|
include incl2
|
|
m3 := \$(MAKEFILE_LIST)
|
|
|
|
all:
|
|
\t\@echo \$(m1)
|
|
\t\@echo \$(m2)
|
|
\t\@echo \$(m3)
|
|
!,
|
|
'', "#MAKEFILE#\n#MAKEFILE# incl2\n#MAKEFILE# incl2\n");
|
|
|
|
unlink('incl2');
|
|
|
|
# SV 50823 -- makefiles containing '$' chars
|
|
|
|
create_file('foo$bar', "m2 := \$(MAKEFILE_LIST)\n");
|
|
|
|
run_make_test(qq!
|
|
m1 := \$(MAKEFILE_LIST)
|
|
include foo\$\$bar
|
|
m3 := \$(MAKEFILE_LIST)
|
|
|
|
all:
|
|
\t\@echo '\$(m1)'
|
|
\t\@echo '\$(m2)'
|
|
\t\@echo '\$(m3)'
|
|
\t\@echo '\$(value MAKEFILE_LIST)'
|
|
!,
|
|
'', "#MAKEFILE#\n#MAKEFILE# foo\$bar\n#MAKEFILE# foo\$bar\n#MAKEFILE# foo\$bar\n");
|
|
|
|
unlink('foo$bar');
|
|
|
|
1;
|