Files
mcde/util/tradcpp/Makefile.am
T
lotherk 855b8e0cb0 mcde: the host-tool variables are substituted even without in-tree Motif
util/tradcpp is built and run during every MCDE build, but configure only set
CC_FOR_BUILD/CFLAGS_FOR_BUILD/... inside the with_private_motif block.  With
--without-private-motif (the pkgsrc recipe) the Makefiles got empty values, and
AM_MAKEFLAGS then passed an explicit empty CC_FOR_BUILD down to the sub-makes --
clobbering the value pkgsrc's MAKE_FLAGS had given the top-level make.  tradcpp
was therefore compiled with the target compiler and could not run (build/logs/
userland-2026-11-14j.log:7715ff, and again in 14k after MAKE_FLAGS alone).

The defaults and AC_SUBSTs now stand before the Motif test (LIBS_FOR_BUILD stays
inside: it is Motif's -lXt), and the recipe gives configure the host compiler for
a cross build, since configure's own default is $CC, the target's.  tradcpp needs
no X library, so it no longer links LIBS_FOR_BUILD.
2026-11-14 06:55:24 +00:00

20 lines
770 B
Makefile

MAINTAINERCLEANFILES = Makefile.in
noinst_PROGRAMS = tradcpp
tradcpp_SOURCES = array.c directive.c files.c macro.h output.h \
utils.c array.h directive.h files.h main.c place.c utils.h \
bool.h eval.c inlinedefs.h mode.h place.h version.h config.h \
eval.h macro.c output.c union.h
# tradcpp is a build tool: it must run on the machine that builds MCDE, so it is
# compiled by the build host's compiler, not the target's (the values come from
# AM_MAKEFLAGS in the top Makefile.am and the pkgsrc recipe). Built for the
# target it cannot execute here: "/bin/sh: ../../../../util/tradcpp/tradcpp: not
# found" (build/logs/userland-2026-11-14j.log:7715ff).
tradcpp_CC = $(CC_FOR_BUILD)
tradcpp_CFLAGS = $(CFLAGS_FOR_BUILD)
tradcpp_LDFLAGS = $(LDFLAGS_FOR_BUILD)