automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.13.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.13.1-787-g67e2c0a
Date: Thu, 03 Jan 2013 14:32:47 +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=67e2c0a9f584f92c41bcd56747f2f30894bbb4ae

The branch, ng/master has been updated
       via  67e2c0a9f584f92c41bcd56747f2f30894bbb4ae (commit)
       via  b9bbfe9af9088bc83f50b2971fd21d2be91b9d6a (commit)
       via  e4fc1dad85ab0a6f3f408a2f74059b826457b4dd (commit)
       via  654324c756210161c61484f754a1df77aa748a78 (commit)
       via  975a2afb4c7dbb4ec612e7ae38238bea0d805003 (commit)
       via  a790fae9ba74c917af37a735167fe9e1106f4dd7 (commit)
       via  9e5579c5c5d692b0393349d3bdfa1d87e2eccbb9 (commit)
       via  0b1576ae2650d698fdf7c45f2a2b8ba3a0af40eb (commit)
       via  a59ac344dfe05e36a69cb70c49750d81b02a06ed (commit)
       via  da0dfbe7715c8f9558d7ee212b7eb8aac852a2ec (commit)
       via  6d80cc2dba29a680cec596e233fab1e6185391b0 (commit)
       via  8288e78b83af0bdd660fdf1f8b0682e5a3d2b49d (commit)
       via  c31863138afeab687ac719c363274fa7095a9b5e (commit)
       via  c1a8f56295d9c1621c65de28400cd1d93f037063 (commit)
       via  36ee783a1000b5a1e52b81e5564de19ffb99fd37 (commit)
      from  b8114a01dcb024711cf33d922f67a7b3a6cb642e (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 67e2c0a9f584f92c41bcd56747f2f30894bbb4ae
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 15:29:00 2013 +0100

    self tests: fix spurious failure
    
    * t/self-check-dir.tap: Here, caused by recent reshuffling of the
    Automake source tree.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit b9bbfe9af9088bc83f50b2971fd21d2be91b9d6a
Merge: b8114a0 e4fc1da
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 15:14:26 2013 +0100

    Merge branch 'master' into ng/master
    
    * master:
      build: don't enable 'color-tests' automake option explicitly
      build: enable all warnings as fatal in our own build system
      texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
      tests: make two new test executable
      runtest: better command line API
      tests: move runtest.in away from the top-lever directory
      maint: move more maintainer files in the 'maint/' subdir
      tests: more significant names for some tests
      maint: add some of my maintainer-specific scripts
      texi: deprecate hack about info files in CLEANFILES variables
      texi: info files can be generated in the builddir
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 GNUmakefile                                |    4 +-
 Makefile.am                                |   23 ++++--
 NEWS                                       |   29 +++++++
 automake.in                                |   57 +++++++++----
 bootstrap.sh                               |    9 +-
 configure.ac                               |    3 +-
 doc/automake-ng.texi                       |   13 +++
 lib/Automake/Options.pm                    |    1 +
 maint/am-ft                                |  109 ++++++++++++++++++++++++
 maint/am-xft                               |    3 +
 maint.mk => maint/maint.mk                 |    0
 maint/rename-tests                         |   52 ++++++++++++
 syntax-checks.mk => maint/syntax-checks.mk |    0
 runtest.in => t/ax/runtest.in              |   13 +++-
 t/self-check-dir.tap                       |    2 +-
 t/{txinfo25.sh => txinfo-builddir.sh}      |  126 ++++++++++++++++------------
 t/txinfo23.sh                              |    5 +-
 t/txinfo24.sh                              |    2 +-
 t/txinfo25.sh                              |    7 ++-
 t/txinfo28.sh                              |    2 +-
 t/{yaccpp.sh => yacc-cxx-grepping.sh}      |    0
 t/{yaccdry.sh => yacc-dry.sh}              |    0
 t/{yacc4.sh => yacc-misc.sh}               |    0
 t/{yaccvpath.sh => yacc-vpath.sh}          |    0
 24 files changed, 370 insertions(+), 90 deletions(-)
 create mode 100755 maint/am-ft
 create mode 100755 maint/am-xft
 rename maint.mk => maint/maint.mk (100%)
 create mode 100755 maint/rename-tests
 rename syntax-checks.mk => maint/syntax-checks.mk (100%)
 rename runtest.in => t/ax/runtest.in (87%)
 mode change 100644 => 100755 t/backslash-issues.sh
 mode change 100644 => 100755 t/extra-data.sh
 copy t/{txinfo25.sh => txinfo-builddir.sh} (50%)
 rename t/{yaccpp.sh => yacc-cxx-grepping.sh} (100%)
 rename t/{yaccdry.sh => yacc-dry.sh} (100%)
 rename t/{yacc4.sh => yacc-misc.sh} (100%)
 rename t/{yaccvpath.sh => yacc-vpath.sh} (100%)

diff --git a/GNUmakefile b/GNUmakefile
index 74f672f..94ca0ec 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -25,8 +25,8 @@ ifeq ($(wildcard Makefile),)
   $(error Fatal Error)
 endif
 include ./Makefile
-include $(srcdir)/maint.mk
-include $(srcdir)/syntax-checks.mk
+include $(srcdir)/maint/maint.mk
+include $(srcdir)/maint/syntax-checks.mk
 
 else # ! bootstrap in $(MAKECMDGOALS)
 
diff --git a/Makefile.am b/Makefile.am
index 13f4194..2ab657a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,8 +60,6 @@ EXTRA_DIST += \
   $(AUTOMAKESOURCES) \
   bootstrap.sh \
   GNUmakefile \
-  maint.mk \
-  syntax-checks.mk \
   HACKING \
   NG-NEWS \
   $(gitlog_to_changelog_fixes)
@@ -108,8 +106,8 @@ maintainer-clean-local:
        rm -rf .autom4te.cache
 
 # So that automake won't complain about the missing ChangeLog.
-# The real rule for ChangeLog generation is now in maint.mk (as
-# it is maintainer-specific).
+# The real rule for ChangeLog generation is now in main/maint.mk
+# (as it is maintainer-specific).
 ChangeLog:
 
 
@@ -367,7 +365,7 @@ XFAIL_TESTS = \
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
-# Keep this in sync with the similar list in 'runtest.in'.
+# Keep this in sync with the similar list in 't/ax/runtest.in'.
 AM_TESTS_ENVIRONMENT = \
   for v in \
     required \
@@ -452,12 +450,12 @@ EXTRA_DIST += t/ax/shell-no-trail-bslash.in
 CLEANFILES += t/ax/shell-no-trail-bslash
 noinst_SCRIPTS += t/ax/shell-no-trail-bslash
 
-runtest: runtest.in Makefile
+runtest: t/ax/runtest.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
        $(AM_V_GEN)$(do_subst)
        $(AM_V_at)chmod a+x address@hidden
        $(generated_file_finalize)
-EXTRA_DIST += runtest.in
+EXTRA_DIST += t/ax/runtest.in
 CLEANFILES += runtest
 noinst_SCRIPTS += runtest
 
@@ -660,3 +658,14 @@ EXTRA_DIST += \
 EXTRA_DIST += \
   $(addprefix old/ChangeLog., 96 98 00 01 02 03 04 09 11) \
   old/ChangeLog-tests old/TODO
+
+## ---------------------------------------- ##
+##  Maintainer-specific files and scripts.  ##
+## ---------------------------------------- ##
+  
+EXTRA_DIST += \
+  maint/am-ft \
+  maint/am-xft \
+  maint/rename-tests \
+  maint/maint.mk \
+  maint/syntax-checks.mk
diff --git a/NEWS b/NEWS
index 4fb7ab7..a1842c3 100644
--- a/NEWS
+++ b/NEWS
@@ -126,6 +126,35 @@ New in 1.13.2:
     configure runtime (unfortunately, Autoconf does not yet support this
     scenario, so we cannot delegate the work to it).
 
+* Texinfo support:
+
+  - Automake can now be instructed to place '.info' files generated from
+    Texinfo input in the builddir rather than in the srcdir; this is done
+    specifying the new automake option 'info-in-builddir'.  This feature
+    was requested by the developers of GCC, GDB, GNU binutils and the GNU
+    bfd library.  See the extensive discussion about automake bug#11034
+    for more details.
+
+  - For quite a long time, Automake has been implementing an undocumented
+    hack which ensured that '.info' files which appeared to be cleaned
+    (by e.g. being listed in the CLEANFILES or DISTCLEANFILES variables)
+    were built in the builddir rather than in the srcdir; this hack was
+    introduced to ensure better backward-compatibility with packages such
+    as Texinfo, which did things like:
+
+        info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+        DISTCLEANFILES = texinfo texinfo-* info*.info*
+        # Do not create info files for distribution.
+        dist-info:
+            @:
+
+    in order not to distribute generated '.info' files.
+
+    Now that we have the 'info-in-builddir' option that explicitly causes
+    generated '.info' files to be placed in the builddir, this hack should
+    be longer necessary, so we deprecate it with runtime warnings.  It will
+    likely be removed altogether in Automake 1.14.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.13.1:
diff --git a/automake.in b/automake.in
index 2bb3e1f..2649d3a 100644
--- a/automake.in
+++ b/automake.in
@@ -2832,23 +2832,50 @@ sub handle_texinfo_helper ($)
       # have a single variable ($INSRC) that controls whether
       # the current .info file must be built in the source tree
       # or in the build tree.  Actually this variable is switched
-      # off for .info files that appear to be cleaned; this is
-      # for backward compatibility with package such as Texinfo,
-      # which do things like
-      #   info_TEXINFOS = texinfo.texi info-stnd.texi info.texi
-      #   DISTCLEANFILES = texinfo texinfo-* info*.info*
-      #   # Do not create info files for distribution.
-      #   dist-info:
-      # in order not to distribute .info files.
-      my $insrc = ($out_file =~ $user_cleaned_files) ? 0 : 1;
-
-      my $soutdir = '$(srcdir)/' . $outdir;
-      $outdir = $soutdir if $insrc;
+      # off in two cases:
+      #  (1) For '.info' files that appear to be cleaned; this is for
+      #      backward compatibility with package such as Texinfo,
+      #      which do things like
+      #        info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+      #        DISTCLEANFILES = texinfo texinfo-* info*.info*
+      #        # Do not create info files for distribution.
+      #        dist-info:
+      #      in order not to distribute .info files.
+      #  (2) When the undocumented option 'info-in-builddir' is given.
+      #      This is done to allow the developers of GCC, GDB, GNU
+      #      binutils and the GNU bfd library to force the '.info' files
+      #      to be generated in the builddir rather than the srcdir, as
+      #      was once done when the (now removed) 'cygnus' option was
+      #      given.  See automake bug#11034 for more discussion.
+      my $insrc = 1;
+
+      if (option 'info-in-builddir')
+        {
+          $insrc = 0;
+        }
+      elsif ($out_file =~ $user_cleaned_files)
+        {
+          $insrc = 0;
+          msg 'obsolete', "$am_file.am", <<EOF;
+Oops!
+    It appears this file (or files included by it) are triggering
+    an undocumented, soon-to-be-removed automake hack.
+    Future automake versions will no longer place in the builddir
+    (rather than in the srcdir) the generated '.info' files that
+    appear to be cleaned, by e.g. being listed in CLEANFILES or
+    DISTCLEANFILES.
+    If you want your '.info' files to be placed in the builddir
+    rather than in the srcdir, you have to use the shiny new
+    'info-in-builddir' automake option.
+EOF
+        }
+
+      $outdir = '$(srcdir)/' . $outdir if $insrc;
 
       # If user specified file_TEXINFOS, then use that as explicit
       # dependency list.
       @texi_deps = ();
-      push (@texi_deps, "$soutdir$vtexi") if $vtexi;
+      push (@texi_deps, "$outdir$vtexi") if $vtexi;
 
       my $canonical = canonicalize ($infobase);
       if (var ($canonical . "_TEXINFOS"))
@@ -2895,8 +2922,8 @@ sub handle_texinfo_helper ($)
                                          new Automake::Location,
                                          TEXI     => $texi,
                                          VTI      => $vti,
-                                         STAMPVTI => "${soutdir}stamp-$vti",
-                                         VTEXI    => "$soutdir$vtexi");
+                                         STAMPVTI => "${outdir}stamp-$vti",
+                                         VTEXI    => "$outdir$vtexi");
        }
     }
 
diff --git a/bootstrap.sh b/bootstrap.sh
index 9a1b668..5801436 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -102,12 +102,13 @@ $PERL ./gen-testsuite-part > testsuite-autodeps.tmp
 chmod a-w testsuite-autodeps.tmp
 mv -f testsuite-autodeps.tmp testsuite-autodeps.am
 
-# Run the autotools.
+# Run the autotools.  Bail out if any warning is triggered.
 # Use '-I' here so that our own *.m4 files in m4/ gets included,
 # not copied, in aclocal.m4.
-$PERL ./aclocal.tmp -I m4 --automake-acdir m4 --system-acdir m4/acdir
-$AUTOCONF
-$PERL ./automake.tmp
+$PERL ./aclocal.tmp -Wall -Werror -I m4 \
+                    --automake-acdir=m4 --system-acdir=m4/acdir
+$AUTOCONF -Wall -Werror
+$PERL ./automake.tmp -Wall -Werror
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
diff --git a/configure.ac b/configure.ac
index 4fbbf82..f05d392 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,8 @@ AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 dnl We call AC_PROG_CC in an unusual way, and only for use in our
 dnl testsuite, so also use 'no-dependencies' and 'no-define' among
 dnl the automake options to avoid bloating and potential problems.
-AM_INIT_AUTOMAKE([filename-length-max=99 ng no-define no-dependencies])
+AM_INIT_AUTOMAKE([ng -Wall -Werror filename-length-max=99 
+                  no-define no-dependencies])
 
 ## Keep this on a line of its own, since it must be found and processed
 ## by the 'update-copyright' rule in our Makefile.
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index a674573..69178c2 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -7731,6 +7731,11 @@ install} (unless you use @option{no-installinfo}, see 
below).
 Furthermore, @file{.info} files are automatically distributed so that
 Texinfo is not a prerequisite for installing your package.
 
+It is worth noting that, contrary to what happens with the other formats,
+the generated @file{.info} files are by default placed in @code{srcdir}
+rather than in the @code{builddir}.  This can be changed with the
address@hidden option.
+
 @trindex dvi
 @trindex html
 @trindex pdf
@@ -9970,6 +9975,14 @@ options below.  This option should be used in the 
top-level
 @file{configure.ac}, it will be ignored otherwise.  It will also be
 ignored in sub-packages of nested packages (@pxref{Subpackages}).
 
address@hidden @option{info-in-builddir}
address@hidden Option, @option{info-in-builddir}
address@hidden info-in-builddir
+Instruct Automake to place the generated @file{.info} files in the
address@hidden rather than in the @code{srcdir}.  Note that this
+might make VPATH builds with some non-GNU make implementations more
+brittle.
+
 @item @option{ng}
 @cindex Option, @option{ng}
 @opindex ng
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 49a307f..8782c79 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -270,6 +270,7 @@ sub _is_valid_easy_option ($)
     check-news
     color-tests
     dejagnu
+    info-in-builddir
     ng
     no-define
     no-dependencies
diff --git a/maint/am-ft b/maint/am-ft
new file mode 100755
index 0000000..d8a2722
--- /dev/null
+++ b/maint/am-ft
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+# Remote testing of Automake tarballs made easy.
+# This script requires Bash 4.x or later.
+# TODO: some documentation would be nice ...
+
+set -u
+me=${0##*/}
+
+fatal () { echo "$me: $*" >&2; exit 1; }
+
+cmd='
+  test_script=$HOME/.am-test/run
+  if test -f "$test_script" && test -x "$test_script"; then
+    "$test_script" "$@"
+  else
+    nice -n19 ./configure && nice -n19 make -j10 check
+  fi
+'
+
+remote=
+interactive=1
+while test $# -gt 0; do
+  case $1 in
+   -b|--batch) interactive=0;;
+   -c|--command) cmd=${2-}; shift;;
+   -*) fatal "'$1': invalid option";;
+    *) remote=$1; shift; break;;
+  esac
+  shift
+done
+[[ -n $remote ]] || fatal "no remote given"
+
+if ((interactive)); then
+  do_on_error='{
+    AM_TESTSUITE_FAILED=yes
+    export AM_TESTSUITE_FAILED
+    # We should not modify the environment with which the failed
+    # tests have run, hence do not read ".profile", ".bashrc", and
+    # company.
+    exec bash --noprofile --norc -i
+  }'
+else
+  do_on_error='exit $?'
+fi
+
+tarball=$(echo automake*.tar.xz)
+
+case $tarball in
+  *' '*) fatal "too many automake tarballs: $tarball";;
+esac
+
+test -f $tarball || fatal "no automake tarball found"
+
+distdir=${tarball%%.tar.xz}
+
+env='PATH=$HOME/bin:$PATH'
+if test -t 1; then
+  env+=" TERM='$TERM' AM_COLOR_TESTS=always"
+fi
+
+# This is tempting:
+#   $ ssh "command" arg-1 ... arg-2
+# but doesn't work as expected.  So we need the following hack
+# to propagate the command line arguments to the remote shell.
+quoted_args=--
+while (($# > 0)); do
+  case $1 in
+    *\'*) quoted_args+=" "$(printf '%s\n' "$1" | sed "s/'/'\\''/g");;
+       *) quoted_args+=" '$1'";;
+  esac
+  shift
+done
+
+set -e
+set -x
+
+scp $tarball $remote:tmp/
+
+# Multiple '-t' to force tty allocation.
+ssh -t -t $remote "
+  set -x; set -e; set -u;
+  set $quoted_args
+  cd tmp
+  if test -e $distdir; then
+    # Use 'perl', not only 'rm -rf', to correctly handle read-only
+    # files or directory.  Fall back to 'rm' if something goes awry.
+    perl -e 'use File::Path qw/rmtree/; rmtree(\"$distdir\")' \
+      || rm -rf $distdir || exit 1
+    test ! -e $distdir
+  fi
+  xz -dc $tarball | tar xf -
+  cd $distdir
+  "'
+  am_extra_acdir=$HOME/.am-test/extra-aclocal
+  am_extra_bindir=$HOME/.am-test/extra-bin
+  am_extra_setup=$HOME/.am-test/extra-setup.sh
+  if test -d "$am_extra_acdir"; then
+    export ACLOCAL_PATH=$am_extra_acdir${ACLOCAL_PATH+":$ACLOCAL_PATH"}
+  fi
+  if test -d "$am_extra_bindir"; then
+    export PATH=$am_extra_bindir:$PATH
+  fi
+  '"
+  export $env
+  if test -f \"\$am_extra_setup\"; then
+    . \"\$am_extra_setup\"
+  fi
+  ($cmd) || $do_on_error
+"
diff --git a/maint/am-xft b/maint/am-xft
new file mode 100755
index 0000000..564aa3b
--- /dev/null
+++ b/maint/am-xft
@@ -0,0 +1,3 @@
+#!/bin/sh
+MAKE=${MAKE-make} GIT=${GIT-git}
+$GIT clean -fdx && $MAKE bootstrap && $MAKE dist && exec am-ft "$@"
diff --git a/maint.mk b/maint/maint.mk
similarity index 100%
rename from maint.mk
rename to maint/maint.mk
diff --git a/maint/rename-tests b/maint/rename-tests
new file mode 100755
index 0000000..6fce9fe
--- /dev/null
+++ b/maint/rename-tests
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+# Convenience script to rename test cases in Automake.
+
+set -e -u
+
+me=${0##*/}
+fatal () { echo "$me: $*" >&2; exit 1; }
+
+case $# in
+  0) input=$(cat);;
+  1) input=$(cat -- "$1");;
+  *) fatal "too many arguments";;
+esac
+
+AWK=${AWK-awk}
+SED=${SED-sed}
+
+[[ -f automake.in && -d lib/Automake ]] \
+  || fatal "can only be run from the top-level of the Automake source tree"
+
+$SED --version 2>&1 | grep GNU >/dev/null 2>&1 \
+  || fatal "GNU sed is required by this script"
+
+# Validate and cleanup input.
+input=$(
+  $AWK -v me="$me" "
+    /^#/ { next; }
+    (NF == 0) { next; }
+    (NF != 2) { print me \": wrong number of fields at line \" NR;
+                exit(1); }
+    { printf (\"t/%s t/%s\\n\", \$1, \$2); }
+  " <<<"$input")
+
+# Prepare git commit message.
+exec 5>$me.git-msg
+echo "tests: more significant names for some tests" >&5
+echo >&5
+$AWK >&5 <<<"$input" \
+  '{ printf ("* %s: Rename...\n* %s: ... like this.\n", $1, $2) }'
+exec 5>&-
+
+# Rename tests.
+eval "$($AWK '{ printf ("git mv %s %s\n", $1, $2) }' <<<"$input")"
+
+# Adjust the list of tests (do this conditionally, since such a
+# list is not required nor used in Automake-NG.
+if test -f t/list-of-tests.mk; then
+  $SED -e "$($AWK '{ printf ("s|^%s |%s |\n", $1, $2) }' <<<"$input")" \
+       -i t/list-of-tests.mk
+fi
+
+git status
diff --git a/syntax-checks.mk b/maint/syntax-checks.mk
similarity index 100%
rename from syntax-checks.mk
rename to maint/syntax-checks.mk
diff --git a/runtest.in b/t/ax/runtest.in
similarity index 87%
rename from runtest.in
rename to t/ax/runtest.in
index e9d5372..22acfc5 100644
--- a/runtest.in
+++ b/t/ax/runtest.in
@@ -1,4 +1,5 @@
 address@hidden@
+# @configure_input@
 #
 # Copyright (C) 2012-2013 Free Software Foundation, Inc.
 #
@@ -61,6 +62,7 @@ for v in \
 done
 unset v
 
+xecho () { printf '%s\n' "$*"; }
 error () { echo "$0: $*" >&2; exit 255; }
 
 # Some shell flags should be passed over to the test scripts.
@@ -68,7 +70,8 @@ shell_opts=
 while test $# -gt 0; do
   case $1 in
     --help)
-       echo "Usage: $0 [--shell=PATH] [SHELL-OPTIONS] TEST [TEST-OPTIONS]"
+       xecho "Usage: $0 [--shell=PATH] [-k] [SHELL-OPTIONS]" \
+             "[VAR=VALUE ...] TEST [TEST-OPTIONS]"
        exit $?
        ;;
     --shell)
@@ -84,9 +87,17 @@ while test $# -gt 0; do
        shell_opts="$shell_opts -o $2"
        shift
        ;;
+    -k|--keep-testdir|--keep-testdirs)
+       keep_testdirs=yes; export keep_testdirs;;
     -*)
        # Assume it is an option to pass through to the shell.
        shell_opts="$shell_opts $1";;
+    *=*)
+       var=${1%%=*} val=${1#*=}
+       xecho "$var" | LC_ALL=C grep '^[a-zA-Z_][a-zA-Z0-9_]*$' >/dev/null \
+         || error "'$var': invalid variable name"
+       eval "$var=\$val && export $var" || exit 1
+       ;;
      *)
        break;;
   esac
diff --git a/t/backslash-issues.sh b/t/backslash-issues.sh
old mode 100644
new mode 100755
diff --git a/t/extra-data.sh b/t/extra-data.sh
old mode 100644
new mode 100755
diff --git a/t/self-check-dir.tap b/t/self-check-dir.tap
index 442d1d4..87034b3 100755
--- a/t/self-check-dir.tap
+++ b/t/self-check-dir.tap
@@ -65,7 +65,7 @@ do_check 'do not pre-populate testdir' \
 do_check 'do not create nor chdir in testdir' \
          'am_create_testdir=no' \
          'test ! -e t/_self.dir || exit 1
-          grep "compare-autodiffs" maint.mk || exit 1
+          grep "compare-autodiffs" maint/maint.mk || exit 1
           case $(pwd) in '"$cwd"') : ;; *) exit 1;; esac'
 
 :
diff --git a/t/txinfo25.sh b/t/txinfo-builddir.sh
similarity index 50%
copy from t/txinfo25.sh
copy to t/txinfo-builddir.sh
index 369a759..148a1a6 100755
--- a/t/txinfo25.sh
+++ b/t/txinfo-builddir.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
@@ -14,44 +14,67 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that info files are built in builddir and in srcdir can safely
-# co-exist.  This setup is obtained by having two info files, only one
-# of which being cleaned.
-# (Similar to txinfo16.sh, plus CLEANFILES).
-# (See also txinfo23.sh and txinfo24.sh).
+# Check that info files are built in builddir when needed.
+# This test that this can be done through the so far undocumented
+# option 'info-in-builddir', as requested by at least GCC, GDB,
+# GNU binutils and the GNU bfd library.  See automake bug#11034.
 
 required='makeinfo tex texi2dvi'
 . test-init.sh
 
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am << 'END'
-CLEANFILES = [a-m]*.info
-info_TEXINFOS = main.texi other.texi
+AUTOMAKE_OPTIONS = info-in-builddir
+info_TEXINFOS = foo.texi subdir/bar.texi mu.texi
+subdir_bar_TEXINFOS = subdir/inc.texi
+CLEANFILES = mu.info
+
+# mu.info should not be rebuilt in the current directory, since
+# it's up-to-date in $(srcdir).
+# This can be caused by a subtle issue related to VPATH handling
+# of version.texi (see also the comment in texi-vers.am): because
+# stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
+# rule is always triggered.  Still that's not a reason for 'make'
+# to think 'version.texi' has been created...
+check-local:
+       test ! -e mu.info
+       test -f ../mu.info
 END
 
-cat > main.texi << 'END'
+mkdir subdir
+
+cat > foo.texi << 'END'
 \input texinfo
address@hidden main.info
address@hidden main
address@hidden foo.info
address@hidden foo
 @node Top
 Hello walls.
 @include version.texi
 @bye
 END
 
-cat > other.texi << 'END'
+cat > mu.texi << 'END'
 \input texinfo
address@hidden other.info
address@hidden other
address@hidden mu.info
address@hidden mu
address@hidden Top
+Mu mu mu.
address@hidden
+END
+
+cat > subdir/bar.texi << 'END'
+\input texinfo
address@hidden bar.info
address@hidden bar
 @node Top
 Hello walls.
address@hidden version2.texi
address@hidden inc.texi
 @bye
 END
 
+echo "I'm included." > subdir/inc.texi
+
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
@@ -59,53 +82,46 @@ $AUTOCONF
 mkdir build
 cd build
 ../configure
-$MAKE
-test -f main.info
-test ! -e ../main.info
-test ! -e other.info
-test -f ../other.info
-
-cd ..
-rm -rf build
-./configure
-$MAKE
-test -f main.info
-test -f other.info
+$MAKE info
+test -f foo.info
+test -f subdir/bar.info
+test -f mu.info
+test -f stamp-vti
+test -f version.texi
+test ! -e ../foo.info
+test ! -e ../subdir/bar.info
+test ! -e ../mu.info
+test ! -e ../stamp-vti
+test ! -e ../version.texi
+$MAKE clean
+test -f foo.info
+test -f subdir/bar.info
+test ! -e mu.info
+test -f stamp-vti
+test -f version.texi
 
 # Make sure stamp-vti is older that version.texi.
 # (A common situation in a real tree).
-# This is needed to test the "subtle" issue described below.
-test -f stamp-vti
-test -f version.texi
-test -f stamp-1
-test -f version2.texi
 $sleep
 touch stamp-vti
-touch stamp-1
+
+$MAKE distcheck
+# Being distributed, this file should have been rebuilt.
+test -f mu.info
 
 $MAKE distclean
 test -f stamp-vti
-test -f stamp-1
 test -f version.texi
-test -f version2.texi
+test -f foo.info
+test -f subdir/bar.info
+test ! -e mu.info
 
-mkdir build
-cd build
 ../configure
-$MAKE
-# other.info should not be rebuilt in the current directory, since
-# it's up-to-date in $(srcdir).
-# This can be caused by a subtle issue related to VPATH handling
-# of version.texi (see also the comment in texi-vers.am): because
-# stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
-# rule is always triggered.  Still that's not a reason for 'make'
-# to think 'version.texi' has been created...
-test -f main.info
-test ! -e other.info
-$MAKE dvi
-test -f main.dvi
-test -f other.dvi
-
-$MAKE distcheck
+$MAKE maintainer-clean
+test ! -e stamp-vti
+test ! -e version.texi
+test ! -e foo.info
+test ! -e subdir/bar.info
+test ! -e mu.info
 
 :
diff --git a/t/txinfo23.sh b/t/txinfo23.sh
index c2b2797..6c2d9ce 100755
--- a/t/txinfo23.sh
+++ b/t/txinfo23.sh
@@ -53,9 +53,12 @@ I'm included.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_run --add-missing -Wno-error
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
 mkdir build
 cd build
 ../configure
diff --git a/t/txinfo24.sh b/t/txinfo24.sh
index bfad312..9daa82e 100755
--- a/t/txinfo24.sh
+++ b/t/txinfo24.sh
@@ -41,7 +41,7 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-obsolete
 $AUTOCONF
 
 mkdir build
diff --git a/t/txinfo25.sh b/t/txinfo25.sh
index 369a759..aad0cb7 100755
--- a/t/txinfo25.sh
+++ b/t/txinfo25.sh
@@ -53,9 +53,14 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_fails --add-missing
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
+$AUTOMAKE --add-missing -Wno-obsolete
+
 mkdir build
 cd build
 ../configure
diff --git a/t/txinfo28.sh b/t/txinfo28.sh
index 171632a..191a218 100755
--- a/t/txinfo28.sh
+++ b/t/txinfo28.sh
@@ -50,7 +50,7 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-error
 $AUTOCONF
 
 mkdir build
diff --git a/t/yaccpp.sh b/t/yacc-cxx-grepping.sh
similarity index 100%
rename from t/yaccpp.sh
rename to t/yacc-cxx-grepping.sh
diff --git a/t/yaccdry.sh b/t/yacc-dry.sh
similarity index 100%
rename from t/yaccdry.sh
rename to t/yacc-dry.sh
diff --git a/t/yacc4.sh b/t/yacc-misc.sh
similarity index 100%
rename from t/yacc4.sh
rename to t/yacc-misc.sh
diff --git a/t/yaccvpath.sh b/t/yacc-vpath.sh
similarity index 100%
rename from t/yaccvpath.sh
rename to t/yacc-vpath.sh


hooks/post-receive
-- 
GNU Automake



reply via email to

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