VirtualBox

source: kBuild/trunk/src/gmake/tests/scripts/functions/substitution@ 53

Last change on this file since 53 was 53, checked in by bird, 21 years ago

Initial revision

  • Property svn:eol-style set to native
File size: 752 bytes
Line 
1$description = "The following test creates a makefile to ...";
2
3$details = "";
4
5open(MAKEFILE,"> $makefile");
6
7# The Contents of the MAKEFILE ...
8
9print 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";
17
18# END of Contents of MAKEFILE
19
20close(MAKEFILE);
21
22&run_make_with_options($makefile,"",&get_logfile);
23
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";
28
29&compare_output($answer,&get_logfile(1));
30
311;
32
33
34
35
36
37
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette