VirtualBox

source: kBuild/branches/GNU/src/gmake/tests/scripts/features/include@ 280

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

Initial revision

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1# -*-mode: perl; rm-trailing-spaces: nil-*-
2
3$description = "Test various forms of the GNU make `include' command.";
4
5$details = "Test include, -include, sinclude and various regressions involving them.
6Test extra whitespace at the end of the include, multiple -includes and
7sincludes (should not give an error) and make sure that errors are reported
8for targets that were also -included.";
9
10$makefile2 = &get_tmpfile;
11
12open(MAKEFILE,"> $makefile");
13
14# The contents of the Makefile ...
15
16print MAKEFILE <<EOF;
17\#Extra space at the end of the following file name
18include $makefile2
19all: ; \@echo There should be no errors for this makefile.
20
21-include nonexistent.mk
22-include nonexistent.mk
23sinclude nonexistent.mk
24sinclude nonexistent-2.mk
25-include makeit.mk
26sinclude makeit.mk
27
28error: makeit.mk
29EOF
30
31close(MAKEFILE);
32
33
34open(MAKEFILE,"> $makefile2");
35
36print MAKEFILE "ANOTHER: ; \@echo This is another included makefile\n";
37
38close(MAKEFILE);
39
40# Create the answer to what should be produced by this Makefile
41&run_make_with_options($makefile, "all", &get_logfile);
42$answer = "There should be no errors for this makefile.\n";
43&compare_output($answer, &get_logfile(1));
44
45&run_make_with_options($makefile, "ANOTHER", &get_logfile);
46$answer = "This is another included makefile\n";
47&compare_output($answer, &get_logfile(1));
48
49# Try to build the "error" target; this will fail since we don't know
50# how to create makeit.mk, but we should also get a message (even though
51# the -include suppressed it during the makefile read phase, we should
52# see one during the makefile run phase).
53
54# The fix to this caused more problems than the error, so I removed it.
55# pds -- 22 Jan 2000
56
57#&run_make_with_options($makefile, "error", &get_logfile, 512);
58#$answer = "$make_name: *** No rule to make target `makeit.mk', needed by `error'.\n";
59#&compare_output($answer, &get_logfile(1));
60
611;
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