summaryrefslogtreecommitdiff
path: root/m4/init-package-version.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
commit6ffaa52cf732a84c0f8259dbc9b8183960ec5c33 (patch)
treed3136c22e3e805cfc0efe78412cce905a17e0c8d /m4/init-package-version.m4
parent591cbf5878b7d4105b275585b9db1324c9dfce56 (diff)
parentaf151c593704a40e10efb28d1e3dd59a23a661f3 (diff)
Merge branch 'release/debian/1.0-1'debian/1.0-1
Diffstat (limited to 'm4/init-package-version.m4')
-rw-r--r--m4/init-package-version.m434
1 files changed, 30 insertions, 4 deletions
diff --git a/m4/init-package-version.m4 b/m4/init-package-version.m4
index f131a844..823afc6f 100644
--- a/m4/init-package-version.m4
+++ b/m4/init-package-version.m4
@@ -1,5 +1,5 @@
-# init-package-version.m4 serial 1 (gettext-0.18)
-dnl Copyright (C) 1992-2009 Free Software Foundation, Inc.
+# init-package-version.m4 serial 3
+dnl Copyright (C) 1992-2021 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
@@ -61,6 +61,28 @@ dnl the same distribution terms as the rest of that program.
# . $srcdir/../version.sh
# gl_INIT_PACKAGE(PACKAGE, $VERSION_NUMBER)
# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# and after changing version.sh, the developer can directly configure and build:
+#
+# make distclean
+# ./configure
+# make
+#
+# Some other packages use another approach:
+#
+# AC_INIT(PACKAGE,
+# m4_normalize(m4_esyscmd([. ./version.sh; echo $VERSION_NUMBER])))
+# AC_CONFIG_SRCDIR(WITNESS)
+# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# but here, after changing version.sh, the developer must first regenerate the
+# configure file:
+#
+# make distclean
+# ./autogen.sh --skip-gnulib
+# ./configure
+# make
+#
# gl_INIT_PACKAGE(PACKAGE-NAME, VERSION)
# --------------------------------------
@@ -77,7 +99,7 @@ AC_DEFUN([gl_INIT_PACKAGE],
m4_bpatsubst(m4_dquote(
m4_defn([AM_INIT_AUTOMAKE])),
[AC_PACKAGE_NAME], [gl_INIT_DUMMY])),
- [AC_PACKAGE_TARNAME], [gl_INIT_DUMMY])),
+ [AC_PACKAGE_TARNAME], [gl_INIT_EMPTY])),
[AC_PACKAGE_VERSION], [gl_INIT_DUMMY])
[AC_SUBST([PACKAGE], [$1])
AC_SUBST([VERSION], [$2])
@@ -85,7 +107,11 @@ AC_DEFUN([gl_INIT_PACKAGE],
m4_define([AM_INIT_AUTOMAKE],
m4_defn([gl_RPL_INIT_AUTOMAKE]))
])
-m4_define([gl_INIT_DUMMY], [])
+m4_define([gl_INIT_EMPTY], [])
+dnl Automake 1.16.4 no longer accepts an empty value for gl_INIT_DUMMY.
+dnl But a macro that later expands to empty works.
+m4_define([gl_INIT_DUMMY], [gl_INIT_DUMMY2])
+m4_define([gl_INIT_DUMMY2], [])
AC_DEFUN([gl_RPL_INIT_AUTOMAKE], [
m4_ifval([$2],
[m4_fatal([After gl_INIT_PACKAGE, the two-argument form of AM_INIT_AUTOMAKE cannot be used.])])