- Many fixup patches from Savannah.
[make/kirr.git] / tests / scripts / targets / POSIX
blob1b57448d358ca96a0867649160bcfa8804dd8c56
1 #                                                                    -*-perl-*-
3 $description = "Test the behaviour of the .PHONY target.";
5 $details = "";
8 # Ensure turning on .POSIX enables the -e flag for the shell
9 # We can't just use "false" because on different systems it provides a
10 # different exit code.
12 run_make_test(q!
13 .POSIX:
14 all: ; @r() { return 1; }; r; true
16               '', "#MAKE#: *** [all] Error 1\n", 512);
18 # User settings must override .POSIX
20 run_make_test(q!
21 .SHELLFLAGS = -xc
22 .POSIX:
23 all: ; @r() { return 1; }; r; true
25               '', "+ r\n+ return 1\n+ true\n");
27 # This tells the test driver that the perl test script executed properly.