VirtualBox

source: kBuild/trunk/src/gmake/tests/scripts/options/dash-C@ 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.4 KB
Line 
1$description = "The following test creates a makefile to test the -C dir \n"
2 ."option in make. This option tells make to change to \n"
3 ."directory dir before reading the makefile.";
4
5$details = "This test is similar to the clean test except that this test\n"
6 ."creates the file to delete in the work directory instead of\n"
7 ."the current directory. Make is called from another directory\n"
8 ."using the -C workdir option so that it can both find the \n"
9 ."makefile and the file to delete in the work directory. ";
10
11$example = $workdir . $pathsep . "EXAMPLE_FILE";
12
13open(MAKEFILE,"> $makefile");
14
15# The Contents of the MAKEFILE ...
16
17print MAKEFILE "all: \n";
18print MAKEFILE "\t\@echo This makefile did not clean the dir ... good\n";
19print MAKEFILE "clean: \n";
20print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
21
22# END of Contents of MAKEFILE
23
24close(MAKEFILE);
25
26&touch($example);
27
28&run_make_with_options("${testname}.mk",
29 "-C $workdir clean",
30 &get_logfile);
31
32chdir $workdir;
33$wpath = &get_this_pwd;
34chdir $pwd;
35
36# Create the answer to what should be produced by this Makefile
37$answer = "$make_name: Entering directory `$wpath'\n"
38 . "$delete_command EXAMPLE_FILE\n"
39 . "$make_name: Leaving directory `$wpath'\n";
40
41&compare_output($answer,&get_logfile(1));
42
43if (-f $example)
44{
45 $test_passed = 0;
46}
47
481;
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