bootstrap: only force latest Makefile.in.in for gettext module
authorEric Blake <eblake@redhat.com>
Wed, 25 Apr 2012 21:11:13 +0000 (15:11 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 25 Apr 2012 21:11:13 +0000 (15:11 -0600)
Commit 45fb479c48453d was added on behalf of bison, which uses the
'gettext' module, and where bison wanted to pick up the enhancements
to Makefile.in.in as provided by gnulib (such as an install-dvi
target).  This works because the 'gettext' module assumes that as
soon as upstream gettext moves to 0.19, you will also want to
update your development machine to the same version, so always
having the latest Makefile.in.in is reasonable.

But there are also projects like libvirt, that want to build out of
the box on active enterprise environments such as RHEL 5, which is
still at gettext 0.17.  The 'gettext-h' module is designed for these
projects, to pick up a useful "gettext.h" with _(), but to not force
the latest and greatest gettext installation.  However, the recent
bootstrap change broke these projects, since the versioning between
a project's configure.ac (0.17) and the gnulib version (0.18) cause
make to fail in the po directory.

The solution is to recognize both classes of projects - either you
care about latest GNU Coding Standards (and therefore use the
'gettext' module and the latest gettext release) or stability (and
therefore use the 'gettext-h' module and can get by with an older
release; although at this point in time, anything older than 0.17
doesn't seem to be in common enterprise use).

* build-aux/bootstrap (with_gettext): Only install latest
Makefile.in.in for projects requesting bleeding edge gettext.
Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
build-aux/bootstrap

index 567ec30..37cdb76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-25  Eric Blake  <eblake@redhat.com>
+
+       bootstrap: only force latest Makefile.in.in for gettext module
+       * build-aux/bootstrap (with_gettext): Only install latest
+       Makefile.in.in for projects requesting bleeding edge gettext.
+
 2012-04-22  Bruno Haible  <bruno@clisp.org>
 
        doc: Mention reason for replacement on glibc/Linux systems.
index 5aa73cc..6b45868 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-04-19.22; # UTC
+scriptversion=2012-04-25.17; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -873,7 +873,15 @@ if test $with_gettext = yes; then
     }
   ' po/Makevars.template >po/Makevars || exit 1
 
-  cat $GNULIB_SRCDIR/build-aux/po/Makefile.in.in > po/Makefile.in.in || exit 1
+  # If the 'gettext' module is in use, grab the latest Makefile.in.in.
+  # If only the 'gettext-h' module is in use, assume autopoint already
+  # put the correct version of this file into place.
+  case $gnulib_modules in
+  *gettext-h*) ;;
+  *gettext*)
+    cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in || exit 1
+    ;;
+  esac
 
   if test -d runtime-po; then
     # Similarly for runtime-po/Makevars, but not quite the same.