File: dash-I

package info (click to toggle)
gridengine 8.1.9%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 56,880 kB
  • sloc: ansic: 432,689; java: 87,068; cpp: 31,958; sh: 29,429; jsp: 7,757; perl: 6,336; xml: 5,828; makefile: 4,701; csh: 3,928; ruby: 2,221; tcl: 1,676; lisp: 669; yacc: 519; python: 503; lex: 361; javascript: 200
file content (59 lines) | stat: -rw-r--r-- 1,617 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#                                                                    -*-perl-*-

$description ="The following test creates a makefile to test the -I option.";

$details = "\
This test tests the -I option by including a filename in
another directory and giving make that directory name
under -I in the command line.  Without this option, the make
would fail to find the included file.  It also checks to make
sure that the -I option gets passed to recursive makes.";

$makefile2 = &get_tmpfile;

open(MAKEFILE,"> $makefile");

# The Contents of the MAKEFILE ...

$mf2 = substr ($makefile2, index ($makefile2, $pathsep) + 1);
print MAKEFILE <<EOF;
include $mf2
all:
\t\@echo There should be no errors for this makefile.
EOF

# END of Contents of MAKEFILE

close(MAKEFILE);


open(MAKEFILE,"> $makefile2");

print MAKEFILE <<EOF;
ANOTHER:
\t\@echo This is another included makefile
recurse:
\t\$(MAKE) ANOTHER -f $makefile
EOF

close(MAKEFILE);

&run_make_with_options($makefile,"-I $workdir all",&get_logfile);

# Create the answer to what should be produced by this Makefile
$answer = "There should be no errors for this makefile.\n";
&compare_output($answer,&get_logfile(1));


$answer = "This is another included makefile\n";
&run_make_with_options($makefile,"-I $workdir ANOTHER",&get_logfile);
&compare_output($answer,&get_logfile(1));


$answer = "$mkpath ANOTHER -f $makefile
${make_name}[1]: Entering directory `$pwd'
This is another included makefile
${make_name}[1]: Leaving directory `$pwd'\n";

&run_make_with_options($makefile,"-I $workdir recurse",&get_logfile);
&compare_output($answer,&get_logfile(1));