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.12-3


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-312-gfa80673
Date: Fri, 25 May 2012 00:17:20 +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=fa806737f8739a248a7ab032e9682d5b738dae90

The branch, ng/master has been updated
       via  fa806737f8739a248a7ab032e9682d5b738dae90 (commit)
       via  4486c689bd6ef4c5c9aa6e7cabe528df499f33b7 (commit)
       via  d00c2e352a1bd15f8c1069dbfcd0cd1e5a387de2 (commit)
       via  d9ca69945949d464e49cb6097d72a92ca017bf79 (commit)
       via  e1a53f2a4ae379b2a5c79d986ba37b853a57aaa4 (commit)
       via  4b9a51979d8e24ae32f8c114d8d9a90c646cd89a (commit)
      from  879ae21478b10e645c3ad891b466d7cacd5d7765 (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 fa806737f8739a248a7ab032e9682d5b738dae90
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 24 21:14:46 2012 +0200

    am: make function to canonicalize names
    
    We implement a make function that canonicalizes names the same way the
    automake script does (with the '&canonicalize' perl function):
    
        sub/prog      =>  sub_prog
        libx-old.a    =>  libx_old_a
        devel/libx.a  =>  devel_libx_a
    
    This new make function is still unused in our codebase, but it's nice
    to have it ther,e ready and tested, should the need for it ever arise.
    
    * lib/am/header-vars.am (am__canon): New function.
    (am__bslash, am__comma, am__dollar, am__pound, am__lparen, am__rparen,
    am__bquote, am__dquote, am__squote ): New immediate variables, used by
    the above function to avoid spurious syntax errors (e.g., $(am__comma)
    expands to ',', which would be unusable directly in a make function call).
    * t/internals.tap: Extend.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 4486c689bd6ef4c5c9aa6e7cabe528df499f33b7
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 25 00:19:02 2012 +0200

    tests: don't disable portability warnings when there's no need
    
    Some annoying portability warnings only needed for non-GNU makes have
    since long been removed in Automake-NG, so they don't have to be
    explicitly disabled in tests that checked "unportable" behaviours.
    
    * t/canon5.sh, t/extra11.sh, t/library2.sh, t/pattern-rules2.sh,
    t/pluseq7.sh, t/parallel-tests-fork-bomb.sh: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d00c2e352a1bd15f8c1069dbfcd0cd1e5a387de2
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 25 00:06:11 2012 +0200

    general: assume '#' comment in make recipes are ok
    
    The Autoconf manual (2.69) reports:
    
        Some make implementations treat anything starting with a tab as
        a command for the current rule, even if the tab is immediately
        followed by a '#'.  The make from Tru64 Unix V5.1 is one of them.
    
    The issue doesn't affect GNU make though, so we can zap another now
    redundant automake time check
    
    * automake.in (read_am_file): Don't report rules starting with a
    "#" as unportable.
    * t/comment3.sh: Remove as obsolete.
    * Several tests: In make rules, use '#' comments rather than more
    fragile ':' comments; e.g., instead of:
    
            : Processed header files should not be distributed.
            test ! -r $(distdir)/one.h
    
    use:
    
            # Processed header files should not be distributed.
            test ! -r $(distdir)/one.h
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d9ca69945949d464e49cb6097d72a92ca017bf79
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 24 22:10:14 2012 +0200

    general: assume GNU make semantic in line continuation
    
    The line continuation with a backslash is yet another source of
    portability problems for Makefiles.
    
    For example, according to the Autoconf manual, some versions of
    make (e.g., HP-UX) read multiple newlines following a backslash,
    continuing to the next non-empty line.
    
    Also, according to Posix, make comments start with # and continue
    until an unescaped newline is reached; but some BSD make versions
    do not follow this requirement.
    
    Finally, some make implementations (like Solaris 10 CCS make)
    handle a '\#' sequence at the end of a line like it was a line
    continuation:
    
        $ cat Makefile
        x = \#
        all:; : $(x)
    
        $ /usr/local/bin/gmake
        : #
    
        $ /usr/ccs/bin/make -f foo.mk
        mksh: Error in reader: Loop detected when expanding macro value `\#
        all:; : $(x)'
        Current working directory /tmp
    
    Luckily, GNU make is more rational and consistent in its handling
    of line continuation, which allows us to drop some Automake time
    checks.  Not a great simplification, but better than nothing.
    
    * automake.in (read_am_file, file_contents_internal): Don't error
    on blank line following trailing backslash, on comment following
    trailing backslash, nor on trailing backslash on the last line.
    * t/spy-trailing-backslash.sh: New, check that the expected GNU
    make semantics actually hold.
    * t/backslash-tricks.sh: New test, check that automake truly
    supports the uses of backslash it doesn't warn about anymore.
    * t/backsl3.sh: Remove as obsolete.
    * t/comment5.sh: Likewise.
    * t/commen10.sh: Likewise.
    * t/commen11.sh: Likewise.
    * t/syntax.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e1a53f2a4ae379b2a5c79d986ba37b853a57aaa4
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 24 17:05:18 2012 +0200

    fixup: support verbatim lines only in private '.am' fragments
    
    We don't want to commit such a blatant hack for public consumption yet.
    
    * automake.in (read_am_file): Don't handle !-escaped lines.
    * t/verbatim.sh: Adjust, and, while we are at it, tweak to avoid a
    spurious maintainer-check failure.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 4b9a51979d8e24ae32f8c114d8d9a90c646cd89a
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 24 16:42:32 2012 +0200

    fixup: interaction between verbatim lines and line continuation
    
    When line continuations were involved, our hack to pass lines verbatim
    to the output Makefile didn't work as expected; for example, the input
    
        !$(call foo,=, \
        !   long continued line still in the call)
    
    produced in the generated Makefile an output like
    
        $(call foo,=, \
        !   long continued line still in the call)
    
    rather than as the expected
    
        $(call foo,=, \
           long continued line still in the call)
    
    That bug severely limited the usefulness of our hack.  Luckily, it's
    pretty easy to fix.
    
    * automake.in (file_contents_internal): Handling of !-escaped
    lines moved ...
    (make_paragraphs): ... here, and adjusted to cope with line
    continuations.
    * lib/am/parallel-tests.am: Break overly long !-escaped lines,
    now that we can.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 automake.in                                        |   77 ++++++-----------
 lib/am/header-vars.am                              |   49 +++++++++++
 lib/am/parallel-tests.am                           |    8 +-
 t/autohdr3.sh                                      |    4 +-
 t/backsl3.sh                                       |   29 ------
 t/backslash-tricks.sh                              |   72 ++++++++++++++++
 t/canon5.sh                                        |    2 +-
 t/commen10.sh                                      |   32 -------
 t/commen11.sh                                      |   41 ---------
 t/comment3.sh                                      |   31 -------
 t/comment5.sh                                      |   85 ------------------
 t/condman3.sh                                      |    4 +-
 t/confh8.sh                                        |    4 +-
 t/dist-auxfile-2.sh                                |    2 +-
 t/dist-auxfile.sh                                  |    4 +-
 t/extra11.sh                                       |    6 +-
 t/insh2.sh                                         |    2 +-
 t/internals.tap                                    |   35 ++++++--
 t/java-compile-install.sh                          |    4 +-
 t/java-compile-run-flat.sh                         |    8 +-
 t/java-compile-run-nested.sh                       |    8 +-
 t/java-nobase.sh                                   |    2 +-
 t/library2.sh                                      |    2 +-
 t/make-dryrun.tap                                  |    4 +-
 t/nobase-python.sh                                 |    2 +-
 t/parallel-tests-fork-bomb.sh                      |    2 +-
 t/pattern-rules2.sh                                |    4 +-
 t/pluseq7.sh                                       |    2 +-
 t/primary-prefix-couples-force-valid.sh            |    2 +-
 t/remake-gnulib-add-acsubst.sh                     |    2 +-
 t/remake12.sh                                      |    6 +-
 ...y-pattern-rules.sh => spy-trailing-backlash.sh} |   70 ++++++++++------
 t/subobj5.sh                                       |    4 +-
 t/subpkg-yacc.sh                                   |    2 +-
 t/syntax.sh                                        |   31 -------
 t/tap-basic.sh                                     |    2 +-
 t/test-driver-is-distributed.sh                    |    2 +-
 t/transform3.sh                                    |    4 +-
 t/verbatim.sh                                      |   90 ++++++++++++--------
 39 files changed, 323 insertions(+), 417 deletions(-)
 delete mode 100755 t/backsl3.sh
 create mode 100755 t/backslash-tricks.sh
 delete mode 100755 t/commen10.sh
 delete mode 100755 t/commen11.sh
 delete mode 100755 t/comment3.sh
 delete mode 100755 t/comment5.sh
 copy t/{spy-pattern-rules.sh => spy-trailing-backlash.sh} (52%)
 delete mode 100755 t/syntax.sh

diff --git a/automake.in b/automake.in
index d2d1551..f236736 100644
--- a/automake.in
+++ b/automake.in
@@ -6116,8 +6116,6 @@ sub read_am_file ($$)
        }
        elsif (/$WHITE_PATTERN/o)
        {
-           error $where, "blank line following trailing backslash"
-             if $saw_bk;
            # Stick a single white line before the incoming macro or rule.
            $spacing = "\n";
            $blank = 1;
@@ -6164,15 +6162,6 @@ sub read_am_file ($$)
        chomp;
        $_ .= "\n";
 
-       if (s/^!//)
-         {
-           # A line starting with '!' must be passed verbatim to the
-           # output Makefile, placed after the variables' definitions
-           # and before the Makefile targets.
-           $output_verbatim .= $_;
-           next;
-         }
-
        # Don't look at MAINTAINER_MODE_TRUE here.  That shouldn't be
        # used by users.  @MAINT@ is an anachronism now.
        $_ =~ s/address@hidden@//g
@@ -6191,18 +6180,6 @@ sub read_am_file ($$)
        {
            # Stick a single white line before the incoming macro or rule.
            $spacing = "\n";
-           error $where, "blank line following trailing backslash"
-             if $saw_bk;
-       }
-       elsif (/$COMMENT_PATTERN/o)
-       {
-           error $where, "comment following trailing backslash"
-             if $saw_bk && $prev_state != IN_COMMENT;
-
-           # Stick comments before the incoming macro or rule.
-           $comment .= $spacing . $_;
-           $spacing = '';
-           $prev_state = IN_COMMENT;
        }
        elsif ($saw_bk)
        {
@@ -6234,6 +6211,13 @@ sub read_am_file ($$)
            }
        }
 
+       elsif (/$COMMENT_PATTERN/o)
+         {
+           # Stick comments before the incoming macro or rule.
+           $comment .= $spacing . $_;
+           $spacing = '';
+           $prev_state = IN_COMMENT;
+         }
        elsif (/$IF_PATTERN/o)
          {
            $cond = cond_stack_if ($1, $2, $where);
@@ -6349,8 +6333,6 @@ sub read_am_file ($$)
            $output_trailer .= $cond->subst_string;
            $output_trailer .= $_;
            $comment = $spacing = '';
-           error $where, "'#' comment at start of rule is unportable"
-             if $_ =~ /^\t\s*\#/;
        }
 
        $saw_bk = $new_saw_bk;
@@ -6358,9 +6340,6 @@ sub read_am_file ($$)
 
     $output_trailer .= $comment;
 
-    error ($where, "trailing backslash on last line")
-      if $saw_bk;
-
     error ($where, (@cond_stack ? "unterminated conditionals: @cond_stack"
                    : "too many conditionals closed in include file"))
       if "@saved_cond_stack" ne "@cond_stack";
@@ -6571,9 +6550,27 @@ sub make_paragraphs ($%)
   $transform{FIRST} = !$transformed_files{$file};
   $transformed_files{$file} = 1;
 
-  my @lines = split /(?<!\\)\n/, preprocess_file ($file, %transform);
-  my @res;
+  my @lines = split /\n/, preprocess_file ($file, %transform);
 
+  # A line starting with '!' must be passed verbatim to the output
+  # Makefile, placed after the variables' definitions and before the
+  # Makefile targets.  This is an hack to allow us to use tricky GNU
+  # make constructs (on which the dumb Automake parser would choke).
+  # It is not perfect, but seems good enough for the moment.
+  my @verbatim_lines = grep /^!/, @lines;
+  foreach (@verbatim_lines)
+    {
+      s/^!//;
+      $output_verbatim .= "$_\n";
+    }
+  @lines = grep !/^!/, @lines;
+
+  # Handle line continuations.
+  # FIXME: this could probably be done more efficiently, but I'd rather
+  # FIXME: not change working (and trickish) code for the moment.
+  @lines = split /(?<!\\)\n/, join ("\n", @lines);
+
+  my @res;
   while (defined ($_ = shift @lines))
     {
       my $paragraph = $_;
@@ -6639,25 +6636,7 @@ sub file_contents_internal ($$$%)
        # FIXME: no line number available.
        $where->set ($file);
 
-        # A line starting with '!' must be passed verbatim to the output
-        # Makefile, placed after the variables' definitions and before the
-        # Makefile targets.
-        if (s/^!//)
-          {
-            $output_verbatim .= "$_\n";
-          }
-
-       # Sanity checks.
-       elsif (/\\$/)
-          {
-           error $where, "blank line following trailing backslash:\n$_"
-          }
-       elsif (/\\#/)
-          {
-           error $where, "comment following trailing backslash:\n$_"
-          }
-
-       elsif (/^$/)
+       if (/^$/)
          {
            $is_rule = 0;
            # Stick empty line before the incoming macro or rule.
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 7f34666..9626744 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -16,6 +16,19 @@
 
 VPATH = @srcdir@
 
+# Some problematic characters (especially when used in arguments
+# to make functions, or for syntax highlighting).
+am__bslash := \\
+am__comma := ,
+am__dollar := $$
+am__pound := \#
+am__lparen := (
+am__rparen := )
+am__bquote := `
+am__dquote := "
+am__squote := '
+# "` # Fix font-lock.
+
 ## Makefiles generated by Automake-NG require GNU make >= 3.81.
 ## The .FEATURES special variable has been introduced in that make
 ## version, so use it as a witness to determine whether the current
@@ -119,6 +132,42 @@ am__tolower = $(subst Z,z,$(subst Y,y,$(subst X,x,$(subst 
W,w,$(subst V,v,$(subs
 
 am__toupper = $(subst z,Z,$(subst y,Y,$(subst x,X,$(subst w,W,$(subst 
v,V,$(subst u,U,$(subst t,T,$(subst s,S,$(subst r,R,$(subst q,Q,$(subst 
p,P,$(subst o,O,$(subst n,N,$(subst m,M,$(subst l,L,$(subst k,K,$(subst 
j,J,$(subst i,I,$(subst h,H,$(subst g,G,$(subst f,F,$(subst e,E,$(subst 
d,D,$(subst c,C,$(subst b,B,$(subst a,A,$1))))))))))))))))))))))))))
 
+# Canonicalize the given filename.  See also the &canonicalize function
+# in the automake script.
+
+am__canon = $(strip \
+  $(subst ~,_,\
+  $(subst },_,\
+  $(subst |,_,\
+  $(subst {,_,\
+  $(subst $(am__bquote),_,\
+  $(subst ^,_,\
+  $(subst $(am__bslash),_,\
+  $(subst [,_,\
+  $(subst ],_,\
+  $(subst ?,_,\
+  $(subst >,_,\
+  $(subst =,_,\
+  $(subst <,_,\
+  $(subst ;,_,\
+  $(subst :,_,\
+  $(subst /,_,\
+  $(subst .,_,\
+  $(subst -,_,\
+  $(subst $(am__comma),_,\
+  $(subst +,_,\
+  $(subst *,_,\
+  $(subst $(am__lparen),_,\
+  $(subst $(am__rparen),_,\
+  $(subst $(am__squote),_,\
+  $(subst &,_,\
+  $(subst %,_,\
+  $(subst $(am__dollar),_,\
+  $(subst $(am__pound),_,\
+  $(subst $(am__dquote),_,\
+  $(subst !,_,$1)))))))))))))))))))))))))))))))
+
+
 ## Simple memoization for recursive make variables.  It is useful for
 ## situations where immediate variables can't be used (due, say, to
 ## ordering issues with the assignments of the referenced variables),
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 4f2e003..0c3e9ff 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -91,10 +91,10 @@ am__tpfx = \
 ## FIXME: this will pick up the default from the environment; are we sure
 ## FIXME: we want that?
 !TEST_EXTENSIONS ?= .test
-!$(call am__maybe_invalid_test_extensions,$(filter-out .%,$(TEST_EXTENSIONS)))
-## FIXME: it would be nice to break these on multiple lines.  Unfortunately,
-## FIXME: our '!' is not yet smart enough to handle that :-(
-!$(foreach am__e,$(TEST_EXTENSIONS), $(eval $(call 
am__handle_per_suffix_test,$(am__e))))
+!$(call am__maybe_invalid_test_extensions,\
+!  $(filter-out .%,$(TEST_EXTENSIONS)))
+!$(foreach am__e,$(TEST_EXTENSIONS), \
+!  $(eval $(call am__handle_per_suffix_test,$(am__e))))
 ## It is *imperative* that the "empty" suffix goes last.  Otherwise, a
 ## declaration like "TESTS = all.test" would cause GNU make to mistakenly
 ## try to build the 'all.log' and 'all.trs' files from a non-existent
diff --git a/t/autohdr3.sh b/t/autohdr3.sh
index ad55130..fbe0e31 100755
--- a/t/autohdr3.sh
+++ b/t/autohdr3.sh
@@ -30,8 +30,8 @@ cat > Makefile.am <<'END'
 .PHONY: test
 check-local: test
 test: all
-       cat $(srcdir)/config.hin ;: For debugging.
-       cat config.h             ;: Likewise.
+       cat $(srcdir)/config.hin # For debugging.
+       cat config.h             # Likewise.
        grep '#.*GREPME' $(srcdir)/config.hin
        grep '#.*define.*GREPME' config.h
 END
diff --git a/t/backsl3.sh b/t/backsl3.sh
deleted file mode 100755
index 36fab7f..0000000
--- a/t/backsl3.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-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
-# 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/>.
-
-# Make sure we diagnose trailing backslash at the end of a file.
-# Report from Akim Demaile <address@hidden>.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-foo = \
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-cat stderr
-grep 'trailing backslash' stderr
diff --git a/t/backslash-tricks.sh b/t/backslash-tricks.sh
new file mode 100755
index 0000000..dea9e39
--- /dev/null
+++ b/t/backslash-tricks.sh
@@ -0,0 +1,72 @@
+#! /bin/sh
+# 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
+# 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/>.
+
+#
+# - Automake should handle trailing backslashes in comments the way GNU
+#   make does, i.e., considering the next line as a continuation of the
+#   comment.
+#
+# - Automake should allow backslash-escaped '#' characters at the end
+#   of a line (in variable definitions as well as well as in recipes),
+#   because GNU make allows that.
+#
+# - GNU make handles comments following trailing backslashes gracefully,
+#   so Automake should do the same.
+#
+# - Automake should not complain if the Makefile ands with a backslash
+#   and newline sequence, because GNU make handles that gracefully.
+#
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+# Avoid possible interferences from the environment.
+var1= var2=; unset var1 var2
+
+cat > Makefile.am << 'END'
+# a comment with backslash \
+var1 = foo
+var2 = bar
+
+var3 = \#
+var4 = $(var3)
+
+var5 = ok \
+# ko
+
+.PHONY: test
+test:
+       test -z '$(var1)'
+       test '$(var2)' = bar
+       test '$(var3)' = '#'
+       test '$(var4)' = \#
+       # Use '[', not 'test', here, so that spurious comments
+       # are ensured to cause syntax errors.
+       [ $(var5) = ok ]
+
+# Yes, this file ends with a backslash-newline.  So what?
+\
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
diff --git a/t/canon5.sh b/t/canon5.sh
index 4b1b43d..8a3f427 100755
--- a/t/canon5.sh
+++ b/t/canon5.sh
@@ -52,6 +52,6 @@ bin_PROGRAMS = ,foo
 _foo_SOURCES = foo.c
 END
 
-$AUTOMAKE -Wno-portability
+$AUTOMAKE
 
 :
diff --git a/t/commen10.sh b/t/commen10.sh
deleted file mode 100755
index d0c246a..0000000
--- a/t/commen10.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2005-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
-# 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/>.
-
-# Make sure comments following trailing backslashes are diagnosed.
-# Report from Harald Dunkel.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-SUBDIRS = foo \
-# bar
-
-END
-
-mkdir foo
-
-$ACLOCAL
-AUTOMAKE_fails
-grep backslash stderr
diff --git a/t/commen11.sh b/t/commen11.sh
deleted file mode 100755
index d4b264a..0000000
--- a/t/commen11.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2005-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
-# 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/>.
-
-# Make sure backslash-newline-hash combinations are diagnosed as
-# comments following a trailing backslash, even when the combination
-# follows a variable assignment that is preceded by a comment.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-# initial comment
-variable = value-before-comment \
-#
-
-# comment
-SUBDIRS = foo \
-# bar
-
-END
-
-mkdir foo
-
-$ACLOCAL
-AUTOMAKE_fails
-grep '^Makefile\.am:3:.*backslash' stderr
-grep '^Makefile\.am:7:.*backslash' stderr
-
-:
diff --git a/t/comment3.sh b/t/comment3.sh
deleted file mode 100755
index 8f80945..0000000
--- a/t/comment3.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-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
-# 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/>.
-
-# Make sure that '#' after a tab is a failure.
-# The Tru64 Unix V5.1 system make will pass these to the
-# shell, which in turn can't find '#' as a command.
-# Sigh.  Some vendors must be destroyed.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-install-data-local:
-       # Tru64 Unix must die
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*#' stderr
diff --git a/t/comment5.sh b/t/comment5.sh
deleted file mode 100755
index 0c2a4d6..0000000
--- a/t/comment5.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002-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
-# 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/>.
-
-# Test for PR/280.
-# (Automake should complain about trailing backslashes in comments.)
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'EOF'
-AC_OUTPUT
-EOF
-
-cat > Makefile.am << 'EOF'
-all-local:
-       @echo ${var}
-
-# a comment with backslash \
-
-
-var = foo
-EOF
-
-$ACLOCAL
-AUTOMAKE_fails
-grep '^Makefile.am:5: error: blank line following trailing backslash' stderr
-
-
-## Here is a second test because head comments are
-## handled differently in Automake 1.5.
-
-cat > Makefile.am << 'EOF'
-# a comment with backslash \
-
-
-all-local:
-       @echo ${var}
-
-var = foo
-EOF
-
-AUTOMAKE_fails
-grep '^Makefile.am:2: error: blank line following trailing backslash' stderr
-
-
-## Make sure we print an 'included' stack on errors.
-
-echo 'include Makefile.inc'> Makefile.am
-cat > Makefile.inc << 'EOF'
-# a comment with backslash \
-
-EOF
-
-AUTOMAKE_fails
-grep '^Makefile.inc:2: error: blank line following trailing backslash' stderr
-grep '^Makefile.am:1: .*included from here' stderr
-grep -v '^Makefile.am:1: .*error:' stderr
-
-
-## Make sure backslashes are still allowed within a comment.
-## This usually happens when commenting out a Makefile rule.
-
-cat > Makefile.am << 'EOF'
-all-local:
-       @echo ${var}
-
-# a comment with backslash \
-# but terminated by a line without backslash
-
-var = foo
-EOF
-
-$AUTOMAKE
diff --git a/t/condman3.sh b/t/condman3.sh
index 9f2714f..9dc8c9b 100755
--- a/t/condman3.sh
+++ b/t/condman3.sh
@@ -34,14 +34,14 @@ endif
 
 .PHONY: test1 test2
 test1:
-       find $(mandir) ;: For debugging.
+       find $(mandir) # For debugging.
        test -f $(mandir)/man1/foo.1
        test -f $(mandir)/man4/6.4
        test ! -f $(mandir)/man2/bar.2
        test ! -f $(mandir)/man1/baz.1
        test ! -f $(mandir)/man5/zap.5
 test2:
-       find $(mandir) ;: For debugging.
+       find $(mandir) # For debugging.
        test -f $(mandir)/man2/bar.2
        test -f $(mandir)/man1/baz.1
        test -f $(mandir)/man5/zap.5
diff --git a/t/confh8.sh b/t/confh8.sh
index 50bf057..77ada54 100755
--- a/t/confh8.sh
+++ b/t/confh8.sh
@@ -30,7 +30,7 @@ test0:
        @echo am__dist_common = $(am__dist_common)
        echo ' ' $(am__dist_common) ' ' | grep '[ /]one\.h\.in '
        echo ' ' $(am__dist_common) ' ' | grep '[ /]two\.h\.in '
-       : Processed header files should not be distributed.
+       # Processed header files should not be distributed.
        if echo ' ' $(am__dist_common) ' ' | grep '\.h '; then \
          exit 1; \
        else \
@@ -43,7 +43,7 @@ test2: distdir
        ls -l $(distdir)/*
        test -f $(distdir)/one.h.in
        test -f $(distdir)/two.h.in
-       : Processed header files should not be distributed.
+       # Processed header files should not be distributed.
        test ! -r $(distdir)/one.h
        test ! -r $(distdir)/two.h
 check-local: test0 test1 test2
diff --git a/t/dist-auxfile-2.sh b/t/dist-auxfile-2.sh
index b7e2e2d..f977893 100755
--- a/t/dist-auxfile-2.sh
+++ b/t/dist-auxfile-2.sh
@@ -34,7 +34,7 @@ END
 cat > Makefile.am <<'END'
 SUBDIRS = sub
 test: distdir
-       ls -l $(distdir) $(distdir)/* ;: For debugging.
+       ls -l $(distdir) $(distdir)/* # For debugging.
        test -f $(distdir)/sub/zardoz
 .PHONY: test
 check-local: test
diff --git a/t/dist-auxfile.sh b/t/dist-auxfile.sh
index b8db708..f615723 100755
--- a/t/dist-auxfile.sh
+++ b/t/dist-auxfile.sh
@@ -46,8 +46,8 @@ END
   unindent >> Makefile.am <<'END'
     SUBDIRS = subdir
     test: distdir
-       ls -l $(distdir) $(distdir)/*      ;: For debugging.
-       @echo am__dist_common = $(am__dist_common) ;: Likewise.
+       ls -l $(distdir) $(distdir)/*              # For debugging.
+       @echo am__dist_common = $(am__dist_common) # Likewise.
        echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)foo.txt '
        echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)bar.sh '
        echo ' ' $(am__dist_common) ' ' | grep '[ /]$(auxdir)zardoz '
diff --git a/t/extra11.sh b/t/extra11.sh
index b86be73..b97000d 100755
--- a/t/extra11.sh
+++ b/t/extra11.sh
@@ -22,8 +22,6 @@
 echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-portability
-
 EXTRA_DIST = $(wildcard [!c-z].t d.t [ab].dir foo.* *zardoz*)
 
 .PHONY: prereq
@@ -46,7 +44,7 @@ prereq:
 
 .PHONY: test
 test: distdir
-       ls -l $(distdir) $(distdir)/*.dir ;: For debugging.
+       ls -l $(distdir) $(distdir)/*.dir # For debugging.
        diff a.t $(distdir)/a.t
        diff b.t $(distdir)/b.t
        test ! -r $(distdir)/c.t
@@ -62,7 +60,7 @@ test: distdir
        test ! -r $(distdir)/foo
        diff _zardoz_ $(distdir)/_zardoz_
 check-local:
-       ls -l . *.dir ;: For debugging.
+       ls -l $(srcdir) $(srcdir)/*.dir # For debugging.
        test -f $(srcdir)/a.t
        test -f $(srcdir)/b.t
        test ! -r $(srcdir)/c.t
diff --git a/t/insh2.sh b/t/insh2.sh
index b159f02..8db2d57 100755
--- a/t/insh2.sh
+++ b/t/insh2.sh
@@ -24,7 +24,7 @@ cat > Makefile.am << 'END'
 pkgdata_DATA =
 .PHONY: test
 test: distdir
-       find $(distdir) ;: For debugging.
+       find $(distdir) # For debugging.
        echo ' ' $(am__dist_common) ' ' | grep '[ /]install-sh '
        test -f $(distdir)/install-sh
 END
diff --git a/t/internals.tap b/t/internals.tap
index 44b8912..669e09e 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -19,7 +19,7 @@
 am_create_testdir=empty
 . ./defs || Exit 1
 
-plan_ 6
+plan_ 7
 
 cp "$am_amdir"/header-vars.am . \
   || fatal_ "fetching makefile fragment headers-vars.am"
@@ -34,8 +34,12 @@ rm -f header-vars.am
 cat > Makefile << 'END'
 include ./defn.mk
 
-lo = abcdefghijklmnopqrstuvwxyz
-up = ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower = abcdefghijklmnopqrstuvwxyz
+upper = ABCDEFGHIJKLMNOPQRSTUVWXYZ
+digits = 0123456789
+comma = ,
+dollar = $$
+bslash = \\
 
 default:
        @echo Please select an explicit test; exit 1
@@ -125,8 +129,8 @@ test-toupper:
        test '$(call am__toupper,@:&/?-)' = '@:&/?-'
        test '$(call am__toupper,address@hidden)' = address@hidden
        test '$(call am__toupper,zxzxzxZXZxzxzxzxzx)' = ZXZXZXZXZXZXZXZXZX
-       test '$(call am__toupper,$(lo))' = '$(up)'
-       test '$(call am__toupper,$(up))' = '$(up)'
+       test '$(call am__toupper,$(lower))' = '$(upper)'
+       test '$(call am__toupper,$(upper))' = '$(upper)'
 
 .PHONY: test-tolower
 test-tolower:
@@ -142,8 +146,24 @@ test-tolower:
        test '$(call am__tolower,@:&/?-)' = '@:&/?-'
        test '$(call am__tolower,address@hidden)' = address@hidden
        test '$(call am__tolower,ZXZXZXzxzXZXZXZXZX)' = zxzxzxzxzxzxzxzxzx
-       test '$(call am__tolower,$(up))' = '$(lo)'
-       test '$(call am__tolower,$(lo))' = '$(lo)'
+       test '$(call am__tolower,$(upper))' = '$(lower)'
+       test '$(call am__tolower,$(lower))' = '$(lower)'
+
+.PHONY: test-canonicalize
+test-canonicalize:
+       test '$(call am__canon,A)' = A
+       test '$(call am__canon, b)' = b
+       test '$(call am__canon, foo      )' = foo
+       test '$(call am__canon,$(upper)$(lower)$(digits)_)' = 
'$(upper)$(lower)$(digits)_'
+       test '$(call am__canon,@)' = '@'
+       test '$(call am__canon,%)' = '_'
+       test '$(call am__canon,.&@!;)' = 'address@hidden'
+       test '$(call am__canon,')' = '_'
+       test '$(call am__canon,$(dollar))' = '_'
+       test '$(call am__canon,$(bslash))' = '_'
+       test '$(call am__canon,$(comma))' = '_'
+       test '$(call am__canon,$(bslash)$(comma))' = '__'
+       test '$(call am__canon,x$(comma)@$(bslash))' = 'address@hidden'
 END
 
 command_ok_  am__strip_firstword        $MAKE test-strip-firstword
@@ -152,5 +172,6 @@ command_ok_  am__uniq                   $MAKE test-uniq
 command_ok_  am__test_strip_suffixes    $MAKE test-strip-suffixes
 command_ok_  am__tolower                $MAKE test-tolower
 command_ok_  am__toupper                $MAKE test-toupper
+command_ok_  am__canon                  $MAKE test-canonicalize
 
 :
diff --git a/t/java-compile-install.sh b/t/java-compile-install.sh
index f3340ff..aa2c968 100755
--- a/t/java-compile-install.sh
+++ b/t/java-compile-install.sh
@@ -47,7 +47,7 @@ Baz.java:
        chmod a-w address@hidden && mv -f address@hidden $@
 
 test:
-       ls -l $(srcdir) . ;: For debugging.
+       ls -l $(srcdir) . # For debugging.
        test   -f $(srcdir)/Foo.java
        test   -f $(srcdir)/Bar.java
        test   -f Foo2.java
@@ -62,7 +62,7 @@ test:
        test   -f classjava.stamp
 
 test-install:
-       ls -l $(javadir) ;: For debugging.
+       ls -l $(javadir) # For debugging.
        test   -f '$(javadir)/bClass.class'
        test   -f '$(javadir)/aClass.class'
        test   -f '$(javadir)/Zardoz.class'
diff --git a/t/java-compile-run-flat.sh b/t/java-compile-run-flat.sh
index 32ccf2a..6823e56 100755
--- a/t/java-compile-run-flat.sh
+++ b/t/java-compile-run-flat.sh
@@ -42,8 +42,8 @@ cat > Makefile.am <<'END'
 EXTRA_DIST = # Will be updated later.
 
 test-built:
-       ls -l $(srcdir)               ;: For debugging.
-       test $(srcdir) = . || ls -l . ;: Likewise.
+       ls -l $(srcdir)               # For debugging.
+       test $(srcdir) = . || ls -l . # Likewise.
        test -f $(srcdir)/Main.java
        test -f $(srcdir)/HelloStream.java
        test -f $(srcdir)/PkgLocation.jin
@@ -54,7 +54,7 @@ test-built:
        test -f classjava.stamp
 
 test-installed:
-       ls -l $(javadir) ;: For debugging.
+       ls -l $(javadir) # For debugging.
        test -f $(javadir)/HelloStream.class
        test -f $(javadir)/PkgLocation.class
        test -f $(javadir)/Main.class
@@ -83,7 +83,7 @@ jprog: jprog.sh
        rm -f $@ address@hidden
        $(edit_script) $< >address@hidden
        chmod a-w address@hidden && chmod a+x address@hidden && mv -f 
address@hidden $@
-       sed 's/^/ | /' $@ ;: for debugging.
+       sed 's/^/ | /' $@ # For debugging.
 
 EXTRA_DIST += jprog.sh
 CLEANFILES = jprog
diff --git a/t/java-compile-run-nested.sh b/t/java-compile-run-nested.sh
index 033bcb7..49a1c59 100755
--- a/t/java-compile-run-nested.sh
+++ b/t/java-compile-run-nested.sh
@@ -45,8 +45,8 @@ cat > Makefile.am <<'END'
 SUBDIRS = bin jprog tests
 
 test-built:
-       ls -l $(srcdir)/*             ;: For debugging.
-       test $(srcdir) = . || ls -l * ;: Likewise.
+       ls -l $(srcdir)/*             # For debugging.
+       test $(srcdir) = . || ls -l * # Likewise.
        test -f $(srcdir)/jprog/Main.java
        test -f $(srcdir)/jprog/HelloStream.java
        test -f $(srcdir)/jprog/PkgLocation.jin
@@ -57,7 +57,7 @@ test-built:
        test -f jprog/classjprogclass.stamp
 
 test-installed:
-       ls -l $(jprogclassdir) ;: For debugging.
+       ls -l $(jprogclassdir) # For debugging.
        test -f $(jprogclassdir)/HelloStream.class
        test -f $(jprogclassdir)/Main.class
        test -f $(jprogclassdir)/PkgLocation.class
@@ -88,7 +88,7 @@ jprog: jprog.sh
        rm -f $@ address@hidden
        $(edit_script) $< >address@hidden
        chmod a-w address@hidden && chmod a+x address@hidden && mv -f 
address@hidden $@
-       sed 's/^/ | /' $@ ;: for debugging.
+       sed 's/^/ | /' $@ # For debugging.
 
 EXTRA_DIST = jprog.sh
 CLEANFILES = jprog
diff --git a/t/java-nobase.sh b/t/java-nobase.sh
index ff72a13..4b2b622 100755
--- a/t/java-nobase.sh
+++ b/t/java-nobase.sh
@@ -40,7 +40,7 @@ sub2/Baz.java:
 
 .PHONY: test-install
 test-install:
-       find $(prefix) ;: For debugging.
+       find $(prefix) # For debugging.
        test   -f $(javadir)/sub/subsub/Foo.class
        test   -f $(javadir)/sub/Bar.class
        test   -f $(javadir)/sub2/Baz.class
diff --git a/t/library2.sh b/t/library2.sh
index dfa8758..42a7c62 100755
--- a/t/library2.sh
+++ b/t/library2.sh
@@ -27,5 +27,5 @@ EXTRA_LIBRARIES = libfoo.a
 END
 
 $ACLOCAL
-AUTOMAKE_fails -Wno-portability
+AUTOMAKE_fails -Wnone
 grep AC_PROG_RANLIB stderr
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index eec8247..90a2b8c 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -30,10 +30,10 @@ all:
 foo:
        $(MAKE) all
 notdry:
-       @echo ":: $$MAKEFLAGS ::"; : For debugging.
+       @echo ":: $$MAKEFLAGS ::" # For debugging.
        $(am__make_dryrun) && exit 1; exit 0
 dry:
-       address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
+       address@hidden ":: $$MAKEFLAGS ::" # For debugging.
        +$(am__make_dryrun) || exit 1; echo ok > from-dry-mode
 END
 
diff --git a/t/nobase-python.sh b/t/nobase-python.sh
index 2850901..606428a 100755
--- a/t/nobase-python.sh
+++ b/t/nobase-python.sh
@@ -30,7 +30,7 @@ my_PYTHON = one.py sub/base.py
 nobase_my_PYTHON = two.py sub/nobase.py
 
 test-install-data: install-data
-       find inst -print; : For debugging.
+       find inst -print # For debugging.
        test   -f inst/my/one.py
        test   -f inst/my/one.pyc
        test   -f inst/my/two.py
diff --git a/t/parallel-tests-fork-bomb.sh b/t/parallel-tests-fork-bomb.sh
index d456ab7..7542fb5 100755
--- a/t/parallel-tests-fork-bomb.sh
+++ b/t/parallel-tests-fork-bomb.sh
@@ -54,7 +54,7 @@ if (ulimit -t 8); then ulimit -t 8; fi
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a -Wno-portability
+$AUTOMAKE -a
 
 ./configure
 
diff --git a/t/pattern-rules2.sh b/t/pattern-rules2.sh
index 07d7a24..1255f11 100755
--- a/t/pattern-rules2.sh
+++ b/t/pattern-rules2.sh
@@ -32,4 +32,6 @@ ${ARCH}/%.$(OBJEXT): %.c
 EOF
 
 $ACLOCAL
-$AUTOMAKE -Wno-portability
+$AUTOMAKE
+
+:
diff --git a/t/pluseq7.sh b/t/pluseq7.sh
index 7f5a32e..903432f 100755
--- a/t/pluseq7.sh
+++ b/t/pluseq7.sh
@@ -31,7 +31,7 @@ AR += qq
 END
 
 $ACLOCAL
-AUTOMAKE_fails -Wno-portability
+AUTOMAKE_fails
 q="[\`'\"]"
 grep "^Makefile\.am:3:.* AR .* with $q=$q before .*$q+=$q" stderr
 
diff --git a/t/primary-prefix-couples-force-valid.sh 
b/t/primary-prefix-couples-force-valid.sh
index 064db2b..53a6955 100755
--- a/t/primary-prefix-couples-force-valid.sh
+++ b/t/primary-prefix-couples-force-valid.sh
@@ -46,7 +46,7 @@ x_HEADERS = bar.h
 installcheck-local: test
 .PHONY: test
 test:
-       (cd '$(prefix)' && find .);: For debugging.
+       (cd '$(prefix)' && find .) # For debugging.
        ls -l '$(libdir)/foo$(EXEEXT)'
        test -f '$(libdir)/foo$(EXEEXT)'
        test -x '$(libdir)/foo$(EXEEXT)'
diff --git a/t/remake-gnulib-add-acsubst.sh b/t/remake-gnulib-add-acsubst.sh
index 3d3ab08..46590e7 100755
--- a/t/remake-gnulib-add-acsubst.sh
+++ b/t/remake-gnulib-add-acsubst.sh
@@ -38,7 +38,7 @@ BUILT_SOURCES = foo.h
 edit_h = sed -e 's|address@hidden@|@foovar@|g'
 foo.h: foo.in.h
        $(edit_h) < $(srcdir)/foo.in.h > address@hidden
-       cat address@hidden;: For debugging.
+       cat address@hidden # For debugging.
        mv -f address@hidden $@
 EXTRA_DIST = foo.in.h
 MOSTLYCLEANFILES = foo.h foo.h-t
diff --git a/t/remake12.sh b/t/remake12.sh
index 51f8476..dda5550 100755
--- a/t/remake12.sh
+++ b/t/remake12.sh
@@ -62,17 +62,17 @@ test -f Makefile
 $sleep
 sed "s/%MAGIC3%/$magic3/" >> Makefile <<'END'
 my-check:
-       ls -l . $(srcdir) ;: For debugging.
+       ls -l . $(srcdir) # For debugging.
        test -f $(srcdir)/quux.am
        test -f $(srcdir)/quux.in
        test -f $(srcdir)/bot.in
        test -f $(srcdir)/top.in
        test ! -r $(srcdir)/zardoz.am
        test ! -r $(srcdir)/zardoz.in
-       grep FOO zardoz ;: For debugging.
+       grep FOO zardoz # For debugging.
        test x'$(FOO)' = x'%MAGIC3%'
 test:
-       ls -l ;: For debugging.
+       ls -l # For debugging.
        test x'$(FOO)' = x'dummy'
 .PHONY: test my-check
 END
diff --git a/t/spy-pattern-rules.sh b/t/spy-trailing-backlash.sh
similarity index 52%
copy from t/spy-pattern-rules.sh
copy to t/spy-trailing-backlash.sh
index b2bb25d..cc5d720 100755
--- a/t/spy-pattern-rules.sh
+++ b/t/spy-trailing-backlash.sh
@@ -14,41 +14,59 @@
 # 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, if we have two pattern rules from which the same file (or
-# set of files) can be built, and both are applicable, the first one wins.
-# This is used at least in our 'parallel-tests' support.
+# Check that GNU make line-continuation with backslash-newline has the
+# semantic we expect.
 
 am_create_testdir=empty
 . ./defs || Exit 1
 
-cat > Makefile <<'END'
+cat > Makefile << 'END'
 default:
 
-%.foo: %
-       cp $< $@
-%.foo: %.x
-       cp $< $@
+hash = \#
+ok: ; true :--$(hash)--:
 
-%.bar: %.x
-       cp $< $@
-%.bar: %
+var1 = \
+rule1:
 
-%.mu %.fu: %.1
-       cp $< $*.mu && cp $< $*.fu
-%.mu %.fu: %.2
-       cp $< $*.mu && cp $< $*.fu
+rule2: \
+; echo ok > sentinel
+
+# The backslash doesn't cause we to continue to read after
+# the fist blank line.
+rule3: \
+
+var2 = ok
+
+# Ditto.
+var3 = a \
+
+b:
+
+# The backslash will cause the next line to be a comment as well \
+$(error comment not continued)
+
+var4 = foo \
+# not seen
+
+.PHONY: test
+test:
+       test $(var1) = rule1:
+       test $(var2) = ok
+       test $(var3) = a
+       test $(var4) = foo
+       test -z '$(var5)'
+
+var5 = \
 END
 
-echo one > all
-echo two > all.x
-$MAKE all.foo all.bar
-diff all all.foo
-diff all.x all.bar
-
-echo one > x.1
-echo two > x.2
-$MAKE x.mu
-diff x.mu x.1
-diff x.fu x.1
+$MAKE
+$MAKE ok
+$MAKE ok | grep ':--#--:'
+$MAKE rule1 && Exit 1
+$MAKE rule2
+test -f sentinel
+$MAKE rule3
+$MAKE test
 
 :
diff --git a/t/subobj5.sh b/t/subobj5.sh
index 3b05b6a..32b4049 100755
--- a/t/subobj5.sh
+++ b/t/subobj5.sh
@@ -34,11 +34,11 @@ wish_SOURCES = generic/a.c
 
 .PHONY: test-distdir test-build
 test-distdir: distdir
-       ls -l $(distdir) $(distdir)/* ;: For debugging.
+       ls -l $(distdir) $(distdir)/* # For debugging.
        test ! -r $(distdir)/a.c
        test -f $(distdir)/generic/a.c
 test-build: all
-       ls -l . generic ;: For debugging.
+       ls -l . generic # For debugging.
        test -f generic/a.$(OBJEXT)
        test -f wish$(EXEEXT)
        test ! -r a.$(OBJEXT)
diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh
index 4cffc28..9d7ad88 100755
--- a/t/subpkg-yacc.sh
+++ b/t/subpkg-yacc.sh
@@ -69,7 +69,7 @@ EXTRA_liblib_a_SOURCES = bar.y
 dist-hook:
        test -d $(top_distdir)
        test -d $(distdir)
-       find $(top_distdir) $(distdir) ;: For debugging.
+       find $(top_distdir) $(distdir) # For debugging.
        test -f $(top_distdir)/MU.c
        test ! -f $(distdir)/MU.c
        for suf in y c; do \
diff --git a/t/syntax.sh b/t/syntax.sh
deleted file mode 100755
index 5b51a7a..0000000
--- a/t/syntax.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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
-# 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/>.
-
-# Test for error for bad syntax.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-foo = q \
-
-bin_SCRIPTS = foo.sh
-END
-
-$ACLOCAL
-AUTOMAKE_fails -Wnone
-grep '^Makefile\.am:2:.*blank line following trailing backslash' stderr
-
-:
diff --git a/t/tap-basic.sh b/t/tap-basic.sh
index 09901c7..60f3592 100755
--- a/t/tap-basic.sh
+++ b/t/tap-basic.sh
@@ -44,7 +44,7 @@ ok.test:
        echo 'ok 1' >> address@hidden
        echo 'not ok 2 # TODO' >>address@hidden
        echo 'ok 3 # SKIP' >>address@hidden
-       cat address@hidden ;: For debugging.
+       cat address@hidden # For debugging.
        mv -f address@hidden $@
 END
 
diff --git a/t/test-driver-is-distributed.sh b/t/test-driver-is-distributed.sh
index 23a4d18..1956d78 100755
--- a/t/test-driver-is-distributed.sh
+++ b/t/test-driver-is-distributed.sh
@@ -46,7 +46,7 @@ END
     SUBDIRS = tests
     check-local: test-top
     test-top: distdir
-       ls -l \$(distdir) \$(distdir)/* ;: For debugging.
+       ls -l \$(distdir) \$(distdir)/* # For debugging.
        test -f \$(distdir)/$test_driver
     .PHONY: test-top
 END
diff --git a/t/transform3.sh b/t/transform3.sh
index 6f1b811..acc26ab 100755
--- a/t/transform3.sh
+++ b/t/transform3.sh
@@ -37,7 +37,7 @@ pkglib_LIBRARIES = libzap.a
 pkglibexec_SCRIPTS = mu
 
 test-install: install
-       find $(prefix) ;: For debugging.
+       find $(prefix) # For debugging.
        test   -f $(bindir)/gnu-foo
        test   -x $(bindir)/gnu-foo
        test   -f $(datadir)/foo/bar.txt
@@ -49,7 +49,7 @@ test-install: install
        test ! -d $(libexecdir)/gnu-foo
 
 test-installdirs: installdirs
-       find $(prefix) ;: For debugging.
+       find $(prefix) # For debugging.
        test   -d $(datadir)/foo
        test ! -d $(datadir)/gnu-foo
        test   -d $(libdir)/foo
diff --git a/t/verbatim.sh b/t/verbatim.sh
index 44151d9..da21c8c 100755
--- a/t/verbatim.sh
+++ b/t/verbatim.sh
@@ -14,15 +14,14 @@
 # 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 line starting with '!' is passed verbatim to the output Makefile,
-# and in the right place too.
+# A line starting with '!' used in our internal .am fragments is
+# passed verbatim to the output Makefile, and in the right place
+# too.  Yes, this test is hacky ... as is the behaviour it tests
+# after all ;-)
 
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([Makefile2 Makefile3])
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
 
 long1=long
 long2="$long1 $long1"
@@ -41,15 +40,32 @@ case $long512 in
   *) fatal_ 'defining $long512' ;;
 esac
 
-cat > Makefile.am << END
-!x = $long256
-!!unmodified!
+mkdir am
+cp "$am_amdir"/*.am ./am
+
+echo pkgdata_DATA = configure.ac > Makefile.am
+
+cat > am/data.am << 'END'
+include 0.am
+include 1.am
+include 2.am
+include 3.am
+END
+
+echo "!x = $long256" > am/0.am
+
+cat >> am/1.am << 'END'
 !## unmodified
-! foo = \
+!xyz = \
 rule:
+       @echo Go Custom Rule
+!!unmodified!
+.PHONY: test-xyz
+test-xyz:
+       test '$(xyz)' = '!unmodified!'
 END
 
-cat > Makefile2.am << 'END'
+cat > am/2.am << 'END'
 !badrule1: ; @echo "'$@' unexpectedly won over 'all'!"; exit 1
 !badrule2:
 !      @echo "'$@' unexpectedly won over 'all'!"; exit 1
@@ -66,7 +82,7 @@ all-local: verbatim-rule
 x = ok
 END
 
-cat > Makefile3.am << 'END'
+cat > am/3.am << 'END'
 x1 := 1
 x2 := 2
 
@@ -96,46 +112,46 @@ END
 FOO= BAR=; unset FOO BAR
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE --libdir=.
 
 grep '^!' Makefile.in | grep -v '^!unmodified!$' && Exit 1
-grep '^!' Makefile[23].in && Exit 1
 
 # Use perl, to avoid possible issues with regex length in vendor greps.
 $PERL -e "
-  while (<>) { exit 0 if (/^x = $long256$/); }
-  exit 1;
+  while (<>) { exit (0) if (/^x = $long256$/); }
+  exit (1);
 " Makefile.in
 
 grep '^!unmodified!$' Makefile.in
+test $(grep -c '^!unmodified!$' Makefile.in) -eq 1
 grep '^## unmodified$' Makefile.in
-# FIXME: automake is not yet smart enough to handle line continuation
-# FIXME: on the last line of a '!' series correctly.
-#grep '^ foo = \\$' Makefile.in
+grep '^xyz = \\$' Makefile.in
 
-$EGREP 'foo|bar' Makefile3.in # For debugging.
-test `grep -c '^foo +=' Makefile3.in` -eq 2
-test `grep -c '^bar =' Makefile3.in` -eq 3
+$EGREP 'foo|bar' Makefile.in # For debugging.
+test `grep -c '^foo +=' Makefile.in` -eq 2
+test `grep -c '^bar =' Makefile.in` -eq 3
 
 $AUTOCONF
 ./configure
 
-# FIXME: automake is not yet smart enough to handle line continuation
-# FIXME: on the last line of a '!' series correctly.
-#grep '^ foo = \\$' Makefile.in
-#$MAKE rule
+# The created makefile is not broken.
+$MAKE -n
 
-$MAKE -f Makefile2
+$MAKE rule
+test ! -f verbatim-rule.ok
+$MAKE
 test -f verbatim-rule.ok
-
-$MAKE -f Makefile3 check-var var=foo val='. 1'
-$MAKE -f Makefile3 check-var var=foo val='. 1' FOO=''
-$MAKE -f Makefile3 check-var var=foo val='. 2' FOO=yes
-$MAKE -f Makefile3 check-var var=foo val='. 2' FOO=' who cares!'
-
-$MAKE -f Makefile3 check-var var=bar val=default
-$MAKE -f Makefile3 check-var var=bar val=aaa     BAR=1
-$MAKE -f Makefile3 check-var var=bar val=lol     BAR=2
-$MAKE -f Makefile3 check-var var=bar val=default BAR=3
+$MAKE | grep 'Custom Rule' && Exit 1
+$MAKE test-xyz
+
+$MAKE check-var var=foo val='. 1'
+$MAKE check-var var=foo val='. 1' FOO=''
+$MAKE check-var var=foo val='. 2' FOO=yes
+$MAKE check-var var=foo val='. 2' FOO=' who cares!'
+
+$MAKE check-var var=bar val=default
+$MAKE check-var var=bar val=aaa     BAR=1
+$MAKE check-var var=bar val=lol     BAR=2
+$MAKE check-var var=bar val=default BAR=3
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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