summaryrefslogtreecommitdiff
path: root/tests/scripts/targets/DEFAULT
blob: 955c5608a150404d15288abaa64beebaf8b79f1d (plain)
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
#                                                                    -*-perl-*-

$description = "The following test creates a makefile to override part\n"
              ."of one Makefile with Another Makefile with the .DEFAULT\n"
              ."rule.";

$details = "This tests the use of the .DEFAULT special target to say that \n"
          ."to remake any target that cannot be made fram the information\n"
          ."in the containing makefile, make should look in another makefile\n"
          ."This test gives this makefile the target bar which is not \n"
          ."defined here but passes the target bar on to another makefile\n"
          ."which does have the target bar defined.\n";

create_file('defsub.mk', q!
bar: ; @echo Executing rule BAR
!);

run_make_test(q!
foo:; @echo Executing rule FOO

.DEFAULT: ; @$(MAKE) -f defsub.mk $@
!,
                       'bar',"#MAKE#[1]: Entering directory '#PWD#'\n"
                       . "Executing rule BAR\n"
                       . "#MAKE#[1]: Leaving directory '#PWD#'\n");

unlink('defsub.mk');

1;