I have reproduced this, and opened internal Rocket ticket USSP-961 to track it.
The problem as I see it is that make
is not respecting the file tag on existing files. All Unix programs on z/OS should respect file tags, as long as _BPXK_AUTOCVT=ON
is specified. All Rocket ported tools are moving to ASCII internally (which improves the compatibility of behaviour with other Unix systems, especially for tools like Python and perl, where there are large library ecosystems). As a result, most tools will produce ASCII-tagged files by default. In this case, it should be possible to force a file to be encoded as EBCDIC, as illustrated in this Makefile. However, the tag is NOT being respected in particular, the tag is not changed, but the content is always written in ASCII, regardless of the tag.
# Note: If you cut and paste this, you must replace 8 leading spaces with
# tabs to get a valid Makefile
OUTPUT_FILES = file_list file_list_ebcdic file_list_ascii
default: $(OUTPUT_FILES)
ALL_FILES = source1 source2
file_list:
$(file >$@,$(ALL_FILES))
ls -lT $@
file_list_ascii:
touch $@; chtag -tc819 $@
$(file >$@,$(ALL_FILES))
ls -lT $@
file_list_ebcdic:
touch $@; chtag -tc1047 $@
$(file >$@,$(ALL_FILES))
ls -lT $@
clean:
rm -f $(OUTPUT_FILES)