Merge branch 'tests-gettext-macros-require' into maint
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 24 Dec 2011 08:29:15 +0000 (09:29 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 24 Dec 2011 08:29:15 +0000 (09:29 +0100)
* tests-gettext-macros-require:
  tests: fix handling of gettext macros requirement

1  2 
ChangeLog
tests/gettext-macros.test

diff --cc ChangeLog
+++ b/ChangeLog
+ 2011-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: fix handling of gettext macros requirement
+       The code introduced in the earlier change `v1.11-581-gb7d67d5'
+       and aimed at automatically fetching all the .m4 files provided by
+       gettext has proven inadequate, since it hasn't managed to truly
+       and always get *all* the required .m4 files.  For example, it has
+       failed to fetch the file `intldir.m4' (present in gettext 0.18.1,
+       and where the macro `AM_GNU_GETTEXT_INTL_SUBDIR' is defined),
+       which in turn has caused spurious SKIPs of at least the test
+       `gettext3.test'.
+       The reason for this debacle is that autopoint looks at the version
+       specified in AM_GNU_GETTEXT_VERSION to decide which version of the
+       gettext infrastructure to bring in; since we were unconditionally
+       specifying the older 0.10.35 version, the newer `.m4' files weren't
+       brought in.
+       * tests/gettext-macros.test: In AM_GNU_GETTEXT_VERSION, instead
+       of unconditionally specifying the older 0.10.35 version, specify
+       the version of the available `gettextize' or `autopoint' program,
+       dynamically extracted with the help of ...
+       (extract_program_version):... this new function, and saved ...
+       ($autopoint_version): ... in this new variable.
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix failure due to debugging code forgotten into a test
 +      * tests/missing-tar.test: Don't ever call the `missing' script
 +      with `sh -x'; this was used for debugging, but an instance of
 +      it slipped into the committed test case.  Bug revealed by a
 +      failure on a Solaris 10 system with GNU tar installed as `gtar'.
 +
 +2011-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: avoid spurious failure of libtool and gettext tests
 +
 +      On Solaris 10 (and presumably earlier), /bin/sh trips up on
 +      here-documents that contains a command substitution *and* are
 +      fed to a shell function:
 +
 +        # All as expected.
 +        $ cat <<END
 +        `pwd`
 +        END
 +        /home/stefano
 +        $ echo status = $?
 +        status = 0
 +
 +        # An apparently innocuous function ...
 +        $ kitty () { cat; }
 +        # ... but hilarity ensues!
 +        $ kitty <<END
 +        `pwd`
 +        END
 +        /tmp/sh137723: cannot open
 +        $ echo status = $?
 +        status = 1
 +
 +      We need to work around this misbehaviour in a couple of our
 +      tests (whose failures where causing cascading failures in a
 +      lot of other tests).
 +
 +      * tests/gettext-macros.test: Avoid the use of command substitution
 +      in a here-document passed to the `indent' function, by using the
 +      `echo' builtin instead.
 +      * tests/libtool-macros.test: Likewise.
 +
 +      See also:
 +      <http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00001.html>
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      hacking: distribute it, and mention it in the ChangeLog
 +      Not distributing the HACKING file might make it more difficult,
 +      for some random curious user, to get informed about or interested
 +      in the Automake development process, or to send us patches.
 +      * Makefile.am (EXTRA_DIST): Add HACKING.
 +      * HACKING: It's OK to distribute this file, and to mention it in
 +      the ChangeLog.
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      regex: deprecate the obsolete macro AM_WITH_REGEX
 +      This is a backport of commit v1.11-433-g37b0aee.
 +      Today, practically nobody uses the GNU rx library, which, according
 +      to its own website <http://www.gnu.org/software/rx/rx.html>, has
 +      been "decommissioned".  Consequently, the automake-provided macro
 +      AM_WITH_REGEX is not used nor required anymore.  Deprecate it, so
 +      that it will be possible to safely remove it in the next major
 +      automake version.
 +      * m4/regex.m4 (AM_WITH_REGEX): Give a warning of the class
 +      `obsolete' when this macro is used.
 +      * doc/automake.texi (Public Macros): Move description of
 +      `AM_WITH_REGEX' from here ...
 +      (Obsolete Macros): ... to here, and declare it as obsolete
 +      and "to be removed in a future version".
 +      * tests/regex-obsolete.test: New test.
 +      * tests/Makefile.am (TESTS): Add it.
 +      * NEWS: Update.
 +      See also:
 +      <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00131.html>
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      maint: distribute .xz tarballs, not .bz2 ones
 +      Many GNU packages are moving towards xz-compressed tarballs, so
 +      let's follow suit, by dropping the creation and distribution of
 +      a bzip2-compressed tarball and switching to xz instead.
 +      For compatibility and safeness, we will continue to create and
 +      distribute a gzip-compressed tarball as well.
 +      * configure.ac (AM_INIT_AUTOMAKE): Drop `dist-bzip2', add
 +      `dist-xz'.
 +      * NEWS: Update
 +      Suggested by Jim Meyering.
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      include: avoid "deleted .am file" problem
 +      * automake.in (handle_configure): When processing `configure.am',
 +      also expand `HAVE-MAKEFILE-IN-DEPS' to a boolean telling whether
 +      `MAKEFILE-IN-DEPS' is empty or not.
 +      * lib/am/configure.am [?HAVE-MAKEFILE-IN-DEPS?]
 +      (%MAKEFILE-IN-DEPS%): New target without dependencies, to
 +      avoid the "deleted .am file" problem.  Emit this only when
 +      `?HAVE-MAKEFILE-IN-DEPS?' is true, to avoid generating an
 +      "empty" dependency declaration.
 +      * tests/deleted-am.test: Make grepping of error message stricter.
 +      * tests/dist-missing-am.test: Likewise.
 +      * tests/remake-deleted-am.test: New test.
 +      * tests/remake-deleted-am-2.test: Likewise.
 +      * tests/remake-deleted-am-subdir.test: Likewise.
 +      * tests/remake-renamed-am.test: Likewise.
 +      * tests/makefile-deps.test: Likewise.
 +      * tests/Makefile.am (TESTS): Add the new tests.
 +      * NEWS: Update.
 +      Fixes automake bug#9768.
 +      Report by Peter Johansson.
 +      See also commit `Release-1-10-40-gd0ebf71', which fixed a similar
 +      problem for .m4 files included by configure.ac.
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      maint: better use of autoconf 2.68 features
 +      * configure.ac: Now that Automake requires autoconf 2.68 for its
 +      own bootstrapping and build system, we can assume that PACKAGE_URL
 +      gets automatically AC_SUBT'd.
 +
 +2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      cosmetics: use proper m4 quoting in configure.ac
 +      * configure.ac (AC_CONFIG_SRCDIR): Use proper m4 quoting
 +      for its arguments.
 +      (AC_CONFIG_AUX_DIR): Likewise.
 +      (AC_PROG_PATH): Likewise.
 +
  2011-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        tests: better handling of gettext and libtool requirements
@@@ -45,9 -45,25 +45,23 @@@ els
    am_gettextize_command=gettextize
  fi
  
+ # We will need to specify the correct autopoint (or gettextize) version
+ # in the AM_GNU_GETTEXT_VERSION call in configure.in if we want autopoint
+ # (or gettextize) to setup the correct infrastructure -- in particular,
+ # for what concerns us, to bring in all the required .m4 files.
+ autopoint_version=`extract_program_version $am_gettextize_command` \
+   && test -n "$autopoint_version" \
+   || autopoint_version=0.10.35
+ cat > configure.in <<END
+ # Both required by autopoint.
+ AM_GNU_GETTEXT
+ AM_GNU_GETTEXT_VERSION([$autopoint_version])
+ END
  if $am_gettextize_command --force && test -f m4/gettext.m4; then
 -  unindent >> get.sh <<END
 -    ACLOCAL_PATH="`pwd`/m4":\$ACLOCAL_PATH
 -    export ACLOCAL_PATH
 -END
 +  echo "ACLOCAL_PATH='`pwd`/m4':\$ACLOCAL_PATH" >> get.sh
 +  echo "export ACLOCAL_PATH" >> get.sh
  else
    # Older versions of gettext might not have a gettextize program
    # available, but this doesn't mean the user hasn't made the gettext