2013-09-19 13:15:22 +08:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test the -w option to GNU make.";
|
|
|
|
|
|
|
|
# Simple test without -w
|
|
|
|
run_make_test(q!
|
|
|
|
all: ; @echo hi
|
|
|
|
!,
|
|
|
|
"", "hi\n");
|
|
|
|
|
|
|
|
# Simple test with -w
|
|
|
|
run_make_test(undef, "-w",
|
|
|
|
"#MAKE#: Entering directory '#PWD#'\nhi\n#MAKE#: Leaving directory '#PWD#'\n");
|
|
|
|
|
|
|
|
# Test makefile rebuild to ensure no enter/leave
|
|
|
|
run_make_test(q!
|
|
|
|
include foo
|
|
|
|
all: ;@:
|
|
|
|
foo: ; touch foo
|
|
|
|
!,
|
2016-04-10 07:49:27 +08:00
|
|
|
"", "touch foo\n");
|
2013-09-19 13:15:22 +08:00
|
|
|
unlink('foo');
|
|
|
|
|
|
|
|
# Test makefile rebuild with -w
|
|
|
|
run_make_test(q!
|
|
|
|
include foo
|
|
|
|
all: ;@:
|
|
|
|
foo: ; touch foo
|
|
|
|
!,
|
2016-04-10 07:49:27 +08:00
|
|
|
"-w", "#MAKE#: Entering directory '#PWD#'\ntouch foo\n#MAKE#: Leaving directory '#PWD#'\n");
|
2013-09-19 13:15:22 +08:00
|
|
|
unlink('foo');
|
|
|
|
|
|
|
|
1;
|