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-2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-211-g3bf7d3a
Date: Thu, 10 May 2012 15:08:51 +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=3bf7d3a0219f4bf8815d3c2cb510223fe2554f6d

The branch, ng/master has been updated
       via  3bf7d3a0219f4bf8815d3c2cb510223fe2554f6d (commit)
       via  4dfba4eb501bbbf65b55da7d171dfd5ef152b1f7 (commit)
       via  887d2121ad17beb91cb2c95617ac51266c0d85da (commit)
       via  245be387d3eefe5d1b39577ded1aa9d2345f4cff (commit)
       via  21423249a97c95023d79536ab570939c507d2df2 (commit)
      from  1ca835e04924d3f6834cf65278695faad417180f (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 3bf7d3a0219f4bf8815d3c2cb510223fe2554f6d
Merge: 1ca835e 4dfba4e
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 10 16:41:32 2012 +0200

    Merge branch 'ng/no-suffixe-rules' into ng/master
    
    * ng/no-suffixe-rules:
      [ng] cleanup: &Automake::Variable::hook is unused, remove it
      [ng] rules: forbid old-fashioned suffix rules, prefer pattern rules
      [ng] rules: can pass deps to &Automake::Rule::define
      [ng] am: prefer pattern rules over old-fashioned suffix rules

commit 4dfba4eb501bbbf65b55da7d171dfd5ef152b1f7
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 10 12:55:04 2012 +0200

    [ng] cleanup: &Automake::Variable::hook is unused, remove it
    
    * lib/Automake/Variable.pm (hook): Delete, it's not used anymore.
    (%_hooks): Likewise.
    (define): Don't process variable hooks anymore.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 887d2121ad17beb91cb2c95617ac51266c0d85da
Author: Stefano Lattarini <address@hidden>
Date:   Wed May 9 17:57:59 2012 +0200

    [ng] rules: forbid old-fashioned suffix rules, prefer pattern rules
    
    Pattern rules are cleaner, safer, and vouched for in the GNU make manual
    itself.  Supporting them instead of suffix rules will also allow us to
    simplify a little the automake script, auxiliary perl modules, and
    documentation.
    
    This change introduces a slight backward-incompatibility now, in that
    user provided definitions of the SUFFIXES variable or of the .SUFFIXES
    target, as well as old-fashioned suffix rules, are now rejected.
    
    Automake-NG still tries to parse and understand suffix-based pattern
    rules though, to retain support for user-added file extensions in the
    _SOURCES variables (see "Handling new file extensions" in the Automake
    manual).
    
    So, an usage like:
    
        SUFFIXES = .baz .c
        .baz.c:
                cp $< $@
        foo_SOURCES = foo.c bar.baz
        DISTCLEANFILES = bar.c
    
    which was valid with mainline Automake, should be translated for
    Automake-NG as:
    
        %.c: %.baz
                cp $< $@
        bin_PROGRAMS = foo
        foo_SOURCES = foo.c sub/bar.baz
        DISTCLEANFILES = bar.c
    
    Note that suffix-based pattern rules with dot-less suffix are *not*
    supported.
    
    * NG-NEWS: Update.
    * doc/automake.texi: Likewise.
    * lib/am/footer.am: Declare '.SUFFIXES:' with empty dependencies, to
    neutralize the default suffix rules.
    * automake.in (&handle_footer): Reject the 'SUFFIXES' variable.  Don't
    process its content anymore.  Don't generate the .SUFFIXES special target
    anymore.
    (&var_SUFFIXES_trigger): Remove.  And don't install it as an hook for the
    now-deprecated 'SUFFIXES' variable.
    * lib/Automake/Rule.pm (&define): Don't process old-fashioned suffix
    rules specially, but just reject them.  Instead, process pattern rules
    specially.
    ($_SUFFIX_RULE_PATTERN): Made local to the '&define' function, renaming
    it as '$suffix_rule_rx'.
    (&suffixes, @_suffixes): Delete, they are no more used.
    (@EXPORT): Adjust.
    (register_suffix_rule): Don't extend '@_suffixes' anymore.
    (reset): Don't reset '@_suffixes' anymore.
    * t/ext3.sh: Remove as obsolete.
    * t/suffix4.sh: Likewise.
    * t/suffix6.sh: Likewise.
    * t/suffix6b.sh: Likewise.
    * t/suffix7.sh: Likewise.
    * t/suffix11.tap: Likewise.
    * t/suffix6c.sh: Rename ...
    * t/suffix-obj.sh: .. like this, and adjust.
    * t/suffix-chain.tap: Rewrite a as "simple" test (rather than as
    a TAP test), adjust, and rename ...
    * t/suffix-chain.sh: ... like this.
    * t/suffix3.tap: Likewise rewrite and rename ...
    * t/suffix3.sh: ... like this.
    * t/suffix8.tap: Likewise rewrite and rename ...
    * t/suffix8.sh: ... like this.
    * t/suffix10.tap: Likewise rewrite and rename ...
    * t/suffix10.sh: ... like this.
    * t/suffix5.sh: Adjust.
    * t/suffix9.sh: Likewise.
    * t/suffix13.sh: Likewise.
    * t/parallel-tests8.sh: Likewise.
    * t/warnings-strictness-interactions.sh: Likewise.
    * t/warnings-win-over-strictness.sh: Likewise.
    * t/warnings-precedence.sh: Likewise.
    * t/warnings-override.sh: Likewise.
    * t/warning-groups-win-over-strictness.sh: Likewise.
    * t/amopts-variable-expansion.sh: Likewise.
    * t/specflg10.sh: Likewise.
    * t/suffix-rules-reject.sh: New test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 245be387d3eefe5d1b39577ded1aa9d2345f4cff
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 10 10:24:55 2012 +0200

    [ng] rules: can pass deps to &Automake::Rule::define
    
    This change is only useful in view of future changes.
    
    * lib/Automake/Rule.pm (define): Add parameter '$deps' (still unused).
    Adjust comments and POD documentation.
    * automake.in (file_contents_internal, read_am_file) [/$RULE_PATTERN/]:
    Also pass the list of dependencies to the 'Automake::Rule::define'
    invocation.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 21423249a97c95023d79536ab570939c507d2df2
Author: Stefano Lattarini <address@hidden>
Date:   Wed May 9 14:04:31 2012 +0200

    [ng] am: prefer pattern rules over old-fashioned suffix rules
    
    The use of pattern rules is cleaner, safer, and vouched for in the
    GNU make manual itself.  Moreover, it will allow us to obtain some
    simplifications in the automake script and the documentation in
    future changes.
    
    * lib/am/texinfos.am: Turn this suffix rules into pattern rules.
    * lib/am/texibuild.am: Likewise.
    * lib/am/depend2.am: Likewise.
    * lib/am/yacc.am: Likewise.
    * lib/am/lex.am: Likewise.
    * lib/am/lang-compile.am: Likewise.  Also, since we are at it, remove
    extra blank lines and quote 'like this' rather than `like this'.
    * t/ext.sh: Adjust.
    * t/objc-basic.sh: Likewise.
    * t/objcxx-basic.sh: Likewise.
    * t/txinfo6.sh: Likewise.
    * t/suffix.sh: Likewise.
    * t/suffix2.sh: Likewise.  Also, define a dummy LIBTOOL in Makefile.am
    instead of requiring the libtool macros.
    * t/cxx.sh: Remove as obsolete.
    * t/nodep.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NG-NEWS                                    |   31 ++++++++++
 automake.in                                |   64 +++++----------------
 doc/automake.texi                          |   50 ++++++-----------
 lib/Automake/Rule.pm                       |   86 ++++++++++------------------
 lib/Automake/Variable.pm                   |   27 ---------
 lib/am/depend2.am                          |    6 +-
 lib/am/footer.am                           |    3 +
 lib/am/lang-compile.am                     |    8 +--
 lib/am/lex.am                              |    2 +-
 lib/am/texibuild.am                        |    8 +-
 lib/am/texinfos.am                         |    2 +-
 lib/am/yacc.am                             |    2 +-
 t/amopts-variable-expansion.sh             |   11 ++-
 t/cxx.sh                                   |   34 -----------
 t/ext.sh                                   |   16 ++---
 t/ext3.sh                                  |   39 -------------
 t/nodep.sh                                 |   40 -------------
 t/objc-basic.sh                            |    4 +-
 t/objcxx-basic.sh                          |    4 +-
 t/parallel-tests8.sh                       |    2 +-
 t/specflg10.sh                             |    5 +-
 t/{suffix-chain.tap => suffix-chain.sh}    |   26 ++++-----
 t/{suffix6c.sh => suffix-obj.sh}           |   11 +---
 t/{ltlibobjs.sh => suffix-rules-reject.sh} |   48 ++++++++++------
 t/suffix.sh                                |   14 ++--
 t/{suffix10.tap => suffix10.sh}            |   25 ++++----
 t/suffix11.tap                             |   75 ------------------------
 t/suffix12.sh                              |    9 ++-
 t/suffix13.sh                              |   12 ++--
 t/suffix2.sh                               |   17 +++---
 t/{suffix3.tap => suffix3.sh}              |   29 ++++------
 t/suffix4.sh                               |   39 -------------
 t/suffix5.sh                               |    2 +-
 t/suffix6.sh                               |   63 --------------------
 t/suffix6b.sh                              |   74 ------------------------
 t/suffix7.sh                               |   37 ------------
 t/{suffix8.tap => suffix8.sh}              |   32 ++++------
 t/suffix9.sh                               |    8 +-
 t/txinfo6.sh                               |    2 +-
 t/warning-groups-win-over-strictness.sh    |    9 ++-
 t/warnings-override.sh                     |   20 ++++---
 t/warnings-precedence.sh                   |   20 ++++---
 t/warnings-strictness-interactions.sh      |   15 +++--
 t/warnings-win-over-strictness.sh          |   16 +++--
 44 files changed, 293 insertions(+), 754 deletions(-)
 delete mode 100755 t/cxx.sh
 delete mode 100755 t/ext3.sh
 delete mode 100755 t/nodep.sh
 rename t/{suffix-chain.tap => suffix-chain.sh} (73%)
 rename t/{suffix6c.sh => suffix-obj.sh} (93%)
 copy t/{ltlibobjs.sh => suffix-rules-reject.sh} (52%)
 rename t/{suffix10.tap => suffix10.sh} (80%)
 delete mode 100755 t/suffix11.tap
 rename t/{suffix3.tap => suffix3.sh} (73%)
 delete mode 100755 t/suffix4.sh
 delete mode 100755 t/suffix6.sh
 delete mode 100755 t/suffix6b.sh
 delete mode 100755 t/suffix7.sh
 rename t/{suffix8.tap => suffix8.sh} (77%)

diff --git a/NG-NEWS b/NG-NEWS
index 11d66d9..025ad2a 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -99,6 +99,37 @@ Parallel testsuite harness
   work as expected:
     TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 
+Pattern rules and suffix rules
+==============================
+
+* Old-fashioned suffix rules are not supported anymore; Automake-NG will
+  error out if you try to use them.  Use pattern rules instead, as
+  advised in the GNU make manual itself.
+
+* The .SUFFIXES: special target and the SUFFIXES special variable are
+  not supported anymore either; Automake-NG will error out if you try
+  to define them.
+
+* To retain support for user-defined file extensions in the '_SOURCES'
+  variables (see "Handling new file extensions" in the Automake manual),
+  Automake-NG still tries to parse and understand suffix-based pattern
+  rules.  So, an usage like:
+   
+      SUFFIXES = .baz .c
+      .baz.c:
+              cp $< $@
+      foo_SOURCES = foo.c bar.baz
+      DISTCLEANFILES = bar.c
+
+  which was valid with mainline Automake, should be translated for
+  Automake-NG as:
+
+      %.c: %.baz
+              cp $< $@
+      bin_PROGRAMS = foo
+      foo_SOURCES = foo.c sub/bar.baz
+      DISTCLEANFILES = bar.c
+
 Miscellaneous
 =============
 
diff --git a/automake.in b/automake.in
index a47aedc..737825b 100644
--- a/automake.in
+++ b/automake.in
@@ -604,23 +604,6 @@ my %am_file_cache;
 
 ################################################################
 
-# var_SUFFIXES_trigger ($TYPE, $VALUE)
-# ------------------------------------
-# This is called by Automake::Variable::define() when SUFFIXES
-# is defined ($TYPE eq '') or appended ($TYPE eq '+').
-# The work here needs to be performed as a side-effect of the
-# macro_define() call because SUFFIXES definitions impact
-# on $KNOWN_EXTENSIONS_PATTERN which is used used when parsing
-# the input am file.
-sub var_SUFFIXES_trigger ($$)
-{
-    my ($type, $value) = @_;
-    accept_extensions (split (' ', $value));
-}
-Automake::Variable::hook ('SUFFIXES', \&var_SUFFIXES_trigger);
-
-################################################################
-
 ## --------------------------------- ##
 ## Forward subroutine declarations.  ##
 ## --------------------------------- ##
@@ -4378,36 +4361,13 @@ sub handle_gettext
 # Handle footer elements.
 sub handle_footer
 {
-    reject_rule ('.SUFFIXES',
-                "use variable 'SUFFIXES', not target '.SUFFIXES'");
-
-    # Note: AIX 4.1 /bin/make will fail if any suffix rule appears
-    # before .SUFFIXES.  So we make sure that .SUFFIXES appears before
-    # anything else, by sticking it right after the default: target.
-    $output_header .= ".SUFFIXES:\n";
-    my $suffixes = var 'SUFFIXES';
-    my @suffixes = Automake::Rule::suffixes;
-    if (@suffixes || $suffixes)
-    {
-       # Make sure SUFFIXES has unique elements.  Sort them to ensure
-       # the output remains consistent.  However, $(SUFFIXES) is
-       # always at the start of the list, unsorted.  This is done
-       # because make will choose rules depending on the ordering of
-       # suffixes, and this lets the user have some control.  Push
-       # actual suffixes, and not $(SUFFIXES).  Some versions of make
-       # do not like variable substitutions on the .SUFFIXES line.
-       my @user_suffixes = ($suffixes
-                            ? $suffixes->value_as_list_recursive : ());
-
-       my %suffixes = map { $_ => 1 } @suffixes;
-       delete @address@hidden;
-
-       $output_header .= (".SUFFIXES: "
-                          . join (' ', @user_suffixes, sort keys %suffixes)
-                          . "\n");
-    }
-
-    $output_trailer .= file_contents ('footer', new Automake::Location);
+  # Automake used to have special support for old-fashioned suffix
+  # rules, but Automake-NG favors the use of GNU make pattern rules.
+  reject_rule '.SUFFIXES',
+              "use pattern rules, not old-fashioned suffix rules";
+  reject_var  'SUFFIXES',
+              "use pattern rules, not old-fashioned suffix rules";
+  $output_trailer .= file_contents ('footer', new Automake::Location);
 }
 
 
@@ -6526,11 +6486,15 @@ sub read_am_file ($$)
        {
            # Found a rule.
            $prev_state = IN_RULE_DEF;
+            my $targ = $1;
+            (my $deps = $2) =~ s/^\s*//;
 
            # For now we have to output all definitions of user rules
            # and can't diagnose duplicates (see the comment in
-           # Automake::Rule::define). So we go on and ignore the return value.
-           Automake::Rule::define ($1, $amfile, RULE_USER, $cond, $where);
+           # Automake::Rule::define). So we go on and ignore the return
+            # value.
+           Automake::Rule::define ($targ, $amfile, RULE_USER, $cond,
+                                    $where, $deps);
 
            $output_trailer .= $comment . $spacing;
            my $cond = new Automake::Condition @cond_stack;
@@ -7009,7 +6973,7 @@ sub file_contents_internal ($$$%)
                  my @undefined_conds =
                    Automake::Rule::define ($targets, $file,
                                            $is_am ? RULE_AUTOMAKE : RULE_USER,
-                                           $cond, $where);
+                                           $cond, $where, "@deps");
                  for my $undefined_cond (@undefined_conds)
                    {
                      my $condparagraph = $paragraph;
diff --git a/doc/automake.texi b/doc/automake.texi
index 2890a8c..c5ac92d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -5546,10 +5546,10 @@ each source file to be compiled to a single @file{.o} 
file (or
 @file{.lo} when using libtool).  Normally these object files are named
 after the source file, but other factors can change this.  If a file in
 the @code{_SOURCES} variable has an unrecognized extension, Automake
-will do one of two things with it.  If a suffix rule exists for turning
-files with the unrecognized extension into @file{.o} files, then
address@hidden will treat this file as it will any other source file
-(@pxref{Support for Other Languages}).  Otherwise, the file will be
+will do one of two things with it.  If a suffix-based pattern rule exists
+for turning files with the unrecognized extension into @file{.o} files,
+then @command{automake} will treat this file as it will any other source
+file (@pxref{Support for Other Languages}).  Otherwise, the file will be
 ignored as though it were a header file.
 
 The prefixes @code{dist_} and @code{nodist_} can be used to control
@@ -6826,7 +6826,7 @@ support for other languages, support for which will be 
improved based
 on user demand.
 
 Some limited support for adding your own languages is available via the
-suffix rule handling (@pxref{Suffixes}).
+suffix-based pattern rules handling (@pxref{Suffixes}).
 
 @node Dependencies
 @section Automatic dependency tracking
@@ -7340,8 +7340,8 @@ not careful enough.  This is due to the way Automake 
tries not to
 overwrite your rules (it assumes you know better than it).
 @samp{foo.$(OBJEXT): bindir.h} supersedes any rule Automake may want to
 output to build @samp{foo.$(OBJEXT)}.  It happens to work in this case
-because Automake doesn't have to output any @samp{foo.$(OBJEXT):}
-target: it relies on a suffix rule instead (i.e., @samp{.c.$(OBJEXT):}).
+because Automake doesn't have to output any @samp{foo.$(OBJEXT):} target:
+it relies on a pattern rule instead (i.e., @samp{%.$(OBJEXT): %.c}).
 Always check the generated @file{Makefile.in} if you do this.
 
 @subsubheading Build @file{bindir.h} from @file{configure}
@@ -10348,14 +10348,15 @@ holds arguments that are passed to @command{gtags}.
 @vindex SUFFIXES
 
 It is sometimes useful to introduce a new implicit rule to handle a file
-type that Automake does not know about.
+type that Automake-NG does not know about.  Automake-NG offers a limited
+support to do so, through the use of suffix-based pattern rules.
 
 For instance, suppose you had a compiler that could compile @file{.foo}
-files to @file{.o} files.  You would simply define a suffix rule for
+files to @file{.o} files.  You would simply define a pattern rule for
 your language:
 
 @example
-.foo.o:
+%.o: %.foo
         foocc -c -o $@@ $<
 @end example
 
@@ -10367,30 +10368,13 @@ bin_PROGRAMS = doit
 doit_SOURCES = doit.foo
 @end example
 
-This was the simpler and more common case.  In other cases, you will
-have to help Automake to figure out which extensions you are defining your
-suffix rule for.  This usually happens when your extension does not
-start with a dot.  Then, all you have to do is to put a list of new
-suffixes in the @code{SUFFIXES} variable @strong{before} you define your
-implicit rule.
+Note that the above only works with suffixes that start with a dot.
 
-For instance, the following definition prevents Automake from misinterpreting
-the @samp{.idlC.cpp:} rule as an attempt to transform @file{.idlC} files into
address@hidden files.
-
address@hidden Keep in sync with suffix7.sh
address@hidden
-SUFFIXES = .idl C.cpp
-.idlC.cpp:
-        # whatever
address@hidden example
-
-As you may have noted, the @code{SUFFIXES} variable behaves like the
address@hidden special target of @command{make}.  You should not touch
address@hidden yourself, but use @code{SUFFIXES} instead and let
-Automake generate the suffix list for @code{.SUFFIXES}.  Any given
address@hidden go at the start of the generated suffixes list, followed
-by Automake generated suffixes not already in the list.
+Also note that Automake-NG does not support old-fashioned suffix rules
+(@pxref{Suffix Rules, ,Old-fashioned Suffix Rules, make, The GNU make
+Manual}), since they are obsoleted by the GNU make pattern rules.  In
+fact, Automake-NG will error out an any attempt to use old-fashioned
+suffix rules.
 
 @node Include
 @chapter Include
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 27df7eb..c8b8111 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -30,7 +30,7 @@ require Exporter;
 use vars '@ISA', '@EXPORT', '@EXPORT_OK';
 @ISA = qw/Automake::Item Exporter/;
 @EXPORT = qw (reset register_suffix_rule suffix_rules_count
-             suffixes rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN
+             rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN
              depend %dependencies %actions register_action
              accept_extensions
              reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
@@ -95,12 +95,6 @@ non-object).
 
 =cut
 
-my $_SUFFIX_RULE_PATTERN =
-  '^(\.[a-zA-Z0-9_()address@hidden)(\.[a-zA-Z0-9_()address@hidden)' . "\$";
-
-# Suffixes found during a run.
-use vars '@_suffixes';
-
 # Same as $suffix_rules (declared below), but records only the
 # default rules supplied by the languages Automake supports.
 use vars '$_suffix_rules_default';
@@ -316,7 +310,6 @@ other internal data.
 sub reset()
 {
   %_rule_dict = ();
-  @_suffixes = ();
   # The first time we initialize the variables,
   # we save the value of $suffix_rules.
   if (defined $_suffix_rules_default)
@@ -384,8 +377,8 @@ sub reset()
 
 =item C<register_suffix_rule ($where, $src, $dest)>
 
-Register a suffix rule defined on C<$where> that transforms
-files ending in C<$src> into files ending in C<$dest>.
+Register a suffix-based pattern rule defined on C<$where> that
+transforms files ending in C<$src> into files ending in C<$dest>.
 
 This upgrades the C<$suffix_rules> variables.
 
@@ -396,7 +389,6 @@ sub register_suffix_rule ($$$)
   my ($where, $src, $dest) = @_;
 
   verb "Sources ending in $src become $dest";
-  push @_suffixes, $src, $dest;
 
   # When transforming sources to objects, Automake uses the
   # %suffix_rules to move from each source extension to
@@ -474,17 +466,6 @@ sub suffix_rules_count ()
   return (scalar keys %$suffix_rules) - (scalar keys %$_suffix_rules_default);
 }
 
-=item C<@list = suffixes>
-
-Return the list of known suffixes.
-
-=cut
-
-sub suffixes ()
-{
-  return @_suffixes;
-}
-
 =item C<rule ($rulename)>
 
 Return the C<Automake::Rule> object for the rule
@@ -744,22 +725,24 @@ sub _conditionals_for_rule ($$$$)
   return @conds;
 }
 
-=item C<@conds = define ($rulename, $source, $owner, $cond, $where)>
+=item C<@conds = define ($rulename, $source, $owner, $cond, $where, [$deps])>
 
 Define a new rule.  C<$rulename> is the list of targets.  C<$source>
 is the filename the rule comes from.  C<$owner> is the owner of the
 rule (C<RULE_AUTOMAKE> or C<RULE_USER>).  C<$cond> is the
 C<Automake::Condition> under which the rule is defined.  C<$where> is
-the C<Automake::Location> where the rule is defined.
+the C<Automake::Location> where the rule is defined.  C<$deps> is a
+withespace-separated list of dependencies (currently unused).
 
 Returns a (possibly empty) list of C<Automake::Condition>s where the
 rule's definition should be output.
 
 =cut
 
-sub define ($$$$$)
+sub define ($$$$$;$)
 {
-  my ($target, $source, $owner, $cond, $where) = @_;
+  my ($target, $source, $owner, $cond, $where, $deps) = @_;
+  $deps = '' unless defined $deps;
 
   prog_error "$where is not a reference"
     unless ref $where;
@@ -772,9 +755,9 @@ sub define ($$$$$)
   my $tdef = _rule_defn_with_exeext_awareness ($target, $cond, $where);
 
   # See whether this is a duplicated target declaration.
-  # Ignore '%'-style pattern rules.  We'd need the dependencies to detect
-  # duplicates, and would be overkill anyway, worth the possibility of
-  # annoying false positives.
+  # Ignore '%'-style pattern rules.  We'd need to scan the dependencies
+  # to detect duplicates, and doing so would be overkill anyway, not
+  # worth the possibility of annoying false positives.
   if ($tdef && $target !~ /%/)
     {
       # Diagnose invalid target redefinitions, if any.  Note that some
@@ -808,36 +791,27 @@ sub define ($$$$$)
       $rule->set ($c, $def);
     }
 
-  # We honor inference rules with multiple targets because many
-  # makes support this and people use it.  However this is disallowed
-  # by POSIX.  We'll print a warning later.
-  my $target_count = 0;
-  my $inference_rule_count = 0;
+  my $chars_rx = '[a-zA-Z0-9_()address@hidden';
+  my $suffix_rule_rx = "^(\\.$chars_rx+)(\\.$chars_rx+)(?:\\s|\$)";
+  my $pattern_rx ="^%(\\.$chars_rx+)";
 
-  for my $t (split (' ', $target))
+  # Let's see if the rule is a suffix-based pattern rule we can handle.
+  if ($target =~ /^%(\.$chars_rx)$/o)
     {
-      ++$target_count;
-      # Check if the rule is a suffix rule: either it's a rule for
-      # two known extensions...
-      if ($t =~ /^($KNOWN_EXTENSIONS_PATTERN)($KNOWN_EXTENSIONS_PATTERN)$/
-         # ...or it's a rule with unknown extensions (i.e., the rule
-         # looks like '.foo.bar:' but '.foo' or '.bar' are not
-         # declared in SUFFIXES and are not known language
-         # extensions).  Automake will complete SUFFIXES from
-         # @suffixes automatically (see handle_footer).
-         || ($t =~ /$_SUFFIX_RULE_PATTERN/o && accept_extensions($1)))
-       {
-         ++$inference_rule_count;
-         register_suffix_rule ($where, $1, $2);
-       }
+      my $objsuf = $1;
+      if ($deps =~ /^\s*%(\.$chars_rx)(\s|$)/o)
+        {
+          my $srcsuf = $1;
+          accept_extensions ($srcsuf);
+          register_suffix_rule ($where, $srcsuf, $objsuf);
+        }
+    }
+  # We don't support old-fashioned  suffix rules anymore, but want to
+  # report them as errors.
+  elsif ($target =~ /$suffix_rule_rx/o)
+    {
+      error $where, "use pattern rules, not old-fashioned suffix rules";
     }
-
-  # POSIX allows multiple targets before the colon, but disallows
-  # definitions of multiple inference rules.  It's also
-  # disallowed to mix plain targets with inference rules.
-  msg ('portability', $where,
-       "inference rules can have only one target before the colon (POSIX)")
-    if $inference_rule_count > 0 && $target_count > 1;
 
   return @conds;
 }
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 983921c..6ed112c 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -286,25 +286,6 @@ sub reject_var ($$)
 
 =over 4
 
-=item C<Automake::Variable::hook ($varname, $fun)>
-
-Declare a function to be called whenever a variable
-named C<$varname> is defined or redefined.
-
-C<$fun> should take two arguments: C<$type> and C<$value>.
-When type is C<''> or <':'>, C<$value> is the value being
-assigned to C<$varname>.  When C<$type> is C<'+'>, C<$value>
-is the value being appended to  C<$varname>.
-
-=cut
-
-use vars '%_hooks';
-sub hook ($$)
-{
-  my ($var, $fun) = @_;
-  $_hooks{$var} = $fun;
-}
-
 =item C<variables ([$suffix])>
 
 Returns the list of all L<Automake::Variable> instances.  (I.e., all
@@ -757,9 +738,6 @@ by by L<Automake::VarDef>).  C<$pretty> applies only to real
 assignments.  I.e., it does not apply to a C<+=> assignment (except
 when part of it is being done as a conditional C<=> assignment).
 
-This function will all run any hook registered with the C<hook>
-function.
-
 =cut
 
 sub define ($$$$$$$$)
@@ -956,11 +934,6 @@ sub define ($$$$$$$$)
       $self->set ($cond, $def);
       push @_var_order, $var;
     }
-
-  # Call any defined hook.  This helps to update some internal state
-  # *while* parsing the file.  For instance the handling of SUFFIXES
-  # requires this (see var_SUFFIXES_trigger).
-  &{$_hooks{$var}}($type, $value) if exists $_hooks{$var};
 }
 
 =item C<variable_delete ($varname, address@hidden)>
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 9adae8f..81660c1 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -42,7 +42,7 @@ am__ensure_depdir = test -d $(am__depdir) || $(MKDIR_P) 
$(am__depdir)
 endif %?FIRST%
 
 if %?NONLIBTOOL%
-?GENERIC?%EXT%.o:
+?GENERIC?%.o: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
 if %FASTDEP%
        %SILENT%$(am__ensure_depdir)
@@ -60,7 +60,7 @@ endif %AMDEP%
 ?!-o?  %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%$<
 endif !%FASTDEP%
 
-?GENERIC?%EXT%.obj:
+?GENERIC?%.obj: %%EXT%
 ?!GENERIC?%OBJOBJ%: %SOURCE%
 if %FASTDEP%
        %SILENT%$(am__ensure_depdir)
@@ -80,7 +80,7 @@ endif !%FASTDEP%
 endif %?NONLIBTOOL%
 
 if %?LIBTOOL%
-?GENERIC?%EXT%.lo:
+?GENERIC?%.lo: %%EXT%
 ?!GENERIC?%LTOBJ%: %SOURCE%
 if %FASTDEP%
        %SILENT%$(am__ensure_depdir)
diff --git a/lib/am/footer.am b/lib/am/footer.am
index 71ac76b..691b0c4 100644
--- a/lib/am/footer.am
+++ b/lib/am/footer.am
@@ -14,6 +14,9 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Neutralize the default suffix rules.
+.SUFFIXES:
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/lib/am/lang-compile.am b/lib/am/lang-compile.am
index 04cafb3..b974197 100644
--- a/lib/am/lang-compile.am
+++ b/lib/am/lang-compile.am
@@ -22,18 +22,16 @@
 
 ## We also handle the case of preprocessing '.F' files into '.f' files.
 if %?PPF77%
-.F.f:
+%.f: %.F
        $(F77COMPILE) -F $<
 endif %?PPF77%
 
-
-
 ## -------- ##
 ## Ratfor.  ##
 ## -------- ##
 
-## We also handle the case of preprocessing `.r' files into `.f' files.
+## We also handle the case of preprocessing '.r' files into '.f' files.
 if %?RATFOR%
-.r.f:
+%.f: %.r
        $(RCOMPILE) -F $<
 endif %?RATFOR%
diff --git a/lib/am/lex.am b/lib/am/lex.am
index e257d31..bc553f4 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -21,7 +21,7 @@ if %?FIRST%
 endif %?FIRST%
 endif %?MAINTAINER-MODE%
 
-?GENERIC?%EXT%%DERIVED-EXT%:
+?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
 ?SUBDIROBJ?    %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
 ?GENERIC?      %VERBOSE%$(am__skipyacc) \
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index a49022e..73abd1f 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -15,7 +15,7 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%:
+?GENERIC_INFO?%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
 ?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
 ## It is wrong to have 'info' files dependent on %DIRSTAMP%, because
 ## 'info' files are distributed and %DIRSTAMP% isn't: a distributed file
@@ -59,7 +59,7 @@
 
 INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 
-?GENERIC?%SOURCE_SUFFIX%.dvi:
+?GENERIC?%.dvi: %%SOURCE_SUFFIX%
 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
        
%AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
 ## Must set MAKEINFO like this so that version.texi will be found even
@@ -74,7 +74,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ?GENERIC?      $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
 ?!GENERIC?     $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || 
echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
 
-?GENERIC?%SOURCE_SUFFIX%.pdf:
+?GENERIC?%.pdf: %%SOURCE_SUFFIX%
 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
        
%AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
 ## Must set MAKEINFO like this so that version.texi will be found even
@@ -89,7 +89,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ?GENERIC?      $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
 ?!GENERIC?     $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || 
echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
 
-?GENERIC?%SOURCE_SUFFIX%.html:
+?GENERIC?%.html: %%SOURCE_SUFFIX%
 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
 ## When --split (the default) is used, makeinfo will output a
 ## directory.  However it will not update the time stamp of a
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index e78cded..fa1b642 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -34,7 +34,7 @@ endif %?LOCAL-TEXIS%
 ## The way to make PostScript, for those who want it.
 if %?LOCAL-TEXIS%
 DVIPS = dvips
-.dvi.ps:
+%.ps: %.dvi
        
%AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        $(DVIPS) %TEXIQUIET% -o $@ $<
 endif %?LOCAL-TEXIS%
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 04cdc99..4815087 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -41,7 +41,7 @@ am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e 
s/cxx$$/hxx/ \
                   -e s/c++$$/h++/ -e s/c$$/h/
 endif %?FIRST%
 
-?GENERIC?%EXT%%DERIVED-EXT%:
+?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
 ?SUBDIROBJ?    %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
        %VERBOSE% \
diff --git a/t/amopts-variable-expansion.sh b/t/amopts-variable-expansion.sh
index 7a04e47..2c39df8 100755
--- a/t/amopts-variable-expansion.sh
+++ b/t/amopts-variable-expansion.sh
@@ -25,27 +25,30 @@ cat > configure.ac <<END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([-Wall -Werror gnu])
 AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
 END
 
 cat > Makefile.am <<'END'
-# The following should expand to '-Wnone -Wno-error foreign -Wportability'.
+# The following should expand to:
+#   subdir-objects -Wnone -Wno-error foreign -Wportability
 AUTOMAKE_OPTIONS = $(foo) foreign
 AUTOMAKE_OPTIONS += ${bar}
 foo = $(foo1)
 foo1 = ${foo2}
-foo2 = -Wnone
+foo2 = subdir-objects -Wnone
 foo2 += $(foo3)
 foo3 = -Wno-error
 bar = -Wportability
+noinst_PROGRAMS = foo
 # This will give a warning with '-Wportability'.
-.aaa.bbb .ccc.ddd:
+foo_SOURCES = sub/foo.c
 # This would give a warning with '-Woverride'.
 install:
 END
 
 $ACLOCAL
 AUTOMAKE_run
-grep '^Makefile\.am:.*inference rules can have only one target' stderr
+grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 grep README stderr && Exit 1
 $EGREP '(install|override)' stderr && Exit 1
 
diff --git a/t/cxx.sh b/t/cxx.sh
deleted file mode 100755
index 63e55b8..0000000
--- a/t/cxx.sh
+++ /dev/null
@@ -1,34 +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/>.
-
-# Test that '.c++' extension works.
-# From Ralf Corsepius.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CXX
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = hello
-hello_SOURCES = hello.c++
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep '^\.SUFFIXES:.*c[+][+]' Makefile.in
diff --git a/t/ext.sh b/t/ext.sh
index 08643ac..02ceab5 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -34,13 +34,11 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-for ext in f for f90 f95 F F90 F95 r m mm upc
-do
-   # Some versions of the BSD shell wrongly exit when 'set -e' is active
-   # if the last command within a compound statement fails and is guarded
-   # by an && only.  So we play safe and use the following idiom, instead
-   # of the apparently simpler 'grep ... && Exit 1'.
-   if grep "^$ext\.o:" Makefile.in; then Exit 1; else :; fi
-   grep "^\.$ext\.o:" Makefile.in
+$FGREP '%.o' Makefile.in  # For debugging.
+
+for ext in f for f90 f95 F F90 F95 r m mm upc; do
+   grep "%.*: %$ext" Makefile.in && Exit 1
+   grep "^%\.o: %\.$ext$" Makefile.in
 done
-Exit 0
+
+:
diff --git a/t/ext3.sh b/t/ext3.sh
deleted file mode 100755
index bd5ed6d..0000000
--- a/t/ext3.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2009-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 3 of the License, 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/>.
-
-# Cover corner cases of derive_suffix wrt. file extensions:
-# - extension declared with SUFFIXES but with no suffix rule for it
-# - extension with a suffix rule but none that leads us to $(OBJEXT)
-# In both cases, we don't try to create a rule; but we shouldn't
-# fail either, because magic might be happening behind our back.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = foo bar
-foo_SOURCES = foo.goo
-SUFFIXES = .goo
-bar_SOURCES = bar.woo
-.woo.zoo: ; making a zoo $@ from a woo $<
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-Exit 0
diff --git a/t/nodep.sh b/t/nodep.sh
deleted file mode 100755
index 1002c54..0000000
--- a/t/nodep.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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 to make sure no-dependencies option does the right thing.
-# Bug report from Greg A. Woods.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = y.c
-END
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-mkdir x
-
-: > y.c
-
-$ACLOCAL
-$AUTOMAKE
-
-$FGREP -v '$(filter --%,' Makefile.in | grep '%' && Exit 1
-Exit 0
diff --git a/t/objc-basic.sh b/t/objc-basic.sh
index f608fbc..f3234d7 100755
--- a/t/objc-basic.sh
+++ b/t/objc-basic.sh
@@ -33,6 +33,8 @@ echo AC_PROG_OBJC >> configure.ac
 
 $ACLOCAL
 $AUTOMAKE
-$EGREP '^\.SUFFIXES:.* \.m( |$)' Makefile.in
+$FGREP '$(OBJC)' Makefile.in
+$FGREP '$(OBJCLD)' Makefile.in
+grep '^%\.o: %\.m$' Makefile.in
 
 :
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
index 3835ab4..29aa982 100755
--- a/t/objcxx-basic.sh
+++ b/t/objcxx-basic.sh
@@ -35,6 +35,8 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
+$FGREP '$(OBJCXX)' Makefile.in
+$FGREP '$(OBJCXXLD)' Makefile.in
+grep '^%\.o: %\.mm$' Makefile.in
 
 :
diff --git a/t/parallel-tests8.sh b/t/parallel-tests8.sh
index a36cea7..46e4120 100755
--- a/t/parallel-tests8.sh
+++ b/t/parallel-tests8.sh
@@ -25,7 +25,7 @@ END
 
 cat > Makefile.am << 'END'
 TESTS = foo.test
-.in.test:
+%.test: %.in
        cp $< $@ && chmod +x $@
 check_SCRIPTS = $(TESTS)
 EXTRA_DIST = foo.in foo.test
diff --git a/t/specflg10.sh b/t/specflg10.sh
index 3b8fc5b..6af4d28 100755
--- a/t/specflg10.sh
+++ b/t/specflg10.sh
@@ -44,15 +44,14 @@ bin_PROGRAMS = bla
 if COND
 AM_DEFAULT_SOURCE_EXT = .foo .quux
 endif
-SUFFIXES = .foo .c
-.foo.c:
+%.c: %.foo
        cat $< >$@
 BUILT_SOURCES = bla.c
 CLEANFILES = bla.c
 END
 
 cat > foo.c << 'END'
-int main () { return 0; }
+int main (void) { return 0; }
 END
 
 cp foo.c sub/bar.cpp
diff --git a/t/suffix-chain.tap b/t/suffix-chain.sh
similarity index 73%
rename from t/suffix-chain.tap
rename to t/suffix-chain.sh
index 9b3191e..2ff72f9 100755
--- a/t/suffix-chain.tap
+++ b/t/suffix-chain.sh
@@ -15,14 +15,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that Automake can take advantage of GNU make ability to
-# automatically chain suffix rules.
+# automatically chain suffix-based pattern rules.
 # See automake bug#7824 and bug#7670.
 
 required=cc
 . ./defs || Exit 1
 
-plan_ 8
-
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AC_OUTPUT
@@ -31,28 +29,28 @@ END
 cat > Makefile.am <<'END'
 bin_PROGRAMS = foo
 foo_SOURCES = foo.c1
-.c1.c0:
+%.c0: %.c1
        (echo 'int main (void)' && echo '{' && cat $<) > $@
-.c0.c:
+%.c: %.c0
        (cat $< && echo '}') > $@
 CLEANFILES = foo.c0 foo.c
 END
 
 echo 'return 0;' > foo.c1
 
-command_ok_ "aclocal"        $ACLOCAL
-command_ok_ "automake"       $AUTOMAKE
-command_ok_ "autoconf"       $AUTOCONF
-command_ok_ "configure"      ./configure
-command_ok_ "make all"       $MAKE all
-command_ok_ "make distcheck" $MAKE distcheck
-command_ok_ "clean"          $MAKE clean
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+$MAKE all
+$MAKE distcheck
 
-# Sanity check.
+# Try with explicit dependencies as well.
+$MAKE clean
 cat >> Makefile <<'END'
 foo.c: foo.c0
 foo.c0: foo.c1
 END
-command_ok_ "make with explicit dependencies" $MAKE
+$MAKE all
 
 :
diff --git a/t/suffix6c.sh b/t/suffix-obj.sh
similarity index 93%
rename from t/suffix6c.sh
rename to t/suffix-obj.sh
index 549f807..925b6ac 100755
--- a/t/suffix6c.sh
+++ b/t/suffix-obj.sh
@@ -15,7 +15,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure that '.o' and '.obj' are handled like '.$(OBJEXT)'.
-# See also related "grepping" test suffix6.test.
 
 . ./defs || Exit 1
 
@@ -31,19 +30,15 @@ AC_SUBST([OBJEXT])
 AC_OUTPUT
 END
 
-unset OBJEXT || :
-
 cat > Makefile.am << 'END'
-SUFFIXES = .zoo .o .obj address@hidden@
-
 bin_PROGRAMS = foo
 foo_SOURCES = foo.zoo
 
-.zoo.o:
+%.o: %.zoo
        { echo '=.zoo.o=' && cat $<; } >$@
-.zoo.obj:
+%.obj: %.zoo
        { echo '=.zoo.obj=' && cat $<; } >$@
address@hidden@:
address@hidden@: %.zoo
        { echo 'address@hidden@=' && cat $<; } >$@
 END
 
diff --git a/t/ltlibobjs.sh b/t/suffix-rules-reject.sh
similarity index 52%
copy from t/ltlibobjs.sh
copy to t/suffix-rules-reject.sh
index 5cdccf0..a4d6aef 100755
--- a/t/ltlibobjs.sh
+++ b/t/suffix-rules-reject.sh
@@ -14,30 +14,42 @@
 # 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 to make sure LTLIBOBJS alone works ok.
-# Report from Vadim Zeitlin.
-required=libtool
+# Automake-NG should reject suffix rules in favor of pattern rules.
+
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_SUBST([LTLIBOBJS])
-AM_PROG_AR
-AC_PROG_LIBTOOL
-END
+$ACLOCAL
 
 cat > Makefile.am << 'END'
-lib_LTLIBRARIES = libtu.la
-libtu_la_SOURCES = foo.c
-libtu_la_LIBADD = @LTLIBOBJS@
+.SUFFIXES: .w
+END
+
+cat > Makefile2.am <<'END'
+## Dummy comments ...
+## ... whose only purpose is ...
+## ... to alter ...
+## ... the line count.
+SUFFIXES = .w
+END
+
+cat > Makefile3.am << 'END'
+.foo.bar: ; cp $< $@
+.mu.um:
+       cp $< $@
+.1.2 .3.4:
+       who cares
 END
 
-: > ltconfig
-: > ltmain.sh
-: > ar-lib
-: > config.guess
-: > config.sub
+msg='use pattern rules, not old-fashioned suffix rules'
 
-$ACLOCAL
-$AUTOMAKE
+AUTOMAKE_fails -Wno-error -Wnone Makefile
+grep "^Makefile\\.am:1:.*$msg" stderr
+AUTOMAKE_fails -Wno-error -Wnone Makefile2
+grep "^Makefile2\\.am:5:.*$msg" stderr
+AUTOMAKE_fails -Wno-error -Wnone Makefile3
+grep "^Makefile3\\.am:1:.*$msg" stderr
+grep "^Makefile3\\.am:2:.*$msg" stderr
+grep "^Makefile3\\.am:4:.*$msg" stderr
+test `grep -c "$msg" stderr` -eq 3
 
 :
diff --git a/t/suffix.sh b/t/suffix.sh
index 600aedf..0d72782 100755
--- a/t/suffix.sh
+++ b/t/suffix.sh
@@ -14,7 +14,7 @@
 # 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 proper suffix rules for C compilation are produced, and
+# Make sure proper pattern rules for C compilation are produced, and
 # only once.
 # See also related test 'suffix2.test'.
 
@@ -45,14 +45,14 @@ for use_arlib in false :; do
   $ACLOCAL
 
   $AUTOMAKE $am_warns -i
-  grep '^ *\.c' Makefile.in # For debugging.
-  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  grep '%\.[co]' Makefile.in # For debugging.
+  test `grep -c '^%\.o: %\.c$' Makefile.in` -eq 1
+  test `grep -c '^%\.obj: %\.c$' Makefile.in` -eq 1
 
   $AUTOMAKE $am_warns
-  grep '^ *\.c' Makefile.in # For debugging.
-  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  grep '%\.[co]' Makefile.in # For debugging.
+  test `grep -c '^%\.o: %\.c$' Makefile.in` -eq 1
+  test `grep -c '^%\.obj: %\.c$' Makefile.in` -eq 1
 
 done
 
diff --git a/t/suffix10.tap b/t/suffix10.sh
similarity index 80%
rename from t/suffix10.tap
rename to t/suffix10.sh
index 0ef7615..cd34fc7 100755
--- a/t/suffix10.tap
+++ b/t/suffix10.sh
@@ -15,13 +15,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure that derivations work with .lo too.
+# Also check suffixes containing the'-' character.
 # (related to PR/37)
 
 required='cc libtoolize yacc'
 . ./defs || Exit 1
 
-plan_ 7
-
 cat >>configure.ac <<EOF
 AC_PROG_CC
 AC_PROG_YACC
@@ -32,8 +31,8 @@ EOF
 
 cat >Makefile.am << 'END'
 lib_LTLIBRARIES = libfoo.la
-libfoo_la_SOURCES = foo.x_
-.x_.y:
+libfoo_la_SOURCES = foo.x-x
+%.y: %.x-x
        rm -f $@ address@hidden
 ## The leading ':;' works around a bug in bash <= 3.2.
        :; { echo '/* autogenerated */' \
@@ -52,16 +51,18 @@ test:
        echo $(libfoo_la_OBJECTS) | grep '^foo\.lo$$'
 END
 
-cat > foo.x_ << 'END'
+cat > foo.x-x << 'END'
 int foo (void) { return yyparse(); }
 END
 
-command_ok_ "libtoolize" libtoolize --force
-command_ok_ "aclocal"    $ACLOCAL
-command_ok_ "autoconf"   $AUTOCONF
-command_ok_ "automake"   $AUTOMAKE --add-missing
-command_ok_ "configure"  ./configure
-command_ok_ "make test"  $MAKE test
-command_ok_ "make all"   $MAKE all
+libtoolize --force
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE test
+$MAKE all
 
 :
diff --git a/t/suffix11.tap b/t/suffix11.tap
deleted file mode 100755
index 113e4b3..0000000
--- a/t/suffix11.tap
+++ /dev/null
@@ -1,75 +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/>.
-
-# Tests that Automake understands multiple suffix rules on the same line.
-# PR/371 and PR/372: Reported by Duncan Gibson.
-# We also check for suffixes containing '-'.
-
-required=cc
-. ./defs || Exit 1
-
-plan_ 10
-
-cat >>configure.ac <<EOF
-AC_PROG_CC
-AC_OUTPUT
-EOF
-
-cat >Makefile.am << 'END'
-bin_PROGRAMS = foo bar baz
-foo_SOURCES = foo.x_
-bar_SOURCES = bar.y-z
-baz_SOURCES = baz1.x_ baz2.y-z
-
-.y-z.c .x_.c:
-       sed 's/INTEGER/int/g' $< >$@
-
-CLEANFILES = foo.c bar.c baz1.c baz2.c
-
-.PHONY: test-real test-fake
-test-fake:
-       echo $(foo_OBJECTS) | grep '^foo\.foo$$'
-       echo $(bar_OBJECTS) | grep '^bar\.foo$$'
-       echo $(baz_OBJECTS) | grep '^baz1\.foo baz2\.foo$$'
-test-real:
-       echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT)$$'
-       echo $(bar_OBJECTS) | grep '^bar\.$(OBJEXT)$$'
-       echo $(baz_OBJECTS) | grep '^baz1\.$(OBJEXT) baz2\.$(OBJEXT)$$'
-check-local: test-real
-END
-
-echo 'INTEGER main(void) { return 0; }' > foo.x_
-echo 'INTEGER main(void) { return 0; }' > bar.y-z
-echo 'INTEGER main(void) { INTEGER baz(void); return baz(); }' > baz1.x_
-echo 'INTEGER baz(void) { return 0; }' > baz2.y-z
-
-command_ok_ "aclocal" $ACLOCAL
-command_ok_ "autoconf" $AUTOCONF
-
-# What we do is not portable.  Automake should warn.
-AUTOMAKE_fails -a
-command_ok_ "warn about unportable make usage" \
-  grep '[iI]nference rules can have only one target before the colon' stderr
-# But this should work anyway.
-command_ok_ "automake" $AUTOMAKE -a -Wno-portability
-
-command_ok_ "configure"       ./configure
-command_ok_ "make test-fake"  $MAKE test-fake OBJEXT=foo
-command_ok_ "make test-real"  $MAKE test-real
-command_ok_ "make"            $MAKE
-command_ok_ "make distcheck"  $MAKE distcheck
-
-:
diff --git a/t/suffix12.sh b/t/suffix12.sh
index 2910527..ecdba67 100755
--- a/t/suffix12.sh
+++ b/t/suffix12.sh
@@ -14,8 +14,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Tests that Automake understands suffix rules with subdir objects.
-# Reported by John Ratliff.
+# Tests that pattern rules with subdir objects are understood.
+# Originally reported by John Ratliff against suffix rules.
+# This test currently fails, because Automake-NG don't scan nor
+# process pattern rules.
 
 required=cc
 . ./defs || Exit 1
@@ -27,9 +29,8 @@ EOF
 
 cat >Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
-SUFFIXES = .baz .o
 # We fake here:
-.baz.o:
+%.o: %.baz
        cp $< $@
 
 bin_PROGRAMS = foo
diff --git a/t/suffix13.sh b/t/suffix13.sh
index d797ae5..86c5975 100755
--- a/t/suffix13.sh
+++ b/t/suffix13.sh
@@ -14,9 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Tests that Automake understands suffix rules with renamed objects
-# and subdir objects.
-# Reported by Florian Briegel.
+# Tests that Automake understands suffix-based pattern rules with
+# renamed objects and subdir objects.  Reported by Florian Briegel.
 
 required=cc
 . ./defs || Exit 1
@@ -29,8 +28,7 @@ EOF
 
 cat >Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
-SUFFIXES = .baz .c
-.baz.c:
+%.c: %.baz
        case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
        cp $< $@
 
@@ -38,7 +36,7 @@ DISTCLEANFILES = sub/bar.c
 
 bin_PROGRAMS = foo
 foo_SOURCES = foo.c sub/bar.baz
-foo_CFLAGS =
+foo_CFLAGS = -DRETVAL=0
 END
 
 mkdir sub
@@ -47,7 +45,7 @@ extern int foo ();
 int main () { return foo (); }
 END
 cat > foo.c <<'END'
-int foo () { return 0; }
+int foo () { return RETVAL; }
 END
 
 $ACLOCAL
diff --git a/t/suffix2.sh b/t/suffix2.sh
index 6dd2616..fb17ee3 100755
--- a/t/suffix2.sh
+++ b/t/suffix2.sh
@@ -14,20 +14,19 @@
 # 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 proper suffix rules for C compilation are produced,
+# Make sure proper pattern rules for C compilation are produced,
 # and only once, even for libtool libraries.
 # See also related test 'suffix.test'.
-required=libtoolize
 
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
 AM_PROG_AR
-AC_PROG_LIBTOOL
 END
 
 cat > Makefile.am << 'END'
+LIBTOOL = who cares
 lib_LTLIBRARIES = libltdl.la
 libltdl_la_SOURCES = ltdl.c ltdl.h
 END
@@ -42,13 +41,13 @@ END
 $ACLOCAL
 
 $AUTOMAKE -a
-grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+grep '%\.[co]' Makefile.in # For debugging.
+test `grep -c '^%\.o: %\.c$' Makefile.in` -eq 1
+test `grep -c '^%\.obj: %\.c$' Makefile.in` -eq 1
 
 $AUTOMAKE -i
-grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+grep '%.[co]' Makefile.in # For debugging.
+test `grep -c '^%\.o: %\.c$' Makefile.in` -eq 1
+test `grep -c '^%\.obj: %\.c$' Makefile.in` -eq 1
 
 :
diff --git a/t/suffix3.tap b/t/suffix3.sh
similarity index 73%
rename from t/suffix3.tap
rename to t/suffix3.sh
index 95a0ebe..1ef8a2b 100755
--- a/t/suffix3.tap
+++ b/t/suffix3.sh
@@ -19,16 +19,13 @@
 required=c++
 . ./defs || Exit 1
 
-plan_ 10
-
 cat >> configure.ac << 'END'
 AC_PROG_CXX
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-SUFFIXES = .zoo
-.zoo.cc:
+%.cc: %.zoo
        sed 's/INTEGER/int/g' $< >$@
 bin_PROGRAMS = foo
 foo_SOURCES = foo.zoo
@@ -38,21 +35,19 @@ FOO = foo
 CLEANFILES = $(FOO).cc
 END
 
-command_ok_ "aclocal" $ACLOCAL
-command_ok_ "automake" $AUTOMAKE
+$ACLOCAL
+$AUTOMAKE
 
 # The foo.cc intermediate step is implicit, it's a mistake if
 # Automake requires this file somewhere.  Also, Automake should
 # not require the file 'foo.c' anywhere.
-command_ok_ "intermediate files not mentioned" \
-  not $FGREP foo.c Makefile.in
+$FGREP foo.c Makefile.in && Exit 1
 # However Automake must figure that foo.zoo is eventually
 # transformed into foo.o, and use this latter file (to link foo).
-command_ok_ "final object file figured out" \
-  $FGREP 'foo.$(OBJEXT)' Makefile.in
+$FGREP 'foo.$(OBJEXT)' Makefile.in
 
-command_ok_ "autoconf" $AUTOCONF
-command_ok_ "configure" ./configure
+$AUTOCONF
+./configure
 
 # This is deliberately valid C++, but invalid C.
 cat > foo.zoo <<'END'
@@ -63,15 +58,15 @@ INTEGER main (void)
 }
 END
 
-command_ok_ "make all" $MAKE all
-command_ok_ "make distcheck"  $MAKE distcheck
+$MAKE all
+$MAKE distcheck
 
-# FIXME: should we check that intermediate file 'foo.cc' has
+# TODO: should we check that intermediate file 'foo.cc' has
 # been removed?  Or is this requiring too much from the make
 # implementation?
 
 # Intermediate files should not be distributed.
-command_ok_ "make distdir" $MAKE distdir
-command_ok_ "intermediate file not distributed" test ! -r $me-1.0/foo.cc
+$MAKE distdir
+test ! -r $me-1.0/foo.cc
 
 :
diff --git a/t/suffix4.sh b/t/suffix4.sh
deleted file mode 100755
index 4523096..0000000
--- a/t/suffix4.sh
+++ /dev/null
@@ -1,39 +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/>.
-
-# Test to make sure Automake doesn't abort on user-defined extensions.
-# Based on a report from Dmitry Mikhin <address@hidden>.
-
-# Also make sure that .SUFFIXES is automatically adjusted with
-# extensions from implicit rules.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-.k.o:
-       echo $< > $@
-
-bin_PROGRAMS = foo
-foo_SOURCES = foo.k
-END
-
-$ACLOCAL
-$AUTOMAKE
-grep '^\.SUFFIXES:' Makefile.in | sed -e 's/$/ /' > suffixes
-cat suffixes
-$FGREP ' .k ' suffixes
-
-:
diff --git a/t/suffix5.sh b/t/suffix5.sh
index 85a4c06..4963a58 100755
--- a/t/suffix5.sh
+++ b/t/suffix5.sh
@@ -29,7 +29,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-.k.lo:
+%.lo: %.k
        (echo $< && cat $<) > $@
 
 noinst_LTLIBRARIES = libfoo.la
diff --git a/t/suffix6.sh b/t/suffix6.sh
deleted file mode 100755
index 29ffc4d..0000000
--- a/t/suffix6.sh
+++ /dev/null
@@ -1,63 +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/>.
-
-# Test to make sure Automake supports implicit rules with dot-less
-# extensions.  Also make sure that '.o' and '.obj' are handled like
-# '.$(OBJEXT)'.  See also related "semantic" tests suffix6b.test
-# and suffix6c.test.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-SUFFIXES = a b .$(OBJEXT) c .o .obj
-bin_PROGRAMS = foo
-foo_SOURCES = fooa barc bazc
-ab:
-       dummy action 1
-b.$(OBJEXT):
-       dummy action 2
-c.o:
-       dummy action C
-c.obj:
-       dummy action C
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-sed -n -e '/foo_OBJECTS *=.*\\$/ {
-  :loop
-  p
-  n
-  t clear
-  :clear
-  s/\\$/\\/
-  t loop
-  p
-  n
-}' -e 's/$/ /' -e 's/^.*foo_OBJECTS *= */ /p' Makefile.in > foo-objects
-cat foo-objects
-
-# Automake must figure that fooa translates to foo.$(OBJEXT) and
-# foo.$(OBJEXT) using the following rules:
-#  fooa --[ab]--> foob --[b.$(OBJEXT)]--> foo.$(OBJEXT)
-$FGREP ' foo.$(OBJEXT) ' foo-objects
-#  barc --[c.o]--> bar.$(OBJEXT)    ## This is really meant!
-$FGREP ' bar.$(OBJEXT) ' foo-objects
-#  bazc --[c.obj]--> baz.$(OBJEXT)  ## This is really meant!
-$FGREP ' baz.$(OBJEXT) ' foo-objects
-
-:
diff --git a/t/suffix6b.sh b/t/suffix6b.sh
deleted file mode 100755
index 67ef877..0000000
--- a/t/suffix6b.sh
+++ /dev/null
@@ -1,74 +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/>.
-
-# Test to make sure Automake supports implicit rules with dot-less
-# extensions.  Se also related "grepping" test suffix6.test.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-# $(LINK) is not defined automatically by Automake, since the *_SOURCES
-# variables don't contain any known extension (.c, .cc, .f, ...).
-# So we need this hack -- but since such an hack can also serve as a
-# mild stress test, that's ok.
-AC_SUBST([LINK], ['cat >$@'])
-AC_SUBST([OBJEXT], [oOo])
-AC_SUBST([EXEEXT], [.XxX])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUFFIXES = a b c .$(OBJEXT)
-bin_PROGRAMS = foo
-foo_SOURCES = fooa
-ab:
-       { echo '=ab=' && cat $<; } >$@
-bc:
-       { echo '=bc=' && cat $<; } >$@
-c.$(OBJEXT):
-       { echo '=b.obj=' && cat $<; } >$@
-test:
-       : For debugging.
-       ls -l
-       : Implicit intermediate files should be removed by GNU make ...
-       test ! -r foob
-       test ! -r fooc
-       : ... but object files should not.
-       cat foo.$(OBJEXT)
-       : For debugging.
-       cat foo.XxX
-       : Now check that the chain of implicit rules has been executed
-       : completely and in the correct order.
-       (echo =b.obj= && echo =bc= && echo =ab= && echo =src=) > exp
-       diff exp foo.XxX
-       rm -f exp
-.PHONY: test
-check-local: test
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
-echo =src= > fooa
-
-$MAKE
-$MAKE test
-$MAKE distcheck
-
-:
diff --git a/t/suffix7.sh b/t/suffix7.sh
deleted file mode 100755
index bef1031..0000000
--- a/t/suffix7.sh
+++ /dev/null
@@ -1,37 +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/>.
-
-# Test to make sure Automake supports implicit rules "confusing"
-# extensions.  Inspired by a mail from Alex Hornby.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-SUFFIXES = .idl S.cpp C.h
-SUFFIXES += C.cpp S.h
-.idlC.cpp:
-       cp $< $@
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-# Make sure Automake has NOT recognized .cpp and .idlC as two new
-# extensions.
-grep 'SUFFIXES.* \.cpp' Makefile.in && Exit 1
-grep 'SUFFIXES.* \.idlC' Makefile.in && Exit 1
-
-:
diff --git a/t/suffix8.tap b/t/suffix8.sh
similarity index 77%
rename from t/suffix8.tap
rename to t/suffix8.sh
index fd549cf..c1f254e 100755
--- a/t/suffix8.tap
+++ b/t/suffix8.sh
@@ -21,8 +21,6 @@
 required='cc libtoolize'
 . ./defs || Exit 1
 
-plan_ 10
-
 cat >>configure.ac <<'END'
 AM_PROG_AR
 AM_PROG_LIBTOOL
@@ -41,22 +39,17 @@ lib_LTLIBRARIES = libfoo.la
 foo_SOURCES = foo.x_
 libfoo_la_SOURCES = bar.x_
 
-.x_.y_:
+%.y_: %.x_
        cp $< $@
-.y_.o:
+%.o: %.y_
        cp $< $@
-.y_.obj:
+%.obj: %.y_
        cp $< $@
-.y_.z_:
+%.z_: %.y_
        cp $< $@
-.z_.lo:
+%.lo: %.z_
        cp $< $@
 
-# Some make implementations don't remove intermediate files
-# automatically, thus causing "make distcheck" to fail if
-# this is not added.
-MOSTLYCLEANFILES = *.y_ *.z_
-
 .PHONY: test0 test1 test2
 test0:
        echo $(foo_OBJECTS) | grep '^foo\.foo$$'
@@ -73,15 +66,16 @@ END
 echo 'int main (void) { return 0; }' > foo.x_
 echo 'int bar (void) { return 0; }' > bar.x_
 
-command_ok_ "libtoolize" libtoolize
-command_ok_ "aclocal"    $ACLOCAL
-command_ok_ "autoconf"   $AUTOCONF
-command_ok_ "automake"   $AUTOMAKE -a
-command_ok_ "configure"  ./configure
-command_ok_ "make test0" $MAKE test0 OBJEXT=foo
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE test0 OBJEXT=foo
 
 for target in test1 test2 all distcheck; do
-  command_ok_ "make $target" $MAKE $target
+  $MAKE $target
 done
 
 :
diff --git a/t/suffix9.sh b/t/suffix9.sh
index 2c1d73d..f6cdae9 100755
--- a/t/suffix9.sh
+++ b/t/suffix9.sh
@@ -39,9 +39,9 @@ cat >Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES = foo.x_
 
-.x_.y:
+%.y: %.x_
        cp $< $@
-.x_.c:
+%.c: %.x_
        cp $< $@
 END
 
@@ -53,9 +53,9 @@ cat >Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES = foo.x_
 
-.x_.c:
+%.c: %.x_
        cp $< $@
-.x_.y:
+%.y: %.x_
        cp $< $@
 END
 
diff --git a/t/txinfo6.sh b/t/txinfo6.sh
index b289efe..b13c51f 100755
--- a/t/txinfo6.sh
+++ b/t/txinfo6.sh
@@ -28,6 +28,6 @@ echo '@setfilename foo.info' > foo.txi
 $ACLOCAL
 $AUTOMAKE
 
-grep '^\.txi\.info: *$' Makefile.in
+grep '^%\.info: %\.txi$' Makefile.in
 
 :
diff --git a/t/warning-groups-win-over-strictness.sh 
b/t/warning-groups-win-over-strictness.sh
index 192e409..70b8b7a 100755
--- a/t/warning-groups-win-over-strictness.sh
+++ b/t/warning-groups-win-over-strictness.sh
@@ -38,9 +38,10 @@ AC_OUTPUT
 END
 
 cat > Makefile.am <<END
+AUTOMAKE_OPTIONS = subdir-objects
 include automake-options.am
-.c.o .c.obj:
-       @echo bad
+noinst_PROGRAMS = foo
+foo_SOURCES = sub/foo.c
 END
 
 rm -rf autom4te*.cache
@@ -48,7 +49,7 @@ rm -rf autom4te*.cache
 echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
 $ACLOCAL
 AUTOMAKE_fails -Werror -Wall --foreign
-grep '^Makefile\.am:.*inference rules can have only one target' stderr
+grep '^Makefile\.am:4:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 
 rm -rf autom4te*.cache
 : > automake-options.am
@@ -57,7 +58,7 @@ $ACLOCAL
 $AUTOMAKE
 
 rm -rf autom4te*.cache
-echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
+echo 'AUTOMAKE_OPTIONS += -Werror -Wnone gnits' > automake-options.am
 echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
 $ACLOCAL
 $AUTOMAKE
diff --git a/t/warnings-override.sh b/t/warnings-override.sh
index 81903f8..956bf81 100755
--- a/t/warnings-override.sh
+++ b/t/warnings-override.sh
@@ -26,16 +26,10 @@
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
-cat > Makefile.am <<'END'
-.c.o .c.obj:
-       @echo bad
-AUTOMAKE_OPTIONS =
-END
-
 set_warnings ()
 {
   set +x
-  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *+=.*|\\1 += $1|" \
                 -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
   mv -f $2-t $2
   set -x
@@ -50,9 +44,19 @@ ok ()
 ko ()
 {
   AUTOMAKE_fails $*
-  grep '^Makefile\.am:1:.*inference rules can have only one target' stderr
+  grep '^Makefile\.am:5:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 }
 
+echo AC_PROG_CC >> configure.ac
+
+cat > Makefile.am <<END
+AUTOMAKE_OPTIONS = subdir-objects
+## For later editing by 'set_am_opts'.
+AUTOMAKE_OPTIONS +=
+noinst_PROGRAMS = foo
+foo_SOURCES = sub/foo.c
+END
+
 $ACLOCAL
 
 # Files required in gnu strictness.
diff --git a/t/warnings-precedence.sh b/t/warnings-precedence.sh
index 9dc6a35..715e294 100755
--- a/t/warnings-precedence.sh
+++ b/t/warnings-precedence.sh
@@ -23,16 +23,10 @@
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
-cat > Makefile.am <<'END'
-.c.o .c.obj:
-       @echo bad
-AUTOMAKE_OPTIONS =
-END
-
 set_warnings ()
 {
   set +x
-  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *+=.*|\\1 += $1|" \
                 -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
   mv -f $2-t $2
   set -x
@@ -47,12 +41,22 @@ ok ()
 ko ()
 {
   AUTOMAKE_fails $*
-  grep '^Makefile\.am:1:.*inference rules can have only one target' stderr
+  grep '^Makefile\.am:5:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 }
 
 # Files required in gnu strictness.
 touch README INSTALL NEWS AUTHORS ChangeLog COPYING
 
+echo AC_PROG_CC >> configure.ac
+
+cat > Makefile.am <<END
+AUTOMAKE_OPTIONS = subdir-objects
+## For later editing by 'set_warnings'.
+AUTOMAKE_OPTIONS +=
+noinst_PROGRAMS = foo
+foo_SOURCES = sub/foo.c
+END
+
 $ACLOCAL
 ok -Wportability -Wno-portability
 ko -Wno-portability -Wportability
diff --git a/t/warnings-strictness-interactions.sh 
b/t/warnings-strictness-interactions.sh
index d281475..c5e70e6 100755
--- a/t/warnings-strictness-interactions.sh
+++ b/t/warnings-strictness-interactions.sh
@@ -23,16 +23,20 @@
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
+echo AC_PROG_CC >> configure.ac
+
 cat > Makefile.am <<END
-AUTOMAKE_OPTIONS =
-.c.o .c.obj:
-       @echo bad
+AUTOMAKE_OPTIONS = subdir-objects
+## For later editing by 'set_am_opts'.
+AUTOMAKE_OPTIONS +=
+noinst_PROGRAMS = foo
+foo_SOURCES = sub/foo.c
 END
 
 set_am_opts ()
 {
   set +x
-  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *+=.*|\\1 += $1|" \
                 -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
   mv -f $2-t $2
   set -x
@@ -54,7 +58,6 @@ set_am_opts '-Wno-portability' configure.ac
 set_am_opts 'gnu' Makefile.am
 
 AUTOMAKE_fails
-$ACLOCAL
-grep '^Makefile\.am:2:.*inference rules can have only one target' stderr
+grep '^Makefile\.am:5:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 
 :
diff --git a/t/warnings-win-over-strictness.sh 
b/t/warnings-win-over-strictness.sh
index c537ac7..4deb27d 100755
--- a/t/warnings-win-over-strictness.sh
+++ b/t/warnings-win-over-strictness.sh
@@ -31,14 +31,14 @@ ok ()
 ko ()
 {
   AUTOMAKE_run $*
-  grep '^Makefile\.am:.*inference rules can have only one target' stderr
+  grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
   test `wc -l <stderr` -eq 1
 }
 
-set_am_opts()
+set_am_opts ()
 {
   set +x
-  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+  sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *+=.*|\\1 += $1|" \
                 -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
   mv -f $2-t $2
   set -x
@@ -48,10 +48,14 @@ set_am_opts()
 # Files required in gnu strictness.
 touch README INSTALL NEWS AUTHORS ChangeLog COPYING
 
+echo AC_PROG_CC >> configure.ac
+
 cat > Makefile.am <<END
-AUTOMAKE_OPTIONS =
-.c.o .c.obj:
-       @echo bad
+AUTOMAKE_OPTIONS = subdir-objects
+## For later editing by 'set_am_opts'.
+AUTOMAKE_OPTIONS +=
+noinst_PROGRAMS = foo
+foo_SOURCES = sub/foo.c
 END
 
 $ACLOCAL


hooks/post-receive
-- 
GNU Automake



reply via email to

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