summaryrefslogtreecommitdiffstats
path: root/m4/fixautomake.m4
blob: 4b584da4c0012fba5d03ce72381457103b9c0e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# fixautomake.m4 serial 8 (gettext-0.18)
dnl Copyright (C) 2002-2003, 2006, 2009, 2015-2016 Free Software Foundation,
dnl 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
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

dnl From Bruno Haible

dnl Fix an automake-1.5-1.11 bug: the distrib rule is omitted.
AC_DEFUN([FIX_MAKEFILE_DISTRIB], [
  sed -e 's,^#distdir:,distdir:,' < $ac_file > $ac_file.tmp
  mv $ac_file.tmp $ac_file
])

dnl Fix an automake-1.9-1.11 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], [
  sed_script='/mkdir "*\$(distdir)"*$/{a\
\	$(MAKE) distdir1
}'
  sed -e "$sed_script" < $ac_file > $ac_file.tmp
  mv $ac_file.tmp $ac_file
])