VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/features/mult_targets@ 969

Last change on this file since 969 was 969, checked in by bird, 18 years ago

Fixing some svn props.

  • Property svn:eol-style set to LF
File size: 1.3 KB
Line 
1$description = "The following test creates a makefile to test that a \n "
2 ."rule with multiple targets is equivalent to writing \n"
3 ."many rules, each with one target, and all identical aside\n"
4 ."from that.";
5
6$details = "A makefile is created with one rule and two targets. Make \n"
7 ."is called twice, once for each target, and the output which \n"
8 ."contains the target name with \$@ is looked at for the changes.\n"
9 ."This test also tests the substitute function by replacing \n"
10 ."the word output with nothing in the target name giving either\n"
11 ."an output of \"I am little\" or \"I am big\"";
12
13open(MAKEFILE,"> $makefile");
14
15# The Contents of the MAKEFILE ...
16
17print MAKEFILE "bigoutput littleoutput: test.h\n";
18print MAKEFILE "\t\@echo I am \$(subst output,,\$@)\n";
19
20# END of Contents of MAKEFILE
21
22close(MAKEFILE);
23
24&touch("test.h");
25
26&run_make_with_options($makefile,"bigoutput",&get_logfile);
27
28
29# Create the answer to what should be produced by this Makefile
30$answer = "I am big\n";
31
32&compare_output($answer,&get_logfile(1));
33
34&run_make_with_options($makefile,"littleoutput",&get_logfile);
35$answer = "I am little\n";
36&compare_output($answer,&get_logfile(1));
37
38unlink "test.h";
39
401;
41
42
43
44
45
46
Note: See TracBrowser for help on using the repository browser.

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