1#                                                                    -*-perl-*-
2
3$description = "Test the MAKEFILE_LIST variable.";
4
5$makefile2 = &get_tmpfile;
6
7open(MAKEFILE,"> $makefile");
8print MAKEFILE <<EOF;
9m1 := \$(MAKEFILE_LIST)
10include $makefile2
11m3 := \$(MAKEFILE_LIST)
12
13all:
14\t\@echo \$(m1)
15\t\@echo \$(m2)
16\t\@echo \$(m3)
17EOF
18close(MAKEFILE);
19
20
21open(MAKEFILE,"> $makefile2");
22print MAKEFILE "m2 := \$(MAKEFILE_LIST)\n";
23close(MAKEFILE);
24
25
26&run_make_with_options($makefile, "", &get_logfile);
27$answer = "$makefile\n$makefile $makefile2\n$makefile $makefile2\n";
28&compare_output($answer,&get_logfile(1));
29
301;
31