From 5ae2fd5298d9c40f28ffcad764f1f1cf3489ff16 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 13 Mar 2022 12:34:36 -0700 Subject: [PATCH] Switch from recursive to non-recursive use of Gnulib. This allows for better use of dependencies in Makefiles. It causes a new warning from Automake, which I hope to fix through a change to Gnulib sometime soon. I'm consulting the other Gnulib maintainers on that: https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00044.html --- Makefile.am | 11 +++++++---- Smake | 4 +++- configure.ac | 2 +- po/automake.mk | 5 +++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 98e8573669..1c345a1441 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ AUTOMAKE_OPTIONS = std-options check-news 1.14 subdir-objects -SUBDIRS = gl po +SUBDIRS = po DISTCLEANFILES = ./po/stamp-po xconfigure BUILT_SOURCES = built-sources: $(BUILT_SOURCES) @@ -38,6 +38,10 @@ pkgsysconfdir = $(sysconfdir)/$(PACKAGE) EXTRA_DIST = ONEWS CLEANFILES = +MOSTLYCLEANDIRS = +MOSTLYCLEANFILES = +MAINTAINERCLEANFILES = + CLEAN_LOCAL = ALL_LOCAL = CHECK_LOCAL = @@ -55,9 +59,6 @@ PHONY = SUFFIXES = LDADD = gl/libgl.la -gl/libgl.la: config.h - $(MAKE) -C gl - # This ensures that files added to EXTRA_DIST are always distributed, # even if they are inside an Automake if...endif conditional block that is # disabled by some particular "configure" run. For more information, see: @@ -74,8 +75,10 @@ generate-changelog: DIST_HOOKS += generate-changelog +GL_CFLAG_GNULIB_WARNINGS = -Wno-missing-prototypes -Wno-unused-parameter include $(top_srcdir)/build-aux/automake.mk +include $(top_srcdir)/gl/automake.mk include $(top_srcdir)/po/automake.mk include $(top_srcdir)/lib/automake.mk include $(top_srcdir)/examples/automake.mk diff --git a/Smake b/Smake index 0b64221ca2..597baea4f2 100644 --- a/Smake +++ b/Smake @@ -336,7 +336,8 @@ prep_ph: touch build-aux/config.rpath $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \ --source-base=gl --lib=libgl --tests-base=tests \ - --doc-base=gl/doc --aux-dir=build-aux \ + --doc-base=gl/doc --aux-dir=build-aux \ + --makefile-name=automake.mk --automake-subdir \ --libtool $(GNULIB_MODULES) if (glibtoolize --version) >/dev/null 2>&1; then \ LIBTOOLIZE=glibtoolize; \ @@ -404,6 +405,7 @@ clean: clean-icons rm -f config.h.in~ rm -f config.h.in rm -f gl/Makefile.in + rm -f gl/automake.mk rm -f Makefile.in rm -f build-aux/compile rm -f build-aux/ltmain.sh diff --git a/configure.ac b/configure.ac index 67a37f9fab..6d2aeda974 100644 --- a/configure.ac +++ b/configure.ac @@ -312,7 +312,7 @@ dnl it can make arrangements to build the documentation examples. AM_CONDITIONAL(cross_compiling, test x"$cross_compiling" = x"yes" ) AC_CONFIG_FILES( - [Makefile gl/Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm]) + [Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm]) AC_CONFIG_COMMANDS([doc/pspp-figures/dummy], [:]) diff --git a/po/automake.mk b/po/automake.mk index 6c465a183e..5d207682c3 100644 --- a/po/automake.mk +++ b/po/automake.mk @@ -94,12 +94,13 @@ install-data-hook: $(GMOFILES) $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \ done -uninstall-hook: +uninstall-hook: uninstall-gmofiles +uninstall-gmofiles: for f in $(GMOFILES); do \ lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \ rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \ done - +.PHONY: uninstall-gmofiles EXTRA_DIST += \ $(LOCALPOFILES) \ -- 2.30.2