mirror of
https://github.com/mirror/make.git
synced 2026-09-05 06:12:55 +08:00
[SV 62654] Support GNU Make on z/OS
Original patches provided by Igor Todorovski <itodorov@ca.ibm.com> Reworked by Paul Smith <psmith@gnu.org>. Thanks to IBM for providing a test system. * NEWS: Announce support. * AUTHORS: Ditto. * README.zOS: Provide details on building GNU Make on z/OS. * build.sh (get_mk_var): z/OS sh has a strange bug which causes it to generate extra lines of output: rework the function to print output as we compute it instead of collecting it into a variable, which works around this bug. * src/makeint.h: Declare MK_OS_ZOS if we're building for z/OS. * src/arscan.c: Don't include <ar.h> on z/OS. * src/job.c: We can't change environ in ASCII mode on z/OS. * src/main.c: Ditto. Also we can't use pselect() on z/OS. * src/posixos.c: pselect() seems to hang on z/OS: don't use it. * tests/run_make_tests.pl: Handle different exit codes on z/OS. * tests/test_driver.pl: Preserve some special z/OS env.vars. Add special checks to output comparisons when on z/OS. * tests/scripts/features/archives: Don't validate names. Don't try to compile empty files as IBM compilers complain. * tests/scripts/features/shell_assignment: Fix octal value of #. * tests/scripts/features/temp_stdin: Don't print "term". * tests/scripts/functions/shell: Handle shell exit codes. * tests/scripts/targets/ONESHELL: Ditto. * tests/scripts/targets/POSIX: sh -x prints differently. * tests/scripts/variables/SHELL: Ditto.
This commit is contained in:
@@ -66,8 +66,8 @@ one two:;@echo "$@: $(SHELL) $$SHELL"
|
||||
|
||||
# Test .SHELLFLAGS
|
||||
|
||||
# We don't know the output here: on Solaris for example, every line printed
|
||||
# by the shell in -x mode has a trailing space (!!)
|
||||
# We don't know the output here: on some systems, for example, every line
|
||||
# printed by the shell in -x mode has a trailing space!
|
||||
my $script = 'true; true';
|
||||
my $flags = '-xc';
|
||||
my $out = `$sh_name $flags '$script' 2>&1`;
|
||||
@@ -94,10 +94,14 @@ all: ; \@$script
|
||||
'', $out);
|
||||
}
|
||||
|
||||
$script = subst_make_string('true; #HELPER# -q fail 1; true');
|
||||
$flags = '-xec';
|
||||
$out = `$sh_name $flags '$script' 2>&1`;
|
||||
|
||||
run_make_test(qq!
|
||||
.SHELLFLAGS = -xec
|
||||
all: ; \@true; #HELPER# -q fail 1; true
|
||||
.SHELLFLAGS = $flags
|
||||
all: ; \@$script
|
||||
!,
|
||||
'', "+ true\n+ #HELPER# -q fail 1\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n", 512);
|
||||
'', "${out}#MAKE#: *** [#MAKEFILE#:3: all] Error 1", 512);
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user