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.13.1-24-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.13.1-24-g654324c
Date: Thu, 03 Jan 2013 13:42:49 +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=654324c756210161c61484f754a1df77aa748a78

The branch, maint has been updated
       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  c1a8f56295d9c1621c65de28400cd1d93f037063 (commit)
       via  36ee783a1000b5a1e52b81e5564de19ffb99fd37 (commit)
      from  8288e78b83af0bdd660fdf1f8b0682e5a3d2b49d (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 654324c756210161c61484f754a1df77aa748a78
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 14:39:39 2013 +0100

    build: don't enable 'color-tests' automake option explicitly
    
    It's enabled by default since commit 'v1.12.2-136-g2d5571e' (this
    change appeared in Automake 1.13).
    
    * configure.ac (AM_INIT_AUTOMAKE): Drop 'color-tests'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 975a2afb4c7dbb4ec612e7ae38238bea0d805003
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 14:32:54 2013 +0100

    build: enable all warnings as fatal in our own build system
    
    Automake should of course be able to bootstrap itself in a
    warning-free manner w.r.t. the Autotools.  So make any failure
    to do so fatal.  Not doing so caused the regression fixed by
    previous commit 'v1.13.1-22-ga790fae' to go unnoticed.
    
    * configure.ac (AM_INIT_AUTOMAKE): Add '-Werror' and '-Wall'.
    * bootstrap.sh: Pass the '-Wall -Werror' options to aclocal,
    automake and autoconf invocations.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a790fae9ba74c917af37a735167fe9e1106f4dd7
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 14:05:31 2013 +0100

    texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
    
    But they don't now, due to a regression introduced in commit
    'v1.13.1-4-gc1a8f56'.  Fix it.  The regression was hitting our
    own build system!
    
    * automake.in (handle_texinfo_helper): Only complain if the
    'info-in-builddir' is not active and a '.info' file (not any
    random file!) is listed in CLEANFILES or DISTCLEANFILES.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9e5579c5c5d692b0393349d3bdfa1d87e2eccbb9
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 13:42:20 2013 +0100

    tests: make two new test executable
    
    * t/backslash-issues.sh: This.
    * t/extra-data.sh: And this.
    
    Issue revealed by the 'sc_tests_executable' maintainer check.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0b1576ae2650d698fdf7c45f2a2b8ba3a0af40eb
Merge: a59ac34 c1a8f56
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 13:27:26 2013 +0100

    Merge branch 'info-in-builddir' into maint
    
    * info-in-builddir:
      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>

commit a59ac344dfe05e36a69cb70c49750d81b02a06ed
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 13:16:14 2013 +0100

    runtest: better command line API
    
    * t/ax/runtest.in: Accept options '-k' and '--keep-testdirs' (same
    as exporting '$keep_testdirs' to "yes").  To improve compatibility
    with the "make check" interface, allow environment variables to be
    passes on the command line.  Minor adjustments while at it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit da0dfbe7715c8f9558d7ee212b7eb8aac852a2ec
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 12:54:07 2013 +0100

    tests: move runtest.in away from the top-lever directory
    
    Not only this leaves the top-lever directory less cluttered, but
    helps in keeping the testsuite-related files more "centralized".
    
    * runtest.in: Move ...
    * t/ax/runtest.in: ... here.  While at it, add customary
    '@configure_input@' comment line.
    * Makefile.am (runtest, EXTRA_DIST): Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 6d80cc2dba29a680cec596e233fab1e6185391b0
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 3 12:23:51 2013 +0100

    maint: move more maintainer files in the 'maint/' subdir
    
    * maint.mk: Move ...
    * maint/maint.mk: ... here.
    * syntax-checks.mk: Move ...
    * maint/syntax-checks.mk: ... here.
    * Makefile.am: Adjust.
    * GNUmakefile: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c1a8f56295d9c1621c65de28400cd1d93f037063
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jan 2 00:33:42 2013 +0100

    texi: deprecate hack about info files in CLEANFILES variables
    
    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 .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 is
    scheduled to be removed altogether in Automake 1.14.
    
    * automake.in (handle_texinfo_helper): Raise proper runtime warnings
    if the hack is triggered.
    * NEWS: Update.
    * t/txinfo28.sh: Adjust.
    * t/txinfo23.sh: Likewise.
    * t/txinfo25.sh: Adjust and extend.
    * t/txinfo24.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 36ee783a1000b5a1e52b81e5564de19ffb99fd37
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 3 22:02:55 2012 +0200

    texi: info files can be generated in the builddir
    
    User can now ask info files to be built in the $(builddir), rather than
    the $(srcdir), by specifying the 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.
    
    OK, to be honest, having '.info' files built in the builddir was
    *already* possible, but only using ugly and undocumented hacks involving
    definition of the CLEANFILES and/or DISTCLEANFILES.  For example, the
    binutils project did something like this in the relevant 'Makefile.am':
    
        # Automake 1.9 will only build info files in the objdir if they are
        # mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
        # though, so we use a bogus condition.
        if GENINSRC_NEVER
        DISTCLEANFILES = binutils.info
        endif
    
    See also the extensive discussion about automake bug#11034; in
    particular, the following messages:
    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#65>
    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#80>
    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#86>
    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#101>
    
    * lib/Automake/Options.pm (_is_valid_easy_option): Recognize the
    new 'info-in-builddir' option.
    * automake.in (handle_texinfo_helper): If that option is set,
    initialize '$insrc' to '0', so that info files will be generated
    in the builddir.  Adjust comments to match.
    * t/txinfo-builddir.sh: New test.
    * t/list-of-tests.mk: Add it.
    * NEWS: Update.
    * doc/automake.texi: Document the new options.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 GNUmakefile                                |    4 +-
 Makefile.am                                |   20 ++--
 NEWS                                       |   29 +++++++
 automake.in                                |   57 +++++++++----
 bootstrap.sh                               |    9 +-
 configure.ac                               |    2 +-
 doc/automake.texi                          |   13 +++
 lib/Automake/Options.pm                    |    1 +
 maint.mk => maint/maint.mk                 |    0
 syntax-checks.mk => maint/syntax-checks.mk |    0
 runtest.in => t/ax/runtest.in              |   13 +++-
 t/list-of-tests.mk                         |    1 +
 t/{txinfo25.sh => txinfo-builddir.sh}      |  126 ++++++++++++++++------------
 t/txinfo23.sh                              |    5 +-
 t/txinfo24.sh                              |    2 +-
 t/txinfo25.sh                              |    7 ++-
 t/txinfo28.sh                              |    2 +-
 17 files changed, 199 insertions(+), 92 deletions(-)
 rename maint.mk => maint/maint.mk (100%)
 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
 copy t/{txinfo25.sh => txinfo-builddir.sh} (50%)

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 f6db092..d868501 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:
 
 
@@ -339,7 +337,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 \
@@ -447,14 +445,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
 
@@ -687,4 +685,6 @@ EXTRA_DIST += \
 EXTRA_DIST += \
   maint/am-ft \
   maint/am-xft \
-  maint/rename-tests
+  maint/rename-tests \
+  maint/maint.mk \
+  maint/syntax-checks.mk
diff --git a/NEWS b/NEWS
index 277141d..b8106ad 100644
--- a/NEWS
+++ b/NEWS
@@ -70,6 +70,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 7a863cf..e8ba73f 100644
--- a/automake.in
+++ b/automake.in
@@ -3274,23 +3274,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"))
@@ -3344,8 +3371,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 07bcddd..0ea691d 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -111,12 +111,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 cea7aaa..d57ed62 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 ffc6819..e53a2e5 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7835,6 +7835,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
@@ -10095,6 +10100,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.mk b/maint/maint.mk
similarity index 100%
rename from maint.mk
rename to maint/maint.mk
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 67578fb..90eb34a 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -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 \
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


hooks/post-receive
-- 
GNU Automake



reply via email to

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