VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/targets/POSIX@ 2591

Last change on this file since 2591 was 2591, checked in by bird, 13 years ago

kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.

File size: 788 bytes
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
12my $script = 'false; true';
13my $flags = '-ec';
14my $out = `/bin/sh $flags '$script' 2>&1`;
15my $err = $? >> 8;
16run_make_test(qq!
17.POSIX:
18all: ; \@$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`;
25run_make_test(qq!
26.SHELLFLAGS = $flags
27.POSIX:
28all: ; \@$script
29!,
30 '', $out);
31
32# This tells the test driver that the perl test script executed properly.
331;
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette