File: MAKEFILES

package info (click to toggle)
make-doc-non-dfsg 4.4.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 9,632 kB
  • sloc: ansic: 31,255; sh: 5,213; perl: 1,612; makefile: 160; lisp: 26; sed: 16
file content (47 lines) | stat: -rw-r--r-- 924 bytes parent folder | download | duplicates (8)
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
#                                                                    -*-perl-*-

$description = "Test the MAKEFILES variable.";

$makefile2 = &get_tmpfile;
$makefile3 = &get_tmpfile;

open(MAKEFILE,"> $makefile2");
print MAKEFILE <<EOF;
M2 = m2
NDEF: ; \@echo RULE FROM MAKEFILE 2
EOF
close(MAKEFILE);


open(MAKEFILE,"> $makefile3");
print MAKEFILE <<EOF;
M3 = m3
NDEF3: ; \@echo RULE FROM MAKEFILE 3
EOF
close(MAKEFILE);

run_make_test(q!
all: ; @echo DEFAULT RULE: M2=$(M2) M3=$(M3)
!,
              ["MAKEFILES=$makefile2 $makefile3"], "DEFAULT RULE: M2=m2 M3=m3\n");

# TEST 2: Verify that included makefiles don't set the default goal.
# See Savannah bug #13401.

create_file('xx-inc.mk', '
include_goal: ; @echo $@
include xx-ind.mk
');

create_file('xx-ind.mk', '
indirect_goal: ; @echo $@
');

run_make_test(q!
top: ; @echo $@
!,
              'MAKEFILES=xx-inc.mk', "top\n");

unlink(qw(xx-inc.mk xx-ind.mk));

1;