2002-07-08 02:26:47 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test the MAKEFILE_LIST variable.";
|
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
create_file('incl2', "m2 := \$(MAKEFILE_LIST)\n");
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
run_make_test(qq!
|
2002-07-08 02:26:47 +00:00
|
|
|
m1 := \$(MAKEFILE_LIST)
|
2017-05-28 04:33:29 +00:00
|
|
|
include incl2
|
2002-07-08 02:26:47 +00:00
|
|
|
m3 := \$(MAKEFILE_LIST)
|
|
|
|
|
|
|
|
all:
|
|
|
|
\t\@echo \$(m1)
|
|
|
|
\t\@echo \$(m2)
|
|
|
|
\t\@echo \$(m3)
|
2017-05-28 04:33:29 +00:00
|
|
|
!,
|
|
|
|
'', "#MAKEFILE#\n#MAKEFILE# incl2\n#MAKEFILE# incl2\n");
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
unlink('incl2');
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
# SV 50823 -- makefiles containing '$' chars
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
create_file('foo$bar', "m2 := \$(MAKEFILE_LIST)\n");
|
2002-07-08 02:26:47 +00:00
|
|
|
|
2017-05-28 04:33:29 +00:00
|
|
|
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');
|
2002-07-08 02:26:47 +00:00
|
|
|
|
|
|
|
1;
|