MAINTAINERCLEANFILES = Makefile.in .NOTPARALLEL: noinst_LIBRARIES = libutil.a # context and fclndir are build tools: the parsers' Makefiles run them to make # their tables, so they must run on the build host, not on the target (Error 127 # for a cross build, build/logs/mcde-nodocs-2026-11-14b.log). libutil.a is # linked into target programs too, so these are not automake programs: the # build host's compiler (the values come from AM_MAKEFLAGS in the top # Makefile.am) compiles them with the sources of libutil. HOSTUTIL_C = $(filter %.c,$(libutil_a_SOURCES)) EXTRA_DIST = context.c CLEANFILES = context fclndir hostobj libutil_host.a all-local: context fclndir libutil_host.a context: context.c $(HOSTUTIL_C) $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/context.c $(addprefix $(srcdir)/,$(HOSTUTIL_C)) $(LDFLAGS_FOR_BUILD) fclndir: context cp context fclndir # the same sources for the build host: the parser generators (build, # eltdef) link this archive, and its objects must be the host's (t0230) libutil_host.a: $(HOSTUTIL_C) $(RM) -rf hostobj $@ mkdir -p hostobj for f in $(HOSTUTIL_C); do \ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \ -I. -I$(srcdir) -c $(srcdir)/$$f -o hostobj/`basename $$f .c`.o \ || exit 1; \ done $(AR_FOR_BUILD) cru $@ hostobj/*.o $(RANLIB_FOR_BUILD) $@ libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \ triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \ conutil.c error.c exit.c itoa.c malloc.c openchk.c \ trie.c triecnt.c whitesp.c basic.h common.h \ dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h \ entext.h sref.h version.h # FIXME I think emptyfil.c and fclndir.c can be deleted?