From b7a28feb2de95d5148a5918a8348047559f3c7ae Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 5 Dec 2023 23:05:17 -0500 Subject: [PATCH] Work around some ULTRIX make bugs. ULTRIX 4.5 make fails during rule lookup when it tries to build a target in a nonexistent directory that might have inference rules associated with it (i.e., ends with a defined suffix), for example: % echo 'nonexistent/baz.o: ;' | make -f - Directory nonexistent/: Make: Cannot open. Stop. We can work around this problem by using a prerequisite to create the output directory instead of trying to create it directly in the rule. Automake actually does this already for its own rules, so let's try to hook the same mechanism. Pull in similar fixes from dxcommon. --- Makefile.am | 15 ++++++++++----- common | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 87cf0bd..6888d83 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,7 @@ ACLOCAL_AMFLAGS = -I m4 -I common/m4 # For Gnulib MOSTLYCLEANFILES = EXTRA_LTLIBRARIES = +EXTRA_PROGRAMS = AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/lib -I$(top_srcdir)/lib \ @@ -37,13 +38,17 @@ noinst_DATA = $(MOFILES) nodist_include_HEADERS = src/config/cdecl.h src/config/cdecl.h: config.h src/cdecl.h $(DX_BASEDIR)/scripts/bake-config.awk - $(AM_V_GEN) $(MKDIR_P) $(@D) $(AM_V_at) $(AWK) -f $(DX_BASEDIR)/scripts/bake-config.awk \ config.h $(srcdir)/src/cdecl.h >$@-t $(AM_V_at) mv -f $@-t $@ EXTRA_DIST += $(DX_BASEDIR)/scripts/bake-config.awk CLEANFILES += src/config/cdecl.h +# Hack to get Automake to emit a dirstamp rule, and use it in src/config/cdecl.h. +src/config/cdecl.h: src/config/$(am__dirstamp) +EXTRA_PROGRAMS += src/config/gl-dirstamp +src_config_gl_dirstamp_SOURCES = + shared_gl_objects = $(gnulib_symfiles:.glsym=.lo) static_gl_objects = $(gnulib_extra_objects:.lo=.@OBJEXT@) @@ -141,9 +146,9 @@ XGETTEXT_OPTS = -D $(builddir) -D $(srcdir) --from-code=utf-8 \ --keyword=_ --keyword=N_ --keyword=PN_:1c,2 po/$(PACKAGE).pot: $(SOURCES) - $(AM_V_at) $(MKDIR_P) $(@D) - $(AM_V_GEN) $(XGETTEXT) $(XGETTEXT_OPTS) -o $@.tmp $(SOURCES) - $(AM_V_at) mv -f $@.tmp $@ + $(AM_V_GEN) $(MKDIR_P) po + $(AM_V_at) $(XGETTEXT) $(XGETTEXT_OPTS) -o $@.tmp $(SOURCES) + $(AM_V_at) mv -f $@.tmp $@ # These are required to prevent the builtin lex/yacc rules from # superseding ours... @@ -345,7 +350,7 @@ CLEANFILES += atlocal # refer to the just-installed .la file, rather than more typical library flags # (-Lfoo -lfoo). Otherwise libtool can pick up libcdecl.la from the current # working directory which defeats the point of an install check. -EXTRA_PROGRAMS = t/installcheck +EXTRA_PROGRAMS += t/installcheck t_installcheck_CPPFLAGS = -I$(DESTDIR)$(includedir) t_installcheck_LDADD = $(DESTDIR)$(libdir)/libcdecl.la t_installcheck_CFLAGS = diff --git a/common b/common index cc589a8..8c45dd9 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit cc589a8b1539e9515985081d9498dda2b6b6caf7 +Subproject commit 8c45dd9fec485578a09dbf541d4209dcf77acd5f -- 2.43.2