| Line | |
|---|
| 1 | # -*-perl-*-
|
|---|
| 2 |
|
|---|
| 3 | $description = "Test the behaviour of the .PHONY target.";
|
|---|
| 4 |
|
|---|
| 5 | $details = "";
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | # Ensure turning on .POSIX enables the -e flag for the shell
|
|---|
| 9 | # We can't assume the exit value of "false" because on different systems it's
|
|---|
| 10 | # different.
|
|---|
| 11 |
|
|---|
| 12 | my $script = 'false; true';
|
|---|
| 13 | my $flags = '-ec';
|
|---|
| 14 | my $out = `/bin/sh $flags '$script' 2>&1`;
|
|---|
| 15 | my $err = $? >> 8;
|
|---|
| 16 | run_make_test(qq!
|
|---|
| 17 | .POSIX:
|
|---|
| 18 | all: ; \@$script
|
|---|
| 19 | !,
|
|---|
| 20 | '', "#MAKE#: *** [all] Error $err\n", 512);
|
|---|
| 21 |
|
|---|
| 22 | # User settings must override .POSIX
|
|---|
| 23 | $flags = '-xc';
|
|---|
| 24 | $out = `/bin/sh $flags '$script' 2>&1`;
|
|---|
| 25 | run_make_test(qq!
|
|---|
| 26 | .SHELLFLAGS = $flags
|
|---|
| 27 | .POSIX:
|
|---|
| 28 | all: ; \@$script
|
|---|
| 29 | !,
|
|---|
| 30 | '', $out);
|
|---|
| 31 |
|
|---|
| 32 | # This tells the test driver that the perl test script executed properly.
|
|---|
| 33 | 1;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.