]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Improve package version handling.
authorBruno Haible <bruno@clisp.org>
Thu, 23 Jan 2025 09:13:43 +0000 (10:13 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 23 Jan 2025 09:13:43 +0000 (10:13 +0100)
* autogen.sh: Copy also m4/init-package-version.m4, m4/version-stamp.m4.
* configure.ac: Use gl_INIT_PACKAGE and gl_CONFIG_VERSION_STAMP.
* gettext-runtime/configure.ac: Use gl_INIT_PACKAGE.
* gettext-runtime/intl/configure.ac: Likewise.
* gettext-tools/configure.ac: Likewise.
* gettext-tools/examples/configure.ac: Likewise.
* Makefile.am (dist-tarball-version): New target.
($(top_srcdir)/.version): Remove target.

.gitignore
Makefile.am
autogen.sh
configure.ac
gettext-runtime/configure.ac
gettext-runtime/intl/configure.ac
gettext-tools/configure.ac
gettext-tools/examples/configure.ac

index b980e08e187a120bdea97721e1141c3a3fb78065..dcf5660ae2977d589e69953c5ee6cf980917c0bb 100644 (file)
 /gettext-tools/tests/gnulib-lib/
 !/gettext-tools/tests/gnulib-lib/Makefile.am
 /gettext-tools/tests/init.sh
+/m4/init-package-version.m4
+/m4/version-stamp.m4
 
 # Files brought in by "automake --add-missing --copy":
 /build-aux/compile
index 2d38bfd670f260d7a21bc5da627416fa57adb2e6..5226a3bf38cdd5ff54d26646a9f4b92a3b1e6f7e 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the toplevel directory of GNU gettext
-## Copyright (C) 1995-2024 Free Software Foundation, Inc.
+## Copyright (C) 1995-2025 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
@@ -98,12 +98,13 @@ EXTRA_DIST += INSTALL.aix
 
 # Versioning based on Git release tags.
 
+dist-hook: dist-tarball-version
+.PHONY: dist-tarball-version
+dist-tarball-version:
+       echo '$(VERSION)' > $(distdir)/.tarball-version
+
 EXTRA_DIST += $(top_srcdir)/.version
 BUILT_SOURCES = $(top_srcdir)/.version
-$(top_srcdir)/.version:
-       echo $(VERSION) > $@-t && mv $@-t $@
-dist-hook: gen-ChangeLogs
-       echo $(VERSION) > $(distdir)/.tarball-version
 
 
 # Support for "make dist" without prior "make".
@@ -120,6 +121,8 @@ distdir1:
 
 # Generate ChangeLog.
 
+dist-hook: gen-ChangeLogs
+
 gen_start_date = 2015-10-13
 .PHONY: gen-ChangeLogs
 gen-ChangeLogs:
index 11bdca36f630ccea8e02697f51c60eeb52b3f9ad..3d70de01c51cd9f5e2f35036381d0a48a0d86d02 100755 (executable)
@@ -465,6 +465,8 @@ if ! $skip_gnulib; then
   $GNULIB_TOOL --copy-file build-aux/update-copyright || exit $?
   $GNULIB_TOOL --copy-file build-aux/useless-if-before-free || exit $?
   $GNULIB_TOOL --copy-file build-aux/vc-list-files || exit $?
+  $GNULIB_TOOL --copy-file m4/init-package-version.m4 || exit $?
+  $GNULIB_TOOL --copy-file m4/version-stamp.m4 || exit $?
   $GNULIB_TOOL --copy-file top/GNUmakefile . || exit $?
   $GNULIB_TOOL --copy-file top/maint.mk . || exit $?
 
index 2521e4da0a3cd41834cb59872c3d00a12551e4bd..c2754bb5a4aee495fea7fe4ddb9e1441af5e1494 100644 (file)
@@ -17,11 +17,14 @@ dnl along with this program.  If not, see <https://www.gnu.org/licenses/>.
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([gettext],
-       m4_esyscmd([build-aux/git-version-gen .tarball-version]),
-       [bug-gettext@gnu.org])
+AC_INIT
+PACKAGE_BUGREPORT='bug-gettext@gnu.org'
 AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c])
 AC_CONFIG_AUX_DIR([build-aux])
+VERSION_NUMBER=`cd $srcdir \
+                && build-aux/git-version-gen .tarball-version \
+                   | sed -e 's/dirty$/modified/'`
+gl_INIT_PACKAGE([gettext], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar])
 
 dnl Override automake's tar command used for creating distributions:
@@ -61,4 +64,6 @@ AC_CONFIG_FILES([Makefile],
 
 AC_CONFIG_FILES([gnulib-local/Makefile])
 
+gl_CONFIG_VERSION_STAMP
+
 AC_OUTPUT
index bf52be77d7e1c722472fb5af53f374b794e66ae6..cde0657ddd5676cbf31352e33236df9152769574 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2025 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
@@ -17,11 +17,14 @@ dnl along with this program.  If not, see <https://www.gnu.org/licenses/>.
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([gettext-runtime],
-       m4_esyscmd([../build-aux/git-version-gen ../.tarball-version]),
-       [bug-gettext@gnu.org])
+AC_INIT
+PACKAGE_BUGREPORT='bug-gettext@gnu.org'
 AC_CONFIG_SRCDIR([intl/dcigettext.c])
 AC_CONFIG_AUX_DIR([../build-aux])
+VERSION_NUMBER=`cd $srcdir/.. \
+                && build-aux/git-version-gen .tarball-version \
+                   | sed -e 's/dirty$/modified/'`
+gl_INIT_PACKAGE([gettext-runtime], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
 AC_CONFIG_HEADERS([config.h])
 
index 749a70096f95f60b960d37e1426550e2732fa087..e7edb39e11eb677bf0efe5b196ad6a44f892a386 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2025 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
@@ -17,11 +17,14 @@ dnl along with this program.  If not, see <https://www.gnu.org/licenses/>.
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([libintl],
-       m4_esyscmd([../../build-aux/git-version-gen ../../.tarball-version]),
-       [bug-gettext@gnu.org])
+AC_INIT
+PACKAGE_BUGREPORT='bug-gettext@gnu.org'
 AC_CONFIG_SRCDIR([dcigettext.c])
 AC_CONFIG_AUX_DIR([../../build-aux])
+VERSION_NUMBER=`cd $srcdir/../.. \
+                && build-aux/git-version-gen .tarball-version \
+                   | sed -e 's/dirty$/modified/'`
+gl_INIT_PACKAGE([libintl], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([silent-rules])
 AC_CONFIG_HEADERS([config.h])
 
index b863e0f2b6ee3198762e8574c5442bdbc2dc0494..6a523aa24ed7de9c83a7e9c40fa181ca15dc2833 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools directory of GNU gettext
-dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2025 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
@@ -17,11 +17,14 @@ dnl along with this program.  If not, see <https://www.gnu.org/licenses/>.
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([gettext-tools],
-       m4_esyscmd([../build-aux/git-version-gen ../.tarball-version]),
-       [bug-gettext@gnu.org])
+AC_INIT
+PACKAGE_BUGREPORT='bug-gettext@gnu.org'
 AC_CONFIG_SRCDIR([src/msgfmt.c])
 AC_CONFIG_AUX_DIR([../build-aux])
+VERSION_NUMBER=`cd $srcdir/.. \
+                && build-aux/git-version-gen .tarball-version \
+                   | sed -e 's/dirty$/modified/'`
+gl_INIT_PACKAGE([gettext-tools], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
 AC_CONFIG_HEADERS([config.h])
 
index 249fd14cd6a21fc399905b08cd838055f5461e4b..30857f9373fb0b8659a37ce0f65fa3d8c073ff08 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools/examples directory of GNU gettext
-dnl Copyright (C) 2006, 2009, 2014, 2019-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 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
@@ -17,11 +17,14 @@ dnl along with this program.  If not, see <https://www.gnu.org/licenses/>.
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([gettext-examples],
-       m4_esyscmd([../../build-aux/git-version-gen ../../.tarball-version]),
-       [bug-gettext@gnu.org])
+AC_INIT
+PACKAGE_BUGREPORT='bug-gettext@gnu.org'
 AC_CONFIG_SRCDIR([installpaths.in])
 AC_CONFIG_AUX_DIR([../../build-aux])
+VERSION_NUMBER=`cd $srcdir/../.. \
+                && build-aux/git-version-gen .tarball-version \
+                   | sed -e 's/dirty$/modified/'`
+gl_INIT_PACKAGE([gettext], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([silent-rules])
 
 dnl Installation directories.