diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-28 14:51:53 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-28 14:51:53 -0600 |
| commit | 6b640055e224675dd92e3fc849504b7ccc19bf2f (patch) | |
| tree | 3400e1aea6ed73e920706dd09aabfeee4c1febd1 | |
| parent | 18e2f56fb315186276990d75ce6629a1b0fd9daf (diff) | |
| download | whoson-6b640055e224675dd92e3fc849504b7ccc19bf2f.tar.gz | |
Pass zopen's compiler through and find the listing formatter beside it
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | buildenv | 6 |
2 files changed, 5 insertions, 9 deletions
@@ -36,11 +36,7 @@ BINDIR = $(PREFIX)/bin # reports it through --version. VERSION = 1.1.0 CCDIR = /usr/lpp/IBM/cnw/v2r2/openxl/bin -CCNAME = ibm-clang -CC = $(CCDIR)/$(CCNAME) -# The listing formatter ships beside the compiler; the zopen buildenv overrides -# CCDIR/CCNAME, so the binary and the listing always use one toolchain. -LISTFMT = $(CCDIR)/ibm-clang-listing-formatter +CC = $(CCDIR)/ibm-clang CPPFLAGS = -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L -D_ALL_SOURCE \ -D_EXT -D_OPEN_SYS -D_OPEN_SYS_FILE_EXT \ -DWHOSON_VERSION=\"$(VERSION)\" @@ -61,7 +57,7 @@ whoson: whoson.c # disagree; whoson.json is the intermediate the formatter reads. list: $(CC) $(CPPFLAGS) $(CFLAGS) -mzos-listing=json -mzos-listing-file-name=whoson.json -o whoson whoson.c - $(LISTFMT) whoson.json > whoson.listing + "$$(dirname "$$(command -v $(CC))")/ibm-clang-listing-formatter" whoson.json > whoson.listing # CEE's heap checker catches overruns; RPTSTG prints the storage report at # exit, which is how leaks show up without a debugger. @@ -28,11 +28,11 @@ export ZOPEN_CONFIGURE="skip" # would replace them. The port only passes the compiler zopen detected. # These strings are eval'd at build time, when PATH and CC are set. export ZOPEN_MAKE_MINIMAL="1" -export ZOPEN_MAKE_OPTS='CCDIR="$(dirname "${CC:?zopen did not set CC}")" CCNAME="$(basename "${CC:?zopen did not set CC}")"' +export ZOPEN_MAKE_OPTS='CC="${CC:?zopen did not set CC}"' export ZOPEN_CHECK="make" -export ZOPEN_CHECK_OPTS='check CCDIR="$(dirname "${CC:?zopen did not set CC}")" CCNAME="$(basename "${CC:?zopen did not set CC}")"' +export ZOPEN_CHECK_OPTS='check CC="${CC:?zopen did not set CC}"' export ZOPEN_CHECK_MINIMAL="1" -export ZOPEN_INSTALL_OPTS='install CCDIR="$(dirname "${CC:?zopen did not set CC}")" CCNAME="$(basename "${CC:?zopen did not set CC}")" PREFIX=$ZOPEN_INSTALL_DIR' +export ZOPEN_INSTALL_OPTS='install CC="${CC:?zopen did not set CC}" PREFIX=$ZOPEN_INSTALL_DIR' export ZOPEN_INSTALL_MINIMAL="1" # `make check` runs the binary once: its only job is to prove the program |
