| # -*-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; |