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