]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix "make dist" after switching to automake 1.17.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Jul 2024 23:01:07 +0000 (01:01 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 Jul 2024 23:01:07 +0000 (01:01 +0200)
* m4/fixautomake.m4 (FIX_MAKEFILE_TOPDIR_DISTRIB): Also recognize the distdir
rule generated by automake 1.17.

m4/fixautomake.m4

index 035c5692127713835bcd3bc79d66081be1ed798f..bc98541a58c2a0f641017966f3a568a19657db47 100644 (file)
@@ -1,5 +1,5 @@
 # fixautomake.m4
-# serial 8 (gettext-0.18)
+# serial 9 (gettext-0.23)
 dnl Copyright (C) 2002-2024 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
@@ -15,12 +15,17 @@ AC_DEFUN([FIX_MAKEFILE_DISTRIB], [
   mv $ac_file.tmp $ac_file
 ])
 
-dnl Fix an automake-1.9-1.11 bug: the distrib rule is not extensible.
+dnl Fix an automake-1.9-1.17 bug: the distrib rule is not extensible.
 dnl Insert a invocation of the distdir1 target inside the distdir commands,
 dnl after $(distdir) has been erased and re-created.
 AC_DEFUN([FIX_MAKEFILE_TOPDIR_DISTRIB], [
+  dnl The first part of this script is for automake versions < 1.17.
+  dnl The second part is for automake versions >= 1.17.
   sed_script='/mkdir "*\$(distdir)"*$/{a\
 \      $(MAKE) distdir1
+}
+/\$(MKDIR_P) "*\$(distdir)"*$/{a\
+\      $(MAKE) distdir1
 }'
   sed -e "$sed_script" < $ac_file > $ac_file.tmp
   mv $ac_file.tmp $ac_file