xref: /netbsd-src/external/gpl2/gmake/dist/tests/scripts/features/override (revision 69606e3f5c9388e52aed8c120ad63c049ca45d8f)
1*69606e3fSchristos$description = "The following test creates a makefile to ...";
2*69606e3fSchristos
3*69606e3fSchristos$details = "";
4*69606e3fSchristos
5*69606e3fSchristosopen(MAKEFILE,"> $makefile");
6*69606e3fSchristos
7*69606e3fSchristos# The Contents of the MAKEFILE ...
8*69606e3fSchristos
9*69606e3fSchristosprint MAKEFILE "override define foo\n"
10*69606e3fSchristos              ."\@echo First comes the definition.\n"
11*69606e3fSchristos              ."\@echo Then comes the override.\n"
12*69606e3fSchristos              ."endef\n"
13*69606e3fSchristos              ."all: \n"
14*69606e3fSchristos              ."\t\$(foo)\n";
15*69606e3fSchristos
16*69606e3fSchristos# END of Contents of MAKEFILE
17*69606e3fSchristos
18*69606e3fSchristosclose(MAKEFILE);
19*69606e3fSchristos
20*69606e3fSchristos&run_make_with_options($makefile,"foo=Hello",&get_logfile);
21*69606e3fSchristos
22*69606e3fSchristos# Create the answer to what should be produced by this Makefile
23*69606e3fSchristos$answer = "First comes the definition.\n"
24*69606e3fSchristos         ."Then comes the override.\n";
25*69606e3fSchristos
26*69606e3fSchristos&compare_output($answer,&get_logfile(1));
27*69606e3fSchristos
28*69606e3fSchristos1;
29*69606e3fSchristos
30*69606e3fSchristos
31*69606e3fSchristos
32*69606e3fSchristos
33*69606e3fSchristos
34*69606e3fSchristos
35