2010-07-06 14:37:42 +08:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test the behaviour of the .PHONY target.";
|
|
|
|
|
|
|
|
$details = "";
|
|
|
|
|
|
|
|
|
|
|
|
# Ensure turning on .POSIX enables the -e flag for the shell
|
2010-07-19 15:10:53 +08:00
|
|
|
# We can't just use "false" because on different systems it provides a
|
|
|
|
# different exit code.
|
2010-07-06 14:37:42 +08:00
|
|
|
|
|
|
|
run_make_test(q!
|
|
|
|
.POSIX:
|
2010-07-19 15:10:53 +08:00
|
|
|
all: ; @r() { return 1; }; r; true
|
2010-07-06 14:37:42 +08:00
|
|
|
!,
|
|
|
|
'', "#MAKE#: *** [all] Error 1\n", 512);
|
|
|
|
|
|
|
|
# User settings must override .POSIX
|
|
|
|
|
|
|
|
run_make_test(q!
|
|
|
|
.SHELLFLAGS = -xc
|
|
|
|
.POSIX:
|
2010-07-19 15:10:53 +08:00
|
|
|
all: ; @r() { return 1; }; r; true
|
2010-07-06 14:37:42 +08:00
|
|
|
!,
|
2010-07-19 15:10:53 +08:00
|
|
|
'', "+ r\n+ return 1\n+ true\n");
|
2010-07-06 14:37:42 +08:00
|
|
|
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
|
|
1;
|