make/tests/scripts/targets/POSIX
Paul Smith fba20a776d - Many fixup patches from Savannah.
- Fix the test suite on Solaris (from Boris)
- Update the manual for .ONESHELL
2010-07-19 07:10:53 +00:00

28 lines
678 B
Perl

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