3 $description = "Test the behaviour of the .POSIX target.";
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
12 my $script = 'false; true';
14 my $out = `/bin/sh $flags '$script' 2>&1`;
20 '', "#MAKEFILE#:3: recipe for target 'all' failed
21 #MAKE#: *** [all] Error $err\n", 512);
23 # User settings must override .POSIX
25 $out = `/bin/sh $flags '$script' 2>&1`;
33 # Test the default value of various POSIX-specific variables
34 my %POSIX = (AR => 'ar', ARFLAGS => '-rv',
35 YACC => 'yacc', YFLAGS => '',
36 LEX => 'lex', LFLAGS => '',
38 CC => 'c99', CFLAGS => '-O',
39 FC => 'fort77', FFLAGS => '-O 1',
40 GET => 'get', GFLAGS => '',
41 SCCSFLAGS => '', SCCSGETFLAGS => '-s');
42 my $make = join('', map { "\t\@echo '$_=\$($_)'\n" } sort keys %POSIX);
43 my $r = join('', map { "$_=$POSIX{$_}\n"} sort keys %POSIX);
51 # Make sure that local settings take precedence
52 %extraENV = map { $_ => "xx-$_" } keys %POSIX;
53 $r = join('', map { "$_=xx-$_\n"} sort keys %POSIX);
54 run_make_test(undef, '', $r);
56 # This tells the test driver that the perl test script executed properly.