| 1 |
# -*-perl-*- |
| 2 |
|
| 3 |
$description = "The following test creates a makefile to override part\n" |
| 4 |
."of one Makefile with Another Makefile with the .DEFAULT\n" |
| 5 |
."rule."; |
| 6 |
|
| 7 |
$details = "This tests the use of the .DEFAULT special target to say that \n" |
| 8 |
."to remake any target that cannot be made fram the information\n" |
| 9 |
."in the containing makefile, make should look in another makefile\n" |
| 10 |
."This test gives this makefile the target bar which is not \n" |
| 11 |
."defined here but passes the target bar on to another makefile\n" |
| 12 |
."which does have the target bar defined.\n"; |
| 13 |
|
| 14 |
create_file('defsub.mk', q! |
| 15 |
bar: ; @echo Executing rule BAR |
| 16 |
!); |
| 17 |
|
| 18 |
run_make_test(q! |
| 19 |
foo:; @echo Executing rule FOO |
| 20 |
|
| 21 |
.DEFAULT: ; @$(MAKE) -f defsub.mk $@ |
| 22 |
!, |
| 23 |
'bar',"#MAKE#[1]: Entering directory '#PWD#'\n" |
| 24 |
. "Executing rule BAR\n" |
| 25 |
. "#MAKE#[1]: Leaving directory '#PWD#'\n"); |
| 26 |
|
| 27 |
unlink('defsub.mk'); |
| 28 |
|
| 29 |
1; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|