]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Support "make dist" without prior "make".
authorBruno Haible <bruno@clisp.org>
Mon, 22 Jul 2024 11:25:14 +0000 (13:25 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 22 Jul 2024 11:25:14 +0000 (13:25 +0200)
This is required by the GNU Coding Standards
<https://www.gnu.org/prep/standards/html_node/Standard-Targets.html>.

Reported by <nroycea+gnu@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-07/msg00010.html>.

* Makefile.am (distdir1): New target.
* configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-runtime/Makefile.am (distdir1, gen-man1): New targets.
* gettext-runtime/configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-tools/Makefile.am (programs-for-distdir, distdir1, gen-man1,
distdir2): New targets.
* gettext-tools/configure.ac: Apply FIX_MAKEFILE_DISTRIB on Makefile.
* gettext-tools/src/Makefile.am (built-sources): New target.

Makefile.am
configure.ac
gettext-runtime/Makefile.am
gettext-runtime/configure.ac
gettext-tools/Makefile.am
gettext-tools/configure.ac
gettext-tools/src/Makefile.am

index 4e2ad11280d523dad711bfebba20fbd102be5d9f..5eacee01bf7845e92d33ae1f8b0acf19eab50a4b 100644 (file)
@@ -104,6 +104,18 @@ dist-hook: gen-ChangeLogs
        echo $(VERSION) > $(distdir)/.tarball-version
 
 
+# Support for "make dist" without prior "make".
+
+# Ensure that the prerequisites of gettext-tools/src are built when "make dist"
+# runs.
+# Hidden from automake, but really activated. Works around an automake bug.
+#distdir: distdir1
+.PHONY: distdir1
+distdir1:
+       cd gettext-runtime/intl && $(MAKE) $(AM_MAKEFLAGS)
+       cd libtextstyle && $(MAKE) $(AM_MAKEFLAGS)
+
+
 # Generate ChangeLog.
 
 gen_start_date = 2015-10-13
index f4e54ea6b0c010bd19c229797f5ebd4954437b3e..51066769554dcb473bb0ade10ad7cc54587d648a 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the toplevel directory of GNU gettext
-dnl Copyright (C) 1995-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
 dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -51,7 +51,8 @@ dnl Optional Packages: AC_ARG_WITH calls
 dnl Some influential environment variables: AC_ARG_VAR calls
 esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile],
+                [FIX_MAKEFILE_DISTRIB])
 
 AC_CONFIG_FILES([gnulib-local/Makefile])
 
index 0a8e7d9d5ccc4ec2f41b408b0346963567983955..958e2e57ce1c22a5cc237e740f6cbfdfe526c033 100644 (file)
@@ -1,6 +1,5 @@
 ## Makefile for the gettext-runtime directory of GNU gettext
-## Copyright (C) 1995-2006, 2010, 2012-2016, 2018-2019 Free Software Foundation,
-## Inc.
+## Copyright (C) 1995-2024 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -47,6 +46,23 @@ EXTRA_DIST += gnulib-m4/gnulib-cache.m4
 EXTRA_DIST += INSTALL.windows
 
 
+# Support for "make dist" without prior "make".
+
+# Ensure that the manual pages are up-to-date when "make dist" runs.
+# Hidden from automake, but really activated. Works around an automake bug.
+#distdir: distdir1
+.PHONY: distdir1
+distdir1: man/gettext.1 man/ngettext.1 man/envsubst.1
+man/gettext.1 man/ngettext.1 man/envsubst.1: gen-man1
+.PHONY: gen-man1
+gen-man1: src/gettext.c man/gettext.x \
+          src/ngettext.c man/ngettext.x \
+          src/envsubst.c man/envsubst.x
+       cd gnulib-lib && $(MAKE) $(AM_MAKEFLAGS)
+       cd src && $(MAKE) $(AM_MAKEFLAGS) gettext$(EXEEXT) ngettext$(EXEEXT) envsubst$(EXEEXT)
+       cd man && $(MAKE) $(AM_MAKEFLAGS) gettext.1 ngettext.1 envsubst.1
+
+
 maintainer-update-po: $(top_builddir)/config.status
        $(SHELL) ./config.status --recheck
        $(SHELL) ./config.status po/Makefile.in po-directories
index 93d615785bd3ee436308f201ae987d5bcccc7a81..da6b5e136cf97da2632a1a54575ac0912e954fcb 100644 (file)
@@ -197,7 +197,8 @@ AC_CONFIG_SUBDIRS([intl])
 
 AC_CONFIG_SUBDIRS([libasprintf])
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile],
+                [FIX_MAKEFILE_DISTRIB])
 AC_CONFIG_FILES([uninstalled-config.sh])
 
 AC_CONFIG_FILES([doc/Makefile])
index 26bb9941d5bb00bed025e9e0dda8638d77b41ead..d198877ce3ae0236f3eea85265c15668ee2fd0cc 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools directory of GNU gettext
-## Copyright (C) 1995-2023 Free Software Foundation, Inc.
+## Copyright (C) 1995-2024 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -59,6 +59,118 @@ EXTRA_DIST += INSTALL.windows
 
 EXTRA_DIST += woe32dll/export.h
 
+
+# Support for "make dist" without prior "make".
+
+# Prerequisites of both distdir1 and distdir2.
+.PHONY: programs-for-distdir
+programs-for-distdir:
+       cd gnulib-lib && $(MAKE) $(AM_MAKEFLAGS)
+       cd libgrep && $(MAKE) $(AM_MAKEFLAGS)
+       cd src \
+       && $(MAKE) $(AM_MAKEFLAGS) built-sources \
+       && $(MAKE) $(AM_MAKEFLAGS) \
+          msgcmp$(EXEEXT) \
+          msgfmt$(EXEEXT) \
+          msgmerge$(EXEEXT) \
+          msgunfmt$(EXEEXT) \
+          xgettext$(EXEEXT) \
+          msgattrib$(EXEEXT) \
+          msgcat$(EXEEXT) \
+          msgcomm$(EXEEXT) \
+          msgconv$(EXEEXT) \
+          msgen$(EXEEXT) \
+          msgexec$(EXEEXT) \
+          msgfilter$(EXEEXT) \
+          msggrep$(EXEEXT) \
+          msginit$(EXEEXT) \
+          msguniq$(EXEEXT) \
+          recode-sr-latin$(EXEEXT)
+
+# Ensure that the manual pages are up-to-date when "make dist" runs.
+# Hidden from automake, but really activated. Works around an automake bug.
+#distdir: distdir1
+.PHONY: distdir1
+distdir1: \
+  man/msgcmp.1 \
+  man/msgfmt.1 \
+  man/msgmerge.1 \
+  man/msgunfmt.1 \
+  man/xgettext.1 \
+  man/msgattrib.1 \
+  man/msgcat.1 \
+  man/msgcomm.1 \
+  man/msgconv.1 \
+  man/msgen.1 \
+  man/msgexec.1 \
+  man/msgfilter.1 \
+  man/msggrep.1 \
+  man/msginit.1 \
+  man/msguniq.1 \
+  man/recode-sr-latin.1
+man/msgcmp.1 \
+  man/msgfmt.1 \
+  man/msgmerge.1 \
+  man/msgunfmt.1 \
+  man/xgettext.1 \
+  man/msgattrib.1 \
+  man/msgcat.1 \
+  man/msgcomm.1 \
+  man/msgconv.1 \
+  man/msgen.1 \
+  man/msgexec.1 \
+  man/msgfilter.1 \
+  man/msggrep.1 \
+  man/msginit.1 \
+  man/msguniq.1 \
+  man/recode-sr-latin.1 \
+  : gen-man1
+.PHONY: gen-man1
+gen-man1: programs-for-distdir \
+          src/msgcmp.c man/msgcmp.x \
+          src/msgfmt.c man/msgfmt.x \
+          src/msgmerge.c man/msgmerge.x \
+          src/msgunfmt.c man/msgunfmt.x \
+          src/xgettext.c man/xgettext.x \
+          src/msgattrib.c man/msgattrib.x \
+          src/msgcat.c man/msgcat.x \
+          src/msgcomm.c man/msgcomm.x \
+          src/msgconv.c man/msgconv.x \
+          src/msgen.c man/msgen.x \
+          src/msgexec.c man/msgexec.x \
+          src/msgfilter.c man/msgfilter.x \
+          src/msggrep.c man/msggrep.x \
+          src/msginit.c man/msginit.x \
+          src/msguniq.c man/msguniq.x \
+          src/recode-sr-latin.c man/recode-sr-latin.x
+       cd man \
+       && $(MAKE) $(AM_MAKEFLAGS) \
+          msgcmp.1 \
+          msgfmt.1 \
+          msgmerge.1 \
+          msgunfmt.1 \
+          xgettext.1 \
+          msgattrib.1 \
+          msgcat.1 \
+          msgcomm.1 \
+          msgconv.1 \
+          msgen.1 \
+          msgexec.1 \
+          msgfilter.1 \
+          msggrep.1 \
+          msginit.1 \
+          msguniq.1 \
+          recode-sr-latin.1
+
+# Ensure that the examples are up-to-date when "make dist" runs.
+# Hidden from automake, but really activated. Works around an automake bug.
+#distdir: distdir2
+.PHONY: distdir2
+distdir2: programs-for-distdir
+       cd misc && $(MAKE) $(AM_MAKEFLAGS)
+       cd examples && $(MAKE) $(AM_MAKEFLAGS)
+
+
 maintainer-update-po: $(top_builddir)/config.status
        $(SHELL) ./config.status --recheck
        $(SHELL) ./config.status po/Makefile.in po-directories
index c864cddb806beda5c7e04b6a1dcd2cdca53fea37..56df96f007e37c22f185e61c461004f116e8a63e 100644 (file)
@@ -582,7 +582,8 @@ AM_CONDITIONAL([TEST_SYSTEM_LIBINTL], [test $USE_INCLUDED_LIBINTL = no])
 
 AC_CONFIG_SUBDIRS([examples])
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile],
+                [FIX_MAKEFILE_DISTRIB])
 
 AC_CONFIG_FILES([doc/Makefile])
 
index 0316ca287f36049b85cba1b3b6cccb9829e7f57d..f51bb64dc750d372f81514067fd9127eeb7e09ee 100644 (file)
@@ -615,6 +615,11 @@ MAINTAINERCLEANFILES += cldr-plural.c cldr-plural.h
 EXTRA_DIST += cldr-plural.c cldr-plural.h
 
 
+# This is implicit in "make all", but is needed explicitly before other target
+# invocations.
+built-sources: $(BUILT_SOURCES)
+
+
 # Special rules for installation of auxiliary programs.
 
 install-exec-local: