automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-581-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-581-gb7d67d5
Date: Thu, 22 Dec 2011 17:48:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b7d67d5551bc9d6dac34deda5f82e9292a2cdbb5

The branch, maint has been updated
       via  b7d67d5551bc9d6dac34deda5f82e9292a2cdbb5 (commit)
       via  a95d9dc4f4dbac2c9a34615078cb78d16e0c7805 (commit)
      from  fe8162b7c8fbcd4f5ac6d51127a8ef828e5e2134 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b7d67d5551bc9d6dac34deda5f82e9292a2cdbb5
Author: Stefano Lattarini <address@hidden>
Date:   Wed Dec 14 10:35:04 2011 +0100

    tests: better handling of gettext and libtool requirements
    
    This change fixes automake bug#9807.
    
    Before this change, the automake testsuite only looked for the
    `.m4' files containing libtool and gettext macros definitions in
    the directory `${prefix}/share/aclocal' (and in the directories
    specified by the `dirlist' file in there, if any), where ${prefix}
    was the configure-time automake installation prefix (defaulting
    to `/usr/local').
    
    This approach had various shortcomings and disadvantages.  Let's
    briefly describe the three major ones.
    
    First, on most GNU/Linux systems, a libtool or gettext installed
    from distro-provided packages (e.g., by dpkg on Debian/Ubuntu, or
    by rmp on RedHat/Fedora) would have `/usr', not `/usr/local', as
    its ${prefix}; so, trying to run the automake testsuite with a
    simple "./configure && make && make check" would have failed to
    execute the libtool and gettext tests on most GNU/Linux distros.
    It's true that it was quite easy to work around this issue, by
    creating a proper `/usr/local/share/aclocal/dirlist' file with
    an entry pointing to `/usr/share/aclocal' (a workaround in fact
    used by most automake developers); but the typical user wasn't
    aware of the necessity of this trick, so the libtool and gettext
    tests was usually skipped on testsuite runs "in the wild", thus
    needlessly reducing coverage.
    
    Second, the older testsuite behaviour made more difficult for
    the developers to run the testsuite with non-default libtool or
    gettext.  For example, assume the developer is working on a system
    that has a default libtool version 1.5 installed in the /usr/local
    hierarchy; to improve coverage, the developer installs also a more
    modern libtool version, say 2.4, in its home directory, let's say
    in ~/libtool-2.4; he then tries to run the automake testsuite with
    this more modern libtool by doing an (apparently) simple:
      $ PATH=$HOME/libtool-2.4:$PATH make check
    But the automake testsuite would still look for libtool macros in
    /usr/local/share/aclocal, not in ~/libtool-2.4/share/aclocal, so
    the wrong version of the macros would be picked up, and the tests
    would either fail spuriously or (which would be worse) pass without
    truly covering the libtool version the developers was thinking to
    be testing with.
    Worse again, the automake testsuite would *unconditionally* look
    for libtool macros in /usr/local/share/aclocal, so even something
    like:
      $ export ACLOCAL_PATH=$HOME/libtool-2.4/share/aclocal
      $ PATH=$HOME/libtool-2.4:$PATH make check
    wouldn't work.
    
    Third and last, during a "make distcheck", automake is configured
    with a ${prefix} pointing to a proper subdirectory of the build
    directory (usually `pwd`/_inst), which gets created on-the-fly;
    in this case, with the old approach, the automake testsuite never
    found the libtool and gettext macro files, ans so the libtool and
    gettext tests was *always* skipped in a "make distcheck".
    
    * tests/libtool-macros.test: New helper test, looking (with the
    help of the `libtoolize' script) for libtool macro files required
    by most libtool tests, and making them easily accessible.
    * tests/gettext-macros.test: New helper test, looking (with the
    help of the `libtoolize' script) for libtool macro files required
    by most libtool tests, and making them easily accessible.
    * tests/defs.in: Update to make it rely on the results and setups
    of `libtool-macros.test' and `gettext-macros.test'.
    * tests/Makefile.am: Declare dependency of all the logs of libtool
    tests from `libtool-macros.log', and all the logs of gettext tests
    from `gettext-macros.log'.
    (TESTS): Add the new tests.

commit a95d9dc4f4dbac2c9a34615078cb78d16e0c7805
Author: Stefano Lattarini <address@hidden>
Date:   Thu Dec 22 18:17:26 2011 +0100

    fix: typos and grammaros in comments of the new test
    
    * tests/get-sysconf.test: Fix few typos, grammaros and botched
    wording.  Reported by Eric Blake.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |   78 +++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.am         |   64 ++++++++++++++++++++++++++++++++++++
 tests/defs.in             |   43 +-----------------------
 tests/get-sysconf.test    |    6 ++--
 tests/gettext-macros.test |   80 +++++++++++++++++++++++++++++++++++++++++++++
 tests/libtool-macros.test |   62 ++++++++++++++++++++++++++++++++++
 6 files changed, 289 insertions(+), 44 deletions(-)
 create mode 100755 tests/gettext-macros.test
 create mode 100755 tests/libtool-macros.test

diff --git a/ChangeLog b/ChangeLog
index de95269..d97d461 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,81 @@
+2011-12-14  Stefano Lattarini  <address@hidden>
+
+       tests: better handling of gettext and libtool requirements
+
+       This change fixes automake bug#9807.
+
+       Before this change, the automake testsuite only looked for the
+       `.m4' files containing libtool and gettext macros definitions in
+       the directory `${prefix}/share/aclocal' (and in the directories
+       specified by the `dirlist' file in there, if any), where ${prefix}
+       was the configure-time automake installation prefix (defaulting
+       to `/usr/local').
+
+       This approach had various shortcomings and disadvantages.  Let's
+       briefly describe the three major ones.
+
+       First, on most GNU/Linux systems, a libtool or gettext installed
+       from distro-provided packages (e.g., by dpkg on Debian/Ubuntu, or
+       by rmp on RedHat/Fedora) would have `/usr', not `/usr/local', as
+       its ${prefix}; so, trying to run the automake testsuite with a
+       simple "./configure && make && make check" would have failed to
+       execute the libtool and gettext tests on most GNU/Linux distros.
+       It's true that it was quite easy to work around this issue, by
+       creating a proper `/usr/local/share/aclocal/dirlist' file with
+       an entry pointing to `/usr/share/aclocal' (a workaround in fact
+       used by most automake developers); but the typical user wasn't
+       aware of the necessity of this trick, so the libtool and gettext
+       tests was usually skipped on testsuite runs "in the wild", thus
+       needlessly reducing coverage.
+
+       Second, the older testsuite behaviour made more difficult for
+       the developers to run the testsuite with non-default libtool or
+       gettext.  For example, assume the developer is working on a system
+       that has a default libtool version 1.5 installed in the /usr/local
+       hierarchy; to improve coverage, the developer installs also a more
+       modern libtool version, say 2.4, in its home directory, let's say
+       in ~/libtool-2.4; he then tries to run the automake testsuite with
+       this more modern libtool by doing an (apparently) simple:
+         $ PATH=$HOME/libtool-2.4:$PATH make check
+       But the automake testsuite would still look for libtool macros in
+       /usr/local/share/aclocal, not in ~/libtool-2.4/share/aclocal, so
+       the wrong version of the macros would be picked up, and the tests
+       would either fail spuriously or (which would be worse) pass without
+       truly covering the libtool version the developers was thinking to
+       be testing with.
+       Worse again, the automake testsuite would *unconditionally* look
+       for libtool macros in /usr/local/share/aclocal, so even something
+       like:
+         $ export ACLOCAL_PATH=$HOME/libtool-2.4/share/aclocal
+         $ PATH=$HOME/libtool-2.4:$PATH make check
+       wouldn't work.
+
+       Third and last, during a "make distcheck", automake is configured
+       with a ${prefix} pointing to a proper subdirectory of the build
+       directory (usually `pwd`/_inst), which gets created on-the-fly;
+       in this case, with the old approach, the automake testsuite never
+       found the libtool and gettext macro files, ans so the libtool and
+       gettext tests was *always* skipped in a "make distcheck".
+
+       * tests/libtool-macros.test: New helper test, looking (with the
+       help of the `libtoolize' script) for libtool macro files required
+       by most libtool tests, and making them easily accessible.
+       * tests/gettext-macros.test: New helper test, looking (with the
+       help of the `libtoolize' script) for libtool macro files required
+       by most libtool tests, and making them easily accessible.
+       * tests/defs.in: Update to make it rely on the results and setups
+       of `libtool-macros.test' and `gettext-macros.test'.
+       * tests/Makefile.am: Declare dependency of all the logs of libtool
+       tests from `libtool-macros.log', and all the logs of gettext tests
+       from `gettext-macros.log'.
+       (TESTS): Add the new tests.
+
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       fix: typos and grammaros in comments of the new test
+       * tests/get-sysconf.test: Fix few typos, grammaros and botched
+       wording.  Reported by Eric Blake.
+
 2011-12-22  Stefano Lattarini  <address@hidden>
 
        tests: report useful system information in 'test-suite.log'
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1ad0cfb..b2a61ec 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -924,8 +924,72 @@ yaccvpath.test \
 yacc-dist-nobuild-subdir.test \
 yflags.test \
 yflags2.test \
+libtool-macros.test \
+gettext-macros.test \
 $(parallel_tests)
 
+# FIXME: make these automatically computed once we are merged into
+# FIXME: the `testsuite-work' branch.
+depcomp4.log: libtool-macros.log
+depcomp7.log: libtool-macros.log
+depcomp8b.log: libtool-macros.log
+fort5.log: libtool-macros.log
+instdir-ltlib.log: libtool-macros.log
+instfail-libtool.log: libtool-macros.log
+ldadd.log: libtool-macros.log
+ldflags.log: libtool-macros.log
+libobj13.log: libtool-macros.log
+libtoo10.log: libtool-macros.log
+libtoo11.log: libtool-macros.log
+libtool.log: libtool-macros.log
+libtool2.log: libtool-macros.log
+libtool3.log: libtool-macros.log
+libtool5.log: libtool-macros.log
+libtool6.log: libtool-macros.log
+libtool7.log: libtool-macros.log
+libtool8.log: libtool-macros.log
+libtool9.log: libtool-macros.log
+listval.log: libtool-macros.log
+ltcond.log: libtool-macros.log
+ltcond2.log: libtool-macros.log
+ltconv.log: libtool-macros.log
+ltdeps.log: libtool-macros.log
+ltinit.log: libtool-macros.log
+ltinstloc.log: libtool-macros.log
+ltlibobjs.log: libtool-macros.log
+ltlibsrc.log: libtool-macros.log
+ltorder.log: libtool-macros.log
+nobase-libtool.log: libtool-macros.log
+pr211.log: libtool-macros.log
+pr300-ltlib.log: libtool-macros.log
+pr307.log: libtool-macros.log
+pr401b.log: libtool-macros.log
+pr72.log: libtool-macros.log
+reqd2.log: libtool-macros.log
+silent3.log: libtool-macros.log
+silent4.log: libtool-macros.log
+silent9.log: libtool-macros.log
+stdlib2.log: libtool-macros.log
+strip3.log: libtool-macros.log
+subobj9.log: libtool-macros.log
+suffix10.log: libtool-macros.log
+suffix2.log: libtool-macros.log
+suffix5.log: libtool-macros.log
+suffix8.log: libtool-macros.log
+vala.log: libtool-macros.log
+vala1.log: libtool-macros.log
+vala2.log: libtool-macros.log
+vala3.log: libtool-macros.log
+vala4.log: libtool-macros.log
+vala5.log: libtool-macros.log
+
+# FIXME: make these automatically computed once we are merged into
+# FIXME: the `testsuite-work' branch.
+gettext.log: gettext-macros.log
+gettext2.log: gettext-macros.log
+gettext3.log: gettext-macros.log
+subcond.log: gettext-macros.log
+
 EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
diff --git a/tests/defs.in b/tests/defs.in
index b19b121..aa8eb63 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -454,47 +454,8 @@ unset VERBOSE
 echo "=== Running test $0"
 
 # We might need extra macros, e.g., from Libtool or Gettext.
-# Find them on the system.
-# Use `-I $srcdir/../m4' in addition to `--acdir=$srcdir/../m4', because the
-# other `-I' directories added for libtool and gettext might contain
-# files from an old version of Automake that we don't want to use.
-# Use `-Wno-syntax' because we do not want our test suite to fail because
-# some third-party .m4 file is underquoted.
-case $required in
-  *libtool* | *gettext* )
-    aclocaldir='@prefix@/share/aclocal'
-    extra_includes=""
-    if test -f $aclocaldir/dirlist; then
-       extra_includes=`
-       <$aclocaldir/dirlist \
-       sed  's/#.*//;s/[        ][      ]*$//g' \
-       | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
-    else :; fi
-
-    libtool_found=no
-    gettext_found=no
-    for d in $extra_includes $aclocaldir ; do
-       test "x$d" != x-I || continue
-       if test -f "$d/libtool.m4"; then
-         libtool_found=yes
-       fi
-       if test -f "$d/gettext.m4"; then
-         gettext_found=yes
-       fi
-    done
-    case $required in
-      *libtool* ) test $libtool_found = yes || Exit 77 ;;
-      *gettext* ) test $gettext_found = yes || Exit 77 ;;
-    esac
-    # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
-    # cannot cope with spaces in the source tree name for Libtool and gettext
-    # tests.
-    case $srcdir,`pwd` in
-      *\ * | *\        *) Exit 77 ;;
-    esac
-    ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I 
$aclocaldir"
-    ;;
-esac
+case " $required " in *\ libtool*) . ../libtool-macros.dir/get.sh;; esac
+case " $required " in *\ gettext*) . ../gettext-macros.dir/get.sh;; esac
 
 testaclocaldir='@abs_top_srcdir@/m4'
 
diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test
index 32d1038..1a549a3 100755
--- a/tests/get-sysconf.test
+++ b/tests/get-sysconf.test
@@ -15,8 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Dummy test case, aimed at reporting useful system information in the
-# final `test-suite.log'.  This way, if a user experiencing a failure in
-# the Automake test suite only sends us the `test-suite.log' file upon,
+# final `test-suite.log'.  This way, if a user experiences a failure in
+# the Automake test suite and then only sends us the `test-suite.log',
 # we won't have to ask him for more information to start analyzing the
 # failure (that had happened too many times in the past!).
 
@@ -37,7 +37,7 @@ cat "$testbuilddir/aclocal-$APIVERSION" || st=1
 cat "$testbuilddir/automake-$APIVERSION" || st=1
 
 if test $st -eq 0; then
-  # This test SKIPs, so that all the information is has gathered and
+  # This test SKIPs, so that all the information it has gathered and
   # printed will get unconditionally copied into the `test-suite.log'
   # file.
   Exit 77
diff --git a/tests/gettext-macros.test b/tests/gettext-macros.test
new file mode 100755
index 0000000..7fe1274
--- /dev/null
+++ b/tests/gettext-macros.test
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Try to find the gettext `.m4' files and make them easily accessed
+# to the test cases requiring them.
+# See also automake bug#9807.
+
+. ./defs || Exit 1
+
+echo "# Automatically generated by $me." > get.sh
+echo : >> get.sh
+
+# The `gettextize' and `autopoint' scripts will look into Makefile.am.
+echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+
+# Required by autopoint.
+echo 'AM_GNU_GETTEXT' > configure.in
+# Likewise; and older version specified here *won't* work!
+echo 'AM_GNU_GETTEXT_VERSION([0.10.35])' >> configure.in
+
+# Prefer autopoint to gettextize, since the more modern versions of the
+# latter might unconditionally require user interaction to complete;
+# yes, this means confirmation from /dev/tty (!) -- see:
+#  <http://lists.gnu.org/archive/html/bug-gettext/2011-12/msg00000.html>
+# Since this "forced interaction" behaviour of gettextize wasn't present
+# before the introduction of autopoint, we should be able to safely
+# fall back to calling gettextize non-interactively if autopoint is not
+# present.
+if autopoint --version; then
+  am_gettextize_command=autopoint
+else
+  am_gettextize_command=gettextize
+fi
+
+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
+else
+  # Older versions of gettext might not have a gettextize program
+  # available, but this doesn't mean the user hasn't made the gettext
+  # macros available, e.g., by properly setting ACLOCAL_PATH.
+  rm -rf m4
+  mkdir m4
+  # See below for an explanation about the use the of `-Wno-syntax'.
+  if $ACLOCAL -Wno-syntax -I m4 --install && test -f m4/gettext.m4; then
+    : # Gettext macros already accessible by default.
+  else
+    echo "skip_ \"couldn't find or get gettext macros\"" >> get.sh
+  fi
+fi
+
+. ./get.sh
+
+$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
+# We need to use `-Wno-syntax', since we do not want our test suite
+# to fail merely because some third-party `.m4' file is underquoted.
+ACLOCAL="$ACLOCAL -Wno-syntax"
+END
+
+# The file gettextize or autopoint might have copied in the `m4'
+# subdirectory of the test directory are going to be needed by
+# other tests, so we must not remove the test directory.
+keep_testdirs=yes
+
+:
diff --git a/tests/libtool-macros.test b/tests/libtool-macros.test
new file mode 100755
index 0000000..31e5019
--- /dev/null
+++ b/tests/libtool-macros.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Try to find the libtool `.m4' files and make them easily accessed
+# to the test cases requiring them.
+# See also automake bug#9807.
+
+. ./defs || Exit 1
+
+echo "# Automatically generated by $me." > get.sh
+echo : >> get.sh
+
+# The `libtoolize' script will look into Makefile.am.
+echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+
+if libtoolize --copy --install && test -f m4/libtool.m4; then
+  unindent >> get.sh <<END
+    ACLOCAL_PATH="`pwd`/m4":\$ACLOCAL_PATH
+    export ACLOCAL_PATH
+END
+else
+  # Libtoolize from libtool < 2.0 didn't support the `--install' option,
+  # but this doesn't mean the user hasn't made the libtool macros
+  # available, e.g., by properly setting ACLOCAL_PATH.
+  rm -rf m4
+  mkdir m4
+  echo AC_PROG_LIBTOOL >> configure.in
+  # See below for an explanation about the use the of `-Wno-syntax'.
+  if $ACLOCAL -Wno-syntax -I m4 --install && test -f m4/libtool.m4; then
+    : # Libtool macros already accessible by default.
+  else
+    echo "skip_ \"couldn't find or get libtool macros\"" >> get.sh
+  fi
+fi
+
+. ./get.sh
+
+$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
+# We need to use `-Wno-syntax', since we do not want our test suite
+# to fail merely because some third-party `.m4' file is underquoted.
+ACLOCAL="$ACLOCAL -Wno-syntax"
+END
+
+# The file libtoolize might have just copied in the `m4' subdirectory of
+# the test directory are going to be needed by other tests, so we must
+# not remove the test directory.
+keep_testdirs=yes
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]