automake-commit
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.1-58-ge4fc1da
Date: Thu, 03 Jan 2013 14:04:01 +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=e4fc1dad85ab0a6f3f408a2f74059b826457b4dd

The branch, master has been updated
       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  97d770d69c3522beab5aec18d135d84b3b5eb449 (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 e4fc1dad85ab0a6f3f408a2f74059b826457b4dd
Merge: 97d770d 654324c
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 14:42:55 2013 +0100

    Merge branch 'maint'
    
    * maint:
      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

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

Summary of changes:
 GNUmakefile                                |    4 +-
 Makefile.am                                |   27 ++++--
 NEWS                                       |   29 +++++++
 automake.in                                |   57 +++++++++----
 bootstrap.sh                               |    9 +-
 configure.ac                               |    2 +-
 doc/automake.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/list-of-tests.mk                         |   11 ++-
 t/{spy.sh => spy-double-colon.sh}          |    0
 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
 25 files changed, 376 insertions(+), 96 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 (86%)
 mode change 100644 => 100755 t/backslash-issues.sh
 mode change 100644 => 100755 t/extra-data.sh
 rename t/{spy.sh => spy-double-colon.sh} (100%)
 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 21db5c4..d6baaaa 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 389da43..78aabbf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,8 +69,6 @@ EXTRA_DIST += \
   $(AUTOMAKESOURCES) \
   bootstrap.sh \
   GNUmakefile \
-  maint.mk \
-  syntax-checks.mk \
   HACKING
 
 # Make versioned links.  We only run the transform on the root name;
@@ -117,8 +115,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:
 
 
@@ -336,7 +334,7 @@ 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 \
@@ -444,14 +442,14 @@ 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)in=runtest.in \
+       $(AM_V_GEN)in=t/ax/runtest.in \
          && $(MKDIR_P) t/ax \
-         && $(do_subst) <$(srcdir)/runtest.in >address@hidden \
+         && $(do_subst) <$(srcdir)/$$in >address@hidden \
          && chmod a+x address@hidden
        $(generated_file_finalize)
-EXTRA_DIST += runtest.in
+EXTRA_DIST += t/ax/runtest.in
 CLEANFILES += runtest
 noinst_SCRIPTS += runtest
 
@@ -676,3 +674,14 @@ EXTRA_DIST += \
   old/ChangeLog.09 \
   old/ChangeLog.11 \
   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 68d14c9..d2e12a9 100644
--- a/automake.in
+++ b/automake.in
@@ -3265,23 +3265,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.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.
-      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"))
@@ -3335,8 +3362,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",
                                          MDDIR    => $conf_dir,
                                          DIRSTAMP => $dirstamp);
        }
diff --git a/bootstrap.sh b/bootstrap.sh
index cc5ec97..7704fc1 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -104,12 +104,13 @@ $PERL ./gen-testsuite-part > t/testsuite-part.tmp
 chmod a-w t/testsuite-part.tmp
 mv -f t/testsuite-part.tmp t/testsuite-part.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 e8af0fc..f066e34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ 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([dist-xz filename-length-max=99 color-tests
+AM_INIT_AUTOMAKE([-Wall -Werror dist-xz filename-length-max=99
                   no-define no-dependencies])
 
 ## Keep this on a line of its own, since it must be found and processed
diff --git a/doc/automake.texi b/doc/automake.texi
index c5e7bc4..b1e3a8c 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7781,6 +7781,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
@@ -10041,6 +10046,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{no-define}
 @cindex Option, @option{no-define}
 @opindex no-define
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 3674920..3932798 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -276,6 +276,7 @@ sub _is_valid_easy_option ($)
     dist-tarZ
     dist-xz
     dist-zip
+    info-in-builddir
     no-define
     no-dependencies
     no-dist
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 86%
rename from runtest.in
rename to t/ax/runtest.in
index 364ba4a..57ce889 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.
 #
@@ -57,6 +58,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.
@@ -64,7 +66,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)
@@ -80,9 +83,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/list-of-tests.mk b/t/list-of-tests.mk
index 6b60822..e8efe45 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -991,7 +991,7 @@ t/spell.sh \
 t/spell2.sh \
 t/spell3.sh \
 t/spelling.sh \
-t/spy.sh \
+t/spy-double-colon.sh \
 t/spy-rm.tap \
 t/stdinc.sh \
 t/stamph2.sh \
@@ -1159,6 +1159,7 @@ t/tests-environment-and-log-compiler.sh \
 t/txinfo-absolute-srcdir-pr408.sh \
 t/txinfo-add-missing-and-dist.sh \
 t/txinfo-bsd-make-recurs.sh \
+t/txinfo-builddir.sh \
 t/txinfo-clean.sh \
 t/txinfo-dvi-recurs.sh \
 t/txinfo-info-in-srcdir.sh \
@@ -1235,10 +1236,10 @@ t/werror3.sh \
 t/werror4.sh \
 t/whoami.sh \
 t/xsource.sh \
-t/yacc4.sh \
-t/yaccdry.sh \
-t/yaccpp.sh \
-t/yaccvpath.sh \
+t/yacc-misc.sh \
+t/yacc-dry.sh \
+t/yacc-cxx-grepping.sh \
+t/yacc-vpath.sh \
 t/yacc-auxdir.sh \
 t/yacc-basic.sh \
 t/yacc-cxx.sh \
diff --git a/t/spy.sh b/t/spy-double-colon.sh
similarity index 100%
rename from t/spy.sh
rename to t/spy-double-colon.sh
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]