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.14.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.14.1-1022-ga5d11f7
Date: Tue, 30 Dec 2014 21:52:55 +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=a5d11f767dc15a2de2d6cbc12347e7cc121a1dd4

The branch, ng/master has been updated
       via  a5d11f767dc15a2de2d6cbc12347e7cc121a1dd4 (commit)
       via  36812809ab75a07e5e8387986fc35a805d80fa36 (commit)
       via  4cb0327adc1f085f4b9bacd0e6e1c2d7a88b92f6 (commit)
       via  86b397b6e4aa0dd5f29030dfb48e72afd7ae413a (commit)
       via  545e5740906595dff53c72af7153d4fa0392ccf8 (commit)
       via  b8aa9fc0ce8d411be4451022e4b14d0f4238a9d9 (commit)
       via  5a2ae66d8a190d80e8d132ad569c08fd207bb9bd (commit)
       via  8e29fa6bb50d9ab4a8a263c96c51efaa98b169e3 (commit)
       via  adc17cc491e2b6b1d5e0e966c6f03fed3573b980 (commit)
       via  269893bbd44f3f7ece2d9fbdc6d2dddbec969e6d (commit)
       via  0fae5905f9b676725a7e82c7aa03e8e3cbf5008a (commit)
       via  85aae58a93a52ce848346797690cf42b73ca9566 (commit)
       via  be85adf480272e24d9167c83715916d20eb9006b (commit)
       via  a4c0c62d52ad7b9785005302ee88311974b28dde (commit)
       via  75ba55ff95160c6a59995263e29ee6061b815881 (commit)
       via  50ae952fcbe12a086ef6bec7f4f2e46326e7b03d (commit)
       via  047e0cf6a836fc83a5ba335bf8eebd4fe354af0b (commit)
       via  cd040965d51f9818c56a714efaaaa699eb93b503 (commit)
       via  b9303ccf7f3c13fd9422b3457f3ffd20ad300ce3 (commit)
       via  c3da5a74ffef3cb177270b021c34bd4cd2bb80f5 (commit)
      from  a34409f0ab805c7f83cecc2f520bada748a07584 (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 a5d11f767dc15a2de2d6cbc12347e7cc121a1dd4
Merge: 5a2ae66 3681280
Author: Stefano Lattarini <address@hidden>
Date:   Tue Dec 30 22:51:26 2014 +0100

    Merge branch 'master' into ng/master
    
    * master:
      docs: "make distcheck" implementation details are not to be abused
      NEWS: improve and adjust in light of the oncoming 1.15 release
      shell-no-trail-bslash: improve diagnostic in case of failure
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 5a2ae66d8a190d80e8d132ad569c08fd207bb9bd
Author: Stefano Lattarini <address@hidden>
Date:   Tue Dec 30 12:22:07 2014 +0100

    [ng] tex, tags, install: make sure recipes don't end with '\' (backslash 
char)
    
    Some shells are unable to handle that.  Issue revealed by failures of the
    "check-no-trailing-backslash-in-recipes" rule.
    
    * lib/am/texinfos.mk, lib/am/tags.mk, lib/am/scripts.am: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8e29fa6bb50d9ab4a8a263c96c51efaa98b169e3
Merge: 85aae58 adc17cc
Author: Stefano Lattarini <address@hidden>
Date:   Sun Dec 28 19:13:40 2014 +0100

    Merge branch 'master' into ng/master
    
    * master:
      tests: make script 'shell-no-trail-bslash' simpler and more robust
      texinfo: remove hack about info files in CLEANFILES variables
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 85aae58a93a52ce848346797690cf42b73ca9566
Author: Stefano Lattarini <address@hidden>
Date:   Sun Dec 28 14:02:30 2014 +0100

    tests: make script 'shell-no-trail-bslash' simpler and more robust
    
    This solves spurious failure in the 'check-no-trailing-backslash-in-recipes'
    target for Automake-NG.
    
    * t/ax/shell-no-trail-bslash.in: Simplify and fortify.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit be85adf480272e24d9167c83715916d20eb9006b
Merge: a34409f 75ba55f
Author: Stefano Lattarini <address@hidden>
Date:   Sun Dec 28 11:56:32 2014 +0100

    Merge branch 'master' into ng/master
    
    * master:
      tests: avoid a possible failure due to autom4te cache staleness
      tests: fix spurious failure in test on TEXINFO_TEX overriding
      tests: avoid some spurious failures on AIX 7.1
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NEWS                                  |   83 +++++++++++++++++-------
 bin/automake.in                       |   66 ++++---------------
 doc/automake-ng.texi                  |   15 ++++-
 lib/am/lisp.am                        |    2 +-
 lib/am/scripts.am                     |    5 +-
 lib/am/tags.mk                        |    8 ++-
 lib/am/texinfos.mk                    |    6 +-
 t/ax/shell-no-trail-bslash.in         |  105 ++++++++++++++++--------------
 t/includes-deprecation.sh             |    2 +
 t/instmany-mans.sh                    |   14 +++-
 t/instmany-python.sh                  |   14 +++-
 t/instmany.sh                         |   14 +++-
 t/mdate5.sh                           |   51 +++++++++------
 t/parallel-tests-concurrency.sh       |    9 ++-
 t/self-check-shell-no-trail-bslash.sh |   38 +++++++++++-
 t/txinfo-clean.sh                     |    1 -
 t/txinfo-override-texinfo-tex.sh      |    6 +-
 t/txinfo23.sh                         |   69 -------------------
 t/txinfo24.sh                         |   83 -----------------------
 t/txinfo25.sh                         |  116 ---------------------------------
 t/txinfo28.sh                         |   89 -------------------------
 21 files changed, 266 insertions(+), 530 deletions(-)
 delete mode 100644 t/txinfo23.sh
 delete mode 100644 t/txinfo24.sh
 delete mode 100644 t/txinfo25.sh
 delete mode 100644 t/txinfo28.sh

diff --git a/NEWS b/NEWS
index 3d8b363..661112a 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,26 @@ New in 2.0:
    and later will *unconditionally* behave as older Automake versions did
    when the 'subdir-objects' option was given.
 
+* Texinfo support:
+
+  - Automake used to implement an undocumented hack causing '.info' files
+    that appeared to be cleaned (by e.g. being listed in the CLEANFILES
+    variable) to also be built in the builddir rather than in the srcdir;
+    this was for 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 is no
+    longer necessary.  We have thus removed\ it.
+
 * Aclocal search path:
 
   - Third-party m4 files located in the system-wide aclocal directory,
@@ -155,16 +175,43 @@ New in 1.15:
     extra useless "make all" recursive invocation in some corner cases
     (automake bug#16302).
 
-* Bugs fixed:
+* Distribution:
 
-  - The expansion of AM_INIT_AUTOMAKE ends once again with a trailing
-    newline (bug#16841).  Regression introduced in Automake 1.14.
+  - Automake bug#18286: "make distcheck" could sometimes fail to detect
+    missing files in the distribution tarball, especially in those cases
+    where both the generated files and their dependencies are explicitly
+    in $(srcdir).  An important example of this are *generated* makefile
+    fragments included at Automake time in Makefile.am; e.g.:
 
-  - The user can now extend the special .PRECIOUS target, the same way
-    he could already do with the .MAKE .and .PHONY targets.
+        ...
+        $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh
+            cd $(srcdir) && $(SHELL) preproc.sh <data.txt >fragment.am
+        include $(srcdir)/fragment.am
+        ...
 
-  - Fixed confusing typos in the manual and in some warning messages
-    (automake bug#16827 and bug#16997).
+    If the use forgot to add data.txt and/or preproc.sh in the distribution
+    tarball, "make distcheck" would have erroneously succeeded!  This issue
+    is now fixed.
+
+  - As a consequence of the previous change, "make distcheck" will run
+    using '$(distdir)/_build/sub' as the build directory, rather than
+    simply '$(distdir)/_build' (as it was with Automake 1.14 and earlier).
+    Consequently, the './configure' and 'make' invocations issued by the
+    distcheck recipe will have $(srcdir) equal to '../..', rather than to
+    just '..' (as it was with Automake 1.14 and earlier).  Dependent and
+    similar variables (e.g., top_srcdir) are also changed accordingly.
+
+    Thus, Makefiles that made assumptions about the exact values of the
+    build and source directories used by "make distcheck" will have to
+    be adjusted.  Notice that making such assumptions was a bad and
+    unsupported practice anyway, since the exact locations of those
+    directories should be considered implementation details, and we
+    reserve the right to change them at any time.
+
+* Miscellaneous bugs fixed:
+
+  - The expansion of AM_INIT_AUTOMAKE ends once again with a trailing
+    newline (bug#16841).  Regression introduced in Automake 1.14.
 
   - We no longer risk to use '$ac_aux_dir' before it's defined (see
     automake bug#15981). Bug introduced in Automake 1.14.
@@ -185,21 +232,11 @@ New in 1.15:
     something like "... overrides Automake target '$(srcdir)/foo.am".
     This bug is now fixed.
 
-  - Automake bug#18286: "make distcheck" could sometimes fail to detect
-    missing files in the distribution tarball, especially in those cases
-    where both the generated files and their dependencies are explicitly
-    in $(srcdir).  An important example of this are *generated* makefile
-    fragments included at Automake time in Makefile.am; e.g.:
-
-        ...
-        $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh
-            cd $(srcdir) && $(SHELL) preproc.sh <data.txt >fragment.am
-        include $(srcdir)/fragment.am
-        ...
+  - The user can now extend the special .PRECIOUS target, the same way
+    he could already do with the .MAKE .and .PHONY targets.
 
-    If the use forgot to add data.txt and/or preproc.sh in the distribution
-    tarball, "make distcheck" would have erroneously succeeded!  This issue
-    is now fixed.
+  - Fixed confusing typos in the manual and in some warning messages
+    (automake bug#16827 and bug#16997).
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -307,8 +344,8 @@ New in 1.14:
 
     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 2.0.
+    be longer necessary, so we deprecate it with runtime warnings.
+    It will be removed altogether in Automake 2.0.
 
 * Relative directory in Makefile fragments:
 
diff --git a/bin/automake.in b/bin/automake.in
index d699ec6..6f08c4b 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -2560,15 +2560,6 @@ sub handle_texinfo_helper
   my %versions;
   my $done = 0;
 
-  # Build a regex matching user-cleaned files.
-  my $d = var 'DISTCLEANFILES';
-  my $c = var 'CLEANFILES';
-  my @f = ();
-  push @f, $d->value_as_list_recursive (inner_expand => 1) if $d;
-  push @f, $c->value_as_list_recursive (inner_expand => 1) if $c;
-  @f = map { s|[^A-Za-z_0-9*\[\]\-]|\\$&|g; s|\*|[^/]*|g; $_; } @f;
-  my $user_cleaned_files = '^(?:' . join ('|', @f) . ')$';
-
   foreach my $texi
       ($info_texinfos->value_as_list_recursive (inner_expand => 1))
     {
@@ -2599,6 +2590,7 @@ sub handle_texinfo_helper
       # generic rules.
       my $outdir = dirname ($texi) . '/';
       $outdir = "" if $outdir eq './';
+      my $src_outdir = '$(srcdir)/'. $outdir;
       $out_file =  $outdir . $out_file;
 
       # Until Automake 1.6.3, .info files were built in the
@@ -2689,54 +2681,22 @@ sub handle_texinfo_helper
       # Consequently, starting with Automake 1.8, .info files are
       # built in the source tree again.  Because we still plan to
       # support non-distributed .info files at some point, we
-      # have a single variable ($INSRC) that controls whether
+      # 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 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;
-      my $soutdir = '$(srcdir)/' . $outdir;
-
-      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 = $soutdir if $insrc;
+      # off when the automake 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 = ! option 'info-in-builddir';
+      $outdir = $src_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, "${src_outdir}${vtexi}") if $vtexi;
 
       my $canonical = canonicalize ($infobase);
       if (var ($canonical . "_TEXINFOS"))
@@ -2783,8 +2743,8 @@ EOF
                                          new Automake::Location,
                                          TEXI     => $texi,
                                          VTI      => $vti,
-                                         STAMPVTI => "${soutdir}stamp-$vti",
-                                         VTEXI    => "${soutdir}${vtexi}");
+                                         STAMPVTI => "${src_outdir}stamp-$vti",
+                                         VTEXI    => "${src_outdir}$vtexi");
        }
     }
 
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index b2f166f..76b3cc2 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -1247,8 +1247,12 @@ uninstall} do not omit any file (@pxref{Standard 
Targets}),
 and it checks that @code{DESTDIR} installations work (@pxref{DESTDIR}).
 @end itemize
 
-All of these actions are performed in a temporary subdirectory, so
-that no root privileges are required.
+All of these actions are performed in a temporary directory, so that no
+root privileges are required.  Please note that the exact location and the
+exact structure of such a subdirectory (where the extracted sources are
+placed, how the temporary build and install directories are named and how
+deeply they are nested, etc.) is to be considered an implementation detail,
+which can change at any time; so do not rely on it.
 
 Releasing a package that fails @code{make distcheck} means that one of
 the scenarios we presented will not work and some users will be
@@ -8492,6 +8496,13 @@ finally, makes another tarball to ensure the 
distribution is
 self-contained.
 @end itemize
 
+All of these actions are performed in a temporary directory.  Please
+note that the exact location and the exact structure of such a directory
+(where the read-only sources are placed, how the temporary build and
+install directories are named and how deeply they are nested, etc.) is
+to be considered an implementation detail, which can change at any time;
+so do not reply on it.
+
 @vindex AM_DISTCHECK_CONFIGURE_FLAGS
 @vindex DISTCHECK_CONFIGURE_FLAGS
 @subheading DISTCHECK_CONFIGURE_FLAGS
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 2c1a446..eb7a011 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -93,7 +93,7 @@ uninstall-%DIR%LISP:
           $(foreach i,\
 ?BASE?      $(notdir $(%DIR%_LISP)), \
 ?!BASE?             $(patsubst $(srcdir)/%,%,$(%DIR%_LISP)), \
-## Also remove the '.elc' byte-compiled versions (if any).
+## Also remove the '.elc' byte-compiled versions, if any.
             $(i) $(i)c))
 endif %?INSTALL%
 
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 5211ab5..7f1169d 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -28,7 +28,10 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @test -n '$(and $(%DIR%_SCRIPTS),$(%NDIR%dir))' || exit 0; \
        echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
        $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
-       $(foreach i,$(%DIR%_SCRIPTS), \
+## Ending a recipe with a backslash cause some shells to choke,
+## so add a dummy ':' command to make sure the rest of the command
+## is not empty.
+       :; $(foreach i,$(%DIR%_SCRIPTS), \
          p=$(call am.vpath.rewrite,$i); \
 ## If the _SCRIPTS variable has an entry like foo/bar, install it as
 ## $(destdir)/bar, not $(destdir)/foo/bar.  The user can make a new dir
diff --git a/lib/am/tags.mk b/lib/am/tags.mk
index 46205fd..81adf87 100644
--- a/lib/am/tags.mk
+++ b/lib/am/tags.mk
@@ -89,14 +89,18 @@ ifneq ($(or 
$(ETAGS_ARGS),$(am.tags.subfiles),$(am.tags.files.unique)),)
        $(ETAGS) \
          $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
          $(foreach 
f,$(am.tags.subfiles),'$(am.tags.include-option)=$(CURDIR)/$f') \
-         $(am.tags.files.unique)
+## Some shells choke when a recipe ends with a backslash.  So make sure the
+## next line is not an empty string.
+         $(or $(am.tags.files.unique),;)
 endif
 
 ctags-am: $(TAGS_DEPENDENCIES) $(am.tags.files)
 ifneq ($(or $(CTAGS_ARGS),$(am.tags.files.unique)),)
        $(CTAGS) \
          $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-         $(am.tags.files.unique)
+## Some shells choke when a recipe ends with a backslash.  So make sure the
+## next line is not an empty string.
+         $(or $(am.tags.files.unique),;)
 endif
 
 am.clean.dist.f += TAGS tags
diff --git a/lib/am/texinfos.mk b/lib/am/texinfos.mk
index ee925e8..90f1eab 100644
--- a/lib/am/texinfos.mk
+++ b/lib/am/texinfos.mk
@@ -169,14 +169,14 @@ install-html-am: .am/install-html
        rellist='$(notdir $(and $(infodir),$^))'; \
        test -n "$$rellist" || exit 0; \
        for relfile in $$rellist; do \
-         echo " install-info --info-dir='$(DESTDIR)$(infodir)' 
'$(DESTDIR)$(infodir)/$$relfile'";\
+         echo " install-info --info-dir='$(DESTDIR)$(infodir)' 
'$(DESTDIR)$(infodir)/$$relfile'"; \
 ## Run ":" after install-info in case install-info fails.  We really
 ## don't care about failures here, because they can be spurious.  For
 ## instance if you don't have a dir file, install-info will fail.  I
 ## think instead it should create a new dir file for you.  This bug
 ## causes the "make distcheck" target to fail reliably.
-         install-info --info-dir="$(DESTDIR)$(infodir)" 
"$(DESTDIR)$(infodir)/$$relfile" || :;\
-       done; \
+         install-info --info-dir="$(DESTDIR)$(infodir)" 
"$(DESTDIR)$(infodir)/$$relfile" || :; \
+       done
 
 .am/install-dvi: $(DVIS)
        @$(NORMAL_INSTALL)
diff --git a/t/ax/shell-no-trail-bslash.in b/t/ax/shell-no-trail-bslash.in
index c3499f9..197927f 100644
--- a/t/ax/shell-no-trail-bslash.in
+++ b/t/ax/shell-no-trail-bslash.in
@@ -14,62 +14,71 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# A "shell" that chokes on '-c' commands having a trailing '\' character
-# (possibly followed by whitespace only).  This is to emulate problems
-# seen in older bash versions (e.g., bash 2.05b).
-# See also automake bug#10436.
+# A "shell" that chokes on '-c' commands and/or shell scripts having
+# a trailing '\' character (possibly followed by whitespace only).
+# This is to emulate problems seen in older bash versions (e.g., bash
+# 2.05b). See also automake bug#10436.
 
-set -e
 set -u
 
 am_SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}
 
-tab='  '
-nl='
+(
+  set -e
+  shell_command=; unset shell_command
+  shell_script=; unset shell_script
+  while test $# -gt 0; do
+    case $1 in
+      # The shell might be invoked by make e.g. as "sh -ec" or "sh -ce".
+      # Be liberal (in the spirit of defensive programming) and accept
+      # both forms.
+      -*c*) shell_command=$2; shift;;
+       -?*) ;;
+         *) break;;
+    esac
+    shift
+  done
+
+  if test x${shell_command+"set"} != x"set"; then
+    if test $# -gt 0; then
+      shell_script=$1
+      shell_command=$(cat <"$shell_script")
+    else
+      echo "$0: fatal: no shell script given," \
+            "nor a command given via the '-c' option" >&2
+      exit 1
+    fi
+  fi
+  original_shell_command=$shell_command
+
+  tab='        '
+  nl='
 '
-am_shell_flags=
-am_shell_command=; unset am_shell_command
-while test $# -gt 0; do
-  case $1 in
-    # The shell might be invoked by make e.g. as "sh -ec" or "sh -ce".
-    # Be liberal (in the spirit of defensive programming) and accept
-    # both forms.
-    -*c*)
-        am_flg=$(printf '%s\n' "$1" | sed -e 's/^-//' -e 's/c//g')
-        if test x"$am_flg" != x; then
-          am_shell_flags="$am_shell_flags -$am_flg"
+  case "$shell_command" in
+    *" "|*"$tab"|*"$nl")
+      shell_command=$(printf '%s\n' "$shell_command" | tr -d " $tab$nl");;
+  esac
+
+  case "$shell_command" in
+    *\\)
+      {
+        printf '%s\n' "$0: recipe/script ends with backslash character"
+        printf '%s\n' "=== BEGIN recipe/script"
+        if test x${shell_script+"set"} = x"set"; then
+          cat <"$shell_script"
+        else
+          printf '%s\n' "$original_shell_command"
         fi
-        am_shell_command=$2
-        shift;;
-    -?*)
-        am_shell_flags="$am_shell_flags $1";;
-      *)
-        break;;
+        printf '%s\n' "=== END recipe/script"
+      } >&2
+      exit 1
+      ;;
   esac
-  shift
-done
+)
 
-if test x${am_shell_command+"set"} != x"set"; then
-  echo "$0: fatal: no shell command given through the '-c' option" >&2
-  exit 1
+if test $? -gt 0; then
+  # Some of our scripts or makefile recipes had invalid contents.
+  exit 3
 fi
 
-case $am_shell_command in
-  *" "|*"$tab"|*"$nl")
-    am_tweaked_shell_command=$(printf '%s\n' "$am_shell_command" \
-                                 | tr -d " $tab$nl");;
-  *)
-    am_tweaked_shell_command=$am_shell_command;;
-esac
-
-case $am_tweaked_shell_command in
-  *\\)
-    printf '%s\n' "$0: recipe ends with backslash character" >&2
-    printf '%s\n' "=== BEGIN recipe" >&2
-    printf '%s\n' "${am_shell_command-}" >&2
-    printf '%s\n' "=== END recipe" >&2
-    exit 1
-    ;;
-esac
-
-exec $am_SHELL $am_shell_flags -c "$am_shell_command" ${1+"$@"}
+exec ${AM_TESTSUITE_SHELL-'@SHELL@'} ${1+"$@"}
diff --git a/t/includes-deprecation.sh b/t/includes-deprecation.sh
index 7db0c06..66a9564 100644
--- a/t/includes-deprecation.sh
+++ b/t/includes-deprecation.sh
@@ -32,6 +32,8 @@ grep "^Makefile\\.am:2:.* 'INCLUDES'.* deprecated.* 
'AM_CPPFLAGS'" stderr
 AUTOMAKE_run -Wall -Wno-obsolete
 test ! -s stderr
 
+$sleep
+
 echo 'AC_SUBST([INCLUDES])' >> configure.ac
 sed '/^INCLUDES/d' Makefile.am > t && mv -f t Makefile.am
 
diff --git a/t/instmany-mans.sh b/t/instmany-mans.sh
index be33a02..0ed2348 100644
--- a/t/instmany-mans.sh
+++ b/t/instmany-mans.sh
@@ -37,8 +37,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -72,8 +70,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany-python.sh b/t/instmany-python.sh
index 40c8502..0088b2d 100644
--- a/t/instmany-python.sh
+++ b/t/instmany-python.sh
@@ -33,8 +33,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -68,8 +66,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany.sh b/t/instmany.sh
index 94a8053..126c93f 100644
--- a/t/instmany.sh
+++ b/t/instmany.sh
@@ -45,8 +45,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -80,8 +78,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/mdate5.sh b/t/mdate5.sh
index 89ee0c4..108569e 100644
--- a/t/mdate5.sh
+++ b/t/mdate5.sh
@@ -21,25 +21,36 @@ am_create_testdir=empty
 
 get_shell_script mdate-sh
 
-set x $(./mdate-sh mdate-sh)
-shift
-echo "$*" # For debugging.
-
-# Check that mdate output looks like a date:
-test $# = 3
-case $1$3 in *[!0-9]*) exit 1;; esac
-test $1 -lt 32
-# Hopefully automake will be obsolete in 80 years ;-)
-case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
-case $2 in
-  January|February|March|April|May|June|July|August) ;;
-  September|October|November|December) ;;
-  *) exit 1
-esac
-
-# Stricter checks on the year required a POSIX date(1) command.
-if year=$(date +%Y) && test $year -gt 2010; then
-  test $year = $3 || exit 1
-fi
+year=$(date +%Y) && test $year -gt 2010 || year=NONE
+
+do_checks ()
+{
+  set x $(./mdate-sh mdate-sh)
+  shift
+  echo "$*" # For debugging.
+
+  # Check that mdate output looks like a date.
+  test $# = 3 || exit 1
+  case $1$3 in *[!0-9]*) exit 1;; esac
+  test $1 -lt 32 || exit 1
+  # Hopefully automake will be obsolete in 80 years ;-)
+  case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
+  case $2 in
+    January|February|March|April|May|June|July|August) ;;
+    September|October|November|December) ;;
+    *) exit 1
+  esac
+
+  # Stricter checks on the year require a POSIX date(1) command.
+  test $year = NONE || test $year = $3 || exit 1
+}
+
+TIME_STYLE=; unset TIME_STYLE
+do_checks
+
+# This setting, when honored by GNU ls, used to cause an infinite
+# loop in mdate-sh.
+TIME_STYLE="+%Y-%m-%d %H:%M:%S"; export TIME_STYLE
+do_checks
 
 :
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh
index 448b3bc..9c80c2c 100644
--- a/t/parallel-tests-concurrency.sh
+++ b/t/parallel-tests-concurrency.sh
@@ -17,8 +17,8 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
-# FIXME: we should factorize the code to determine how to run
-#        make in parallel out in am-test-lib.sh ...
+# FIXME: we should factor out (into am-test-lib.sh?) the code to determine
+#        how to run make in parallel mode ...
 
 . test-init.sh
 
@@ -69,10 +69,13 @@ done
 
 cd serial
 $MAKE -j1 check &
-cd ../parallel
+cd ..
+
+cd parallel
 $sleep
 run_make -O -- -j4 check
 cd ..
+
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should
 # still be ongoing when the parallel one has terminated.
diff --git a/t/self-check-shell-no-trail-bslash.sh 
b/t/self-check-shell-no-trail-bslash.sh
index 75732a2..f176220 100644
--- a/t/self-check-shell-no-trail-bslash.sh
+++ b/t/self-check-shell-no-trail-bslash.sh
@@ -31,12 +31,48 @@ bad:
 END
 
 SHELL=$am_testaux_builddir/shell-no-trail-bslash
+
 $SHELL -c 'exit 0'
 test "$($SHELL -c 'echo is  o\k')" = "is ok"
 
+echo 'echo is  ok\"' > ok.sh
+$SHELL ./ok.sh
+test "$($SHELL ./ok.sh)" = "is ok\""
+
+tab='  '
+nl='
+'
+for sfx in \
+  '\' \
+  '\\' \
+  '\\\\\' \
+  '\ ' \
+  "\\$tab" \
+  "\\ $tab$tab   " \
+  "\\$nl" \
+  "\\ $nl " \
+  "\\$nl$nl$nl" \
+; do
+  for pfx in "" "echo bad" ": a${nl}# multine${nl}: text"; do
+    cmd=${pfx}${sfx}
+    printf '%s' "$cmd" > bad.sh
+    for args in '-c "$cmd"' './bad.sh'; do
+      eval "\$SHELL $args 2>stderr && { cat stderr >&2; exit 1; }; :"
+      cat stderr >&2
+      $FGREP "recipe/script ends with backslash character" stderr
+      cmd="$cmd" $PERL -w -e '
+        undef $/;
+        $_ = <>;
+        index($_, $ENV{cmd}) >= 0 or exit 1;
+      ' <stderr
+      $FGREP "$cmd" stderr
+    done
+  done
+done
+
 $MAKE good
 
 run_make -E -e FAIL bad SHELL="$SHELL"
-$FGREP "recipe ends with backslash character" stderr
+$FGREP "recipe/script ends with backslash character" stderr
 
 :
diff --git a/t/txinfo-clean.sh b/t/txinfo-clean.sh
index b936e41..f5e8745 100644
--- a/t/txinfo-clean.sh
+++ b/t/txinfo-clean.sh
@@ -15,7 +15,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
-# Similar to txinfo25.sh.
 
 required='makeinfo tex texi2dvi dvips'
 . test-init.sh
diff --git a/t/txinfo-override-texinfo-tex.sh b/t/txinfo-override-texinfo-tex.sh
index fc2fcc7..60be43d 100644
--- a/t/txinfo-override-texinfo-tex.sh
+++ b/t/txinfo-override-texinfo-tex.sh
@@ -30,12 +30,13 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
+TEXINFO_TEX = ../tex/texinfo.tex
 info_TEXINFOS = main.texi
 sure_it_exists:
-       test -f $(TEXINFO_TEX)
+       test -f $(srcdir)/$(TEXINFO_TEX)
 sure_it_is_not_distributed: distdir
        test ! -f $(distdir)/tex/texinfo.tex
+check-local: sure_it_exists
 END
 
 cat > main.texi << 'END'
@@ -61,7 +62,6 @@ test -f tex/texinfo.tex
 
 ./configure
 
-$MAKE sure_it_exists
 $MAKE distcheck
 $MAKE sure_it_is_not_distributed
 
diff --git a/t/txinfo23.sh b/t/txinfo23.sh
deleted file mode 100644
index e71fc57..0000000
--- a/t/txinfo23.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002-2014 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/>.
-
-# Check that info files are built in builddir when needed.
-# Test with subdir Texinfo.
-# (Similar to txinfo13.sh, plus DISTCLEANFILES).
-# (See also txinfo24.sh and txinfo25.sh).
-
-required='makeinfo tex texi2dvi'
-. test-init.sh
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-DISTCLEANFILES = subdir/*.info*
-info_TEXINFOS = subdir/main.texi
-subdir_main_TEXINFOS = subdir/inc.texi
-
-installcheck-local:
-       test -f "$(infodir)/main.info"
-END
-
-mkdir subdir
-
-cat > subdir/main.texi << 'END'
-\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
-Hello walls.
address@hidden version.texi
address@hidden inc.texi
address@hidden
-END
-
-cat > subdir/inc.texi << 'END'
-I'm included.
-END
-
-$ACLOCAL
-$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
-$MAKE distcheck
-test -f subdir/main.info
-test ! -e ../subdir/main.info
-
-:
diff --git a/t/txinfo24.sh b/t/txinfo24.sh
deleted file mode 100644
index df202a8..0000000
--- a/t/txinfo24.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002-2014 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/>.
-
-# Check that info files are built in builddir when needed.
-# (Similar to txinfo16.sh, plus CLEANFILES).
-# (See also txinfo23.sh and txinfo25.sh).
-
-required='makeinfo tex texi2dvi'
-. test-init.sh
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-CLEANFILES = main.info
-info_TEXINFOS = main.texi
-END
-
-cat > main.texi << 'END'
-\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
-Hello walls.
address@hidden version.texi
address@hidden
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing -Wno-obsolete
-$AUTOCONF
-
-mkdir build
-cd build
-../configure
-$MAKE
-test ! -e ../main.info
-test -f main.info
-
-cd ..
-rm -rf build
-./configure
-$MAKE
-test -f main.info
-
-# Make sure stamp-vti is older that version.texi.
-# (A common situation in a real tree).
-test -f stamp-vti
-test -f version.texi
-$sleep
-touch stamp-vti
-
-$MAKE distclean
-test -f stamp-vti
-test -f version.texi
-
-mkdir build
-cd build
-../configure
-$MAKE
-# main.info should be rebuilt in the current directory.
-test -f main.info
-test ! -e ../main.info
-$MAKE dvi
-test -f main.dvi
-
-$MAKE distcheck
-
-:
diff --git a/t/txinfo25.sh b/t/txinfo25.sh
deleted file mode 100644
index 8d7f127..0000000
--- a/t/txinfo25.sh
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2014 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/>.
-
-# 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).
-
-required='makeinfo tex texi2dvi'
-. test-init.sh
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-CLEANFILES = [a-m]*.info
-info_TEXINFOS = main.texi other.texi
-END
-
-cat > main.texi << 'END'
-\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
-Hello walls.
address@hidden version.texi
address@hidden
-END
-
-cat > other.texi << 'END'
-\input texinfo
address@hidden other.info
address@hidden other
address@hidden Top
-Hello walls.
address@hidden version2.texi
address@hidden
-END
-
-$ACLOCAL
-$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
-$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 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 distclean
-test -f stamp-vti
-test -f stamp-1
-test -f version.texi
-test -f version2.texi
-
-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
-
-:
diff --git a/t/txinfo28.sh b/t/txinfo28.sh
deleted file mode 100644
index 93929c3..0000000
--- a/t/txinfo28.sh
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002-2014 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/>.
-
-# Check that info files are built in builddir when needed.
-# Similar to txinfo24.sh, but obfuscating filenames with variable
-# references.
-# Report from Ralf Corsepius.
-
-required='makeinfo tex texi2dvi'
-. test-init.sh
-
-# This setting, when honored by GNU ls, used to cause an infinite loop
-# in mdate-sh.
-TIME_STYLE="+%Y-%m-%d %H:%M:%S"
-export TIME_STYLE
-
-echo AC_OUTPUT >> configure.ac
-
-cat > Makefile.am << 'END'
-MA = ma
-IN = in
-PROJ = $(MA)$(IN)
-include fragment.mk
-info_TEXINFOS = ma$(IN).texi
-END
-
-echo 'CLEANFILES = $(PROJ).info' > fragment.mk
-
-cat > main.texi << 'END'
-\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
-Hello walls.
address@hidden version.texi
address@hidden
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing -Wno-error
-$AUTOCONF
-
-mkdir build
-cd build
-../configure
-$MAKE
-test -f main.info
-
-cd ..
-rm -rf build
-./configure
-$MAKE
-test -f main.info
-
-# Make sure stamp-vti is older that version.texi.
-# (A common situation in a real tree).
-test -f stamp-vti
-test -f version.texi
-$sleep
-touch stamp-vti
-
-$MAKE distclean
-test -f stamp-vti
-test -f version.texi
-
-mkdir build
-cd build
-../configure
-$MAKE
-# main.info should be rebuilt in the current directory.
-test -f main.info
-test ! -e ../main.info
-$MAKE dvi
-test -f main.dvi
-
-$MAKE distcheck


hooks/post-receive
-- 
GNU Automake



reply via email to

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