VirtualBox

source: kBuild/trunk/src/gmake/tests/scripts/options/dash-I@ 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: 1.5 KB
Line 
1$description ="The following test creates a makefile to test the -I option.";
2
3$details = "\
4This test tests the -I option by including a filename in
5another directory and giving make that directory name
6under -I in the command line. Without this option, the make
7would fail to find the included file. It also checks to make
8sure that the -I option gets passed to recursive makes.";
9
10$makefile2 = &get_tmpfile;
11
12open(MAKEFILE,"> $makefile");
13
14# The Contents of the MAKEFILE ...
15
16$mf2 = substr ($makefile2, index ($makefile2, $pathsep) + 1);
17print MAKEFILE <<EOF;
18include $mf2
19all:
20\t\@echo There should be no errors for this makefile.
21EOF
22
23# END of Contents of MAKEFILE
24
25close(MAKEFILE);
26
27
28open(MAKEFILE,"> $makefile2");
29
30print MAKEFILE <<EOF;
31ANOTHER:
32\t\@echo This is another included makefile
33recurse:
34\t\$(MAKE) ANOTHER -f $makefile
35EOF
36
37close(MAKEFILE);
38
39&run_make_with_options($makefile,"-I $workdir all",&get_logfile);
40
41# Create the answer to what should be produced by this Makefile
42$answer = "There should be no errors for this makefile.\n";
43&compare_output($answer,&get_logfile(1));
44
45
46$answer = "This is another included makefile\n";
47&run_make_with_options($makefile,"-I $workdir ANOTHER",&get_logfile);
48&compare_output($answer,&get_logfile(1));
49
50
51$answer = "$mkpath ANOTHER -f $makefile
52${make_name}[1]: Entering directory `$pwd'
53This is another included makefile
54${make_name}[1]: Leaving directory `$pwd'\n";
55
56&run_make_with_options($makefile,"-I $workdir recurse",&get_logfile);
57&compare_output($answer,&get_logfile(1));
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