This commit was manufactured by cvs2svn to create tag
[kbuild-mirror.git] / src / gmake / tests / scripts / functions / substitution
blob9280dbbaff1da9b2da6e8ff8018dfdbf05703023
1 $description = "The following test creates a makefile to ...";
3 $details = "";
5 open(MAKEFILE,"> $makefile");
7 # The Contents of the MAKEFILE ...
9 print MAKEFILE "foo := a.o b.o c.o\n"
10               ."bar := \$(foo:.o=.c)\n"
11               ."bar2:= \$(foo:%.o=%.c)\n"
12               ."bar3:= \$(patsubst %.c,%.o,x.c.c bar.c)\n"
13               ."all:\n"
14               ."\t\@echo \$(bar)\n"
15               ."\t\@echo \$(bar2)\n"
16               ."\t\@echo \$(bar3)\n";
18 # END of Contents of MAKEFILE
20 close(MAKEFILE);
22 &run_make_with_options($makefile,"",&get_logfile);
24 # Create the answer to what should be produced by this Makefile
25 $answer = "a.c b.c c.c\n"
26          ."a.c b.c c.c\n"
27          ."x.c.o bar.o\n";
29 &compare_output($answer,&get_logfile(1));