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.2-811-gc84bdee
Date: Fri, 10 Aug 2012 11:24:30 +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=c84bdee5dc0828e4d6cf2eca371fae1db24fd516

The branch, ng/master has been updated
       via  c84bdee5dc0828e4d6cf2eca371fae1db24fd516 (commit)
       via  cc00d9a4f2214855df1b8b0a5795785543c4489d (commit)
       via  01b3db1d0799be463efef22f2a8e3bc2f835510d (commit)
       via  eb55e8dc0aef942aefee81fe8542618c2cae637b (commit)
       via  2a67361368049577d352949e9636c3595d8b18d4 (commit)
       via  57a8d0747edb61289edbb2ea2eeeabb1fa5d3f77 (commit)
       via  f3da287ec1aee58bda006494b76260be0e61a3b0 (commit)
       via  c7e9abd11c76fd002c1d17b310d6fb42e2fd3282 (commit)
       via  59dafed51a326bf731a7099bce9745c8d4c070a6 (commit)
       via  72bea5fab49dfd245c22fb9dd7b62dad91b6d43e (commit)
       via  776ada4e55e843f409f9d52fa29b9c4b60489180 (commit)
       via  3b227ecc97c8319d02cbad6debcf7a2f9bc3b51b (commit)
       via  ae42495f26be734e826a0d10fd7b6156c23d256e (commit)
       via  00a383739e96db6d85ca0e9f0791249c5fb481d4 (commit)
       via  af8c0d17c7627c4c5f83aecace3f5778a6b7293b (commit)
       via  15bf58f3d0d9e24f1b38f2802280fb193782ccfb (commit)
       via  42d205e4a1d77ac6c99684fa6261b256b567324e (commit)
       via  1c3ed85e6c41bdd843c4e05ed9927382b75b5ee1 (commit)
       via  8ee99aa7adfa211b4970c3a317d3fc82f67f1aa9 (commit)
      from  fd74123befe7ce42c44d52128bb2e725706bb967 (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 c84bdee5dc0828e4d6cf2eca371fae1db24fd516
Merge: cc00d9a 00a3837
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 13:11:07 2012 +0200

    Merge branch 'ng/no-maintmode' into ng/master
    
    * ng/no-maintmode:
      [ng] maintainer-mode: remove it altogether

commit cc00d9a4f2214855df1b8b0a5795785543c4489d
Merge: 01b3db1 af8c0d1
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 13:10:59 2012 +0200

    Merge branch 'ng/inst-work' into ng/master
    
    * ng/inst-work:
      [ng] uninstall: refactor, more processing delegated to GNU make
      [ng] uninstall: reimplement various recipes using more GNU make features
      [ng] am.xargs-map: can pass further arguments to the mapped function
      [ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
      [ng] refactor: remove all uses of '$(am__strip_dir)'

commit 01b3db1d0799be463efef22f2a8e3bc2f835510d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 13:02:29 2012 +0200

    [ng] dejagnu: include verbatim
    
    * lib/am/dejagnu.am: Rename ...
    * lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
    readable verbatim.
    * Makefile.am (dist_am_DATA): Adjust.
    * automake.in (handle_tests): When DejaGNU support is needed, include
    'dejagnu.mk' verbatim in the output Makefile.
    * t/dejagnu2.sh: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit eb55e8dc0aef942aefee81fe8542618c2cae637b
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 12:57:04 2012 +0200

    [ng] dejagnu: include verbatim
    
    * lib/am/dejagnu.am: Rename ...
    * lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
    readable verbatim.
    * Makefile.am (dist_am_DATA): Adjust.
    * automake.in (handle_tests): When DejaGNU support is needed, include
    'dejagnu.mk' verbatim in the output Makefile.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2a67361368049577d352949e9636c3595d8b18d4
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 11:15:15 2012 +0200

    [ng] refactor: drop 'HOST', 'BUILD' and 'TARGET' transforms
    
    Instead, use the new make variables $(am.conf.host-triplet),
    $(am.conf.build-triplet) and $(am.conf.host-triplet) are defined.
    
    * automake.in (preprocess_file): Drop 'HOST', 'BUILD' and 'TARGET'
    transforms.  Their role taken over ...
    (generate_makefile): ... by the new variables 'am.conf.host-triplet',
    'am.conf.build-triplet' and 'am.conf.target-triplet' defined here.
    * lib/am/dejagnu.am: Adjust.
    * t/triplet.sh: New test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 57a8d0747edb61289edbb2ea2eeeabb1fa5d3f77
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 00:43:17 2012 +0200

    [ng] tags: rewrite to be included verbatim
    
    * lib/am/tags.am: Moved ...
    * lib/am/tags.mk: ... here, rewrite to be included verbatim, reformatted,
    and enhanced to take over the role of ...
    * automake.in (handle_tags): ... this function as well, which has thus
    been removed.
    (generate_makefile): Call the removed function no more.  Include 'tags.mk'
    verbatim in the generated Makefile.
    * Makefile.am (dist_am_DATA): Adjust.
    * t/tags.sh: This weak grepping test is broken by the other changes done
    here; so remove it, adding ...
    * t/tags-id.sh: ... this in its place, which is more semantic, i.e.,
    operated by actually running the 'ID' target.
    * t/tags2.sh: Remove as obsolete.
    * t/location.sh: Adjust to avoid spurious errors.
    * t/targetclash.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f3da287ec1aee58bda006494b76260be0e61a3b0
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 10 00:13:10 2012 +0200

    [ng] vars: new variable $(am.conf.is-topdir)
    
    * automake.in (generate_makefile): Define that variable to "yes" if the
    Makefile being currently generated is in the top-level directory, define
    it to the empty string otherwise.  This offers a way (alternative to the
    '%?TOPDIR_P%' transform) to determine whether a recipe is being executed
    in the top-level directory or not.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c7e9abd11c76fd002c1d17b310d6fb42e2fd3282
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 20:50:55 2012 +0200

    [ng] tags: move yet more processing to GNU make
    
    This will also simplify future changes aimed at making the current
    'tags.am' makefile fragment included more "verbatim".
    
    * lib/am/tags.am (am.tags.include-option): New internal variable, the
    include-like option used by the $(EATGS) problem.  This must be
    determined dynamically because Exuberant Ctags wants '--etags-include'
    while GNU Etags wants '--include'.
    (am.tags.subfiles): New, TAGS files in $(SUBDIRS) entries (if any)
    that must be included in the top-level TAGS file.
    (tags-am): Use them, and simplify accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 59dafed51a326bf731a7099bce9745c8d4c070a6
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 20:14:16 2012 +0200

    [ng] tags: drop support for pre-5.6 exuberant ctags
    
    Exuberant Ctags before that version (release in 2006) could
    fail to create TAGS files when no files are supplied, despite
    any '--etags-include' option.  This required the addition of
    a workaround ...
    
    * lib/am/tags.am (tags-am): ... here, which can now be removed.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 72bea5fab49dfd245c22fb9dd7b62dad91b6d43e
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 19:56:39 2012 +0200

    [ng] tags: tiny code duplication removal
    
    * lib/am/tags.am (tags-am): Here, using 'CMD ${1+"$@"}' instead of
    'if test $# -eq 0; then CMD; else CMD "$@"; fi'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 776ada4e55e843f409f9d52fa29b9c4b60489180
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 19:31:35 2012 +0200

    [ng] tags: use more GNU make features
    
    * lib/am/tags.am (am__uniquify_input, am__define_uniq_tagged_files):
    Remove, their role taken over by ...
    (am.tags.files.uniq): ... this new (memoized) variable.
    All rules adjusted.
    (tags-am): Use $(CURDIR) instead of `pwd` to compute the absolute
    path of the current working directory.
    (GTAGS): Use $(abs_top_builddir) instead of `cd $(top_builddir) && pwd`
    to compute the absolute path of the top-level build directory.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 3b227ecc97c8319d02cbad6debcf7a2f9bc3b51b
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 22:18:28 2012 +0200

    [ng] tags: enhance testsuite coverage for etags/ctags
    
    * t/tagsub.sh: Rename ...
    * t/etags.sh: ... like this, and extend greatly.
    * t/ctags.sh: New test (vi-style ctags).
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit ae42495f26be734e826a0d10fd7b6156c23d256e
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 18:45:46 2012 +0200

    [ng] rename: am__tagged_files -> am.tags.files
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 00a383739e96db6d85ca0e9f0791249c5fb481d4
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 9 12:15:01 2012 +0200

    [ng] maintainer-mode: remove it altogether
    
    The best explanation for this move is given by excerpts from the
    Automake manual itself:
    
        Several years ago François Pinard pointed out several arguments
        against this AM_MAINTAINER_MODE macro.  Most of them relate to
        insecurity.  By removing dependencies you get non-dependable builds:
        changes to sources files can have no effect on generated files and
        this can be very confusing when unnoticed.  He adds that security
        shouldn't be reserved to maintainers (what '--enable-maintainer-mode'
        suggests), on the contrary.  If one user has to modify a Makefile.am,
        then either Makefile.in should be updated or a error should be output
        (this is what Automake uses the 'missing' script for) but the last
        thing you want is that nothing happens and the user doesn't notice
        it (which is exactly what happens when rebuild rules are disabled by
        AM_MAINTAINER_MODE).
    
        Jim Meyering, the inventor of the AM_MAINTAINER_MODE macro was swayed
        by François's arguments, and got rid of AM_MAINTAINER_MODE in all of
        his packages.
    
    Since in Automake-NG we are breaking backward-compatibility in several
    ways already, this is a good occasion to get rid of another obsolescent,
    historical-reasons-only, more-dangerous-than-useful feature.
    
    Admittedly, the manual went on saying:
    
        Still many people continue to use AM_MAINTAINER_MODE, because it
        helps them working on projects where all files are kept under
        version control, and because missing isn't enough if you have the
        wrong version of the tools.
    
    But then, the right solutions for using lies not in the use of the
    brittle AM_MAINTAINER_MODE macro; such solutions are indeed already
    explained in another section of the manual (in the section "CVS and
    generated files"):
    
        In distributed development, developers are likely to have different
        version of the maintainer tools installed.  In this case rebuilds
        triggered by timestamp lossage will lead to spurious changes to
        generated files.  There are some popular solutions to this:
    
        - All developers should use the same versions, so that the rebuilt
          files are identical to files in CVS.  (This starts to be difficult
          when each project you work on uses different versions).
    
        - Or people use a script to fix the timestamp after a checkout (the
          GCC folks have such a script).
    
    The use of such a "timestamp-fixing" script is also suggested earlier
    in the section, in the discussion about the merits and limits of the
    'missing' script.
    
    * NG-NEWS: Update.
    * doc/automake-ng.texi: Likewise; among the other things ...
    (maintainer-mode): ... rename this node ...
    (maintainer tools): ... like this.
    * m4/maintainer.m4: Delete.
    * Makefile.am (dist_automake_ac_DATA): Delete.
    * automake.in ($seen_maint_mode): Remove this global variable.
    (scan_autoconf_trace): Don't trace 'AM_MAINTAINER_MODE'.
    (read_am_file): Don't special-handle '@MAINT@' substitutions;
    which were an anachronism anyway, according to pre-existing
    comments.
    (preprocess_file): Drop 'MAINTAINER-MODE' transform.
    * lib/am/configure.am: Remove all uses of the %MAINTAINER-MODE%
    transform.
    * lib/am/remake-hdr.am: Likewise.
    * lib/am/texi-vars.am: Likewise.
    * lib/am/lex.am, lib/am/yacc.am: Likewise, and simplify dropping
    the definition and use of (respectively) '$(am.lex.maybe-skip)'
    and '$(am.yacc.maybe-skip)'.
    * t/condlib.sh (configure.ac): Drop AM_MAINTAINER_MODE use.
    * t/flavor.sh: Likewise, and drop '--enable-maintainer-mode'
    from the './configure' invocation.
    * t/lex-pr204.sh: Remove as obsolete.
    * t/yacc-pr204.sh: Likewise.
    * t/maintmode-configure-msg.sh: Likewise.
    * t/mmode.sh: Likewise.
    * t/mmodely.sh: Likewise.
    * t/remake5.sh: Likewise.
    * t/lex-nodist.sh: Fix header comments to account for some of
    the deleted tests.
    * t/yacc-nodist.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit af8c0d17c7627c4c5f83aecace3f5778a6b7293b
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 8 23:09:06 2012 +0200

    [ng] uninstall: refactor, more processing delegated to GNU make
    
    * lib/am/header-vars.mk (am.chars.space, am.chars.tab): New variables,
    defined respectively to a literal white space characters and a literal
    tabulation character.
    (am.util.whitespace-escape): New function, backslash-escape whitespace
    characters in the given string.
    (am.util.file-exists): New function, tell whether the given argument
    is an existing file; it does so coping correctly with whitespaces and
    wildcard metacharacters as well, to be usable with paths containing
    references to $(DESTDIR).
    (am.uninst.cmd.aux): Re-implement using the new $(am.util.file-exists)
    function.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 15bf58f3d0d9e24f1b38f2802280fb193782ccfb
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 8 19:45:06 2012 +0200

    [ng] uninstall: reimplement various recipes using more GNU make features
    
    This change likely introduces subtle semantic changes in corner cases
    and tricky situation.  Given the simplifications and improved uniformity
    it offers, we consider that completely acceptable.
    
    With this change, the test 't/instmany-python.sh' passes once again.
    
    * lib/am/header-vars.mk (am.uninst.cmd): New private make function.
    (am.uninst.cmd.aux): Likewise, used internally by the above (and
    to be considered an implementation detail of it).
    (am__uninstall_files_from_dir): Delete, no more needed.
    * lib/am/data.am: Rewrite the uninstall recipe(s) to take advantage
    of $(am.uninst.cmd).
    * lib/am/libs.am: Likewise.
    * lib/am/lisp.am: Likewise.
    * lib/am/mans.am: Likewise.
    * lib/am/python.am: Likewise.
    * lib/am/progs.am: Likewise.
    * lib/am/scripts.am: Likewise.
    * lib/am/texinfos.am: Likewise (and also of other unrelated GNU make
    features while we are at it).
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 42d205e4a1d77ac6c99684fa6261b256b567324e
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 8 17:15:31 2012 +0200

    [ng] am.xargs-map: can pass further arguments to the mapped function
    
    This is just a preparatory refactoring that will be needed by future
    changes.
    
    * lib/am/header-vars.mk (am.xargs-map): Improve.
    * t/am-xargs-map.sh: Enhance to check the enhanced behaviour.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1c3ed85e6c41bdd843c4e05ed9927382b75b5ee1
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 8 15:21:46 2012 +0200

    [ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
    
    Prefer using GNU make built-ins $(patsubst) and $(notdir) instead.
    This entails a partial or complete rewrites of several install and/or
    uninstall rules.
    
    This change doesn't offer any serious simplification, being just a
    step in the general direction of moving more non-trivial processing
    to GNU make.  The change actually slows down some install/uninstall
    rules, but leave the touched codebase simpler and more malleable by
    future changes; performance improvements can be re-introduced later,
    this time with more use of GNU make features rather than sed+awk
    chicanery.
    
    This change also breaks the test 't/instmany-python.sh'; no big
    deal though, as that will be fixed again soon by further refactoring.
    
    * lib/am/data.am: Rewritten some install/uninstall rules to avoid
    using '$(am__nobase_strip)' and '$(am__nobase_strip_setup)'.
    * lib/am/libs.am: Likewise.
    * lib/am/lisp.am: Likewise.
    * lib/am/python.am: Likewise.
    * lib/am/scripts.am: Likewise.  Also drop some performance optimization
    that, albeit useful and legitimate, were making the code too much
    complicated to work on.
    (am__nobase_strip): Remove, no more used.
    (am__nobase_strip_setup): Likewise, its only remaining use inlined ...
    (am__nobase_list): ... here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8ee99aa7adfa211b4970c3a317d3fc82f67f1aa9
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 8 00:21:39 2012 +0200

    [ng] refactor: remove all uses of '$(am__strip_dir)'
    
    Prefer using GNU make built-in '$(notdir)' instead.  This change doesn't
    offer any serious simplification, but is just a step in the general
    direction of moving more non-trivial processing to GNU make.
    
    * lib/am/lib.am: Rewritten some install/uninstall rules to avoid
    using '$(am__strip_dir)'.
    * lib/am/lisp.am: Likewise.
    * lib/am/ltlib.am: Likewise.
    * lib/am/python.am: Likewise.
    * lib/am/texinfos.am: Likewise.
    * lib/am/header-vars.mk (am__strip_dir): Remove.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                       |    5 +-
 NG-NEWS                           |    7 ++
 automake.in                       |   68 +++-----------
 doc/automake-ng.texi              |   99 ++-------------------
 lib/am/configure.am               |    9 +-
 lib/am/data.am                    |    8 +-
 lib/am/{dejagnu.am => dejagnu.mk} |   56 ++++++------
 lib/am/header-vars.mk             |   95 ++++++++++++--------
 lib/am/lex.am                     |   12 +--
 lib/am/libs.am                    |   18 ++--
 lib/am/lisp.am                    |   41 ++++-----
 lib/am/ltlib.am                   |    8 +-
 lib/am/mans.am                    |   16 ++--
 lib/am/progs.am                   |   23 +++---
 lib/am/python.am                  |   45 +++-------
 lib/am/remake-hdr.am              |    2 +-
 lib/am/scripts.am                 |   74 ++++++----------
 lib/am/tags.am                    |  179 -------------------------------------
 lib/am/tags.mk                    |  153 +++++++++++++++++++++++++++++++
 lib/am/texi-vers.am               |    4 +-
 lib/am/texinfos.am                |   49 ++++-------
 lib/am/yacc.am                    |   26 +-----
 m4/maintainer.m4                  |   35 -------
 t/am-xargs-map.sh                 |   60 +++++++++++--
 t/condlib.sh                      |    1 -
 t/ctags.sh                        |  109 ++++++++++++++++++++++
 t/dejagnu2.sh                     |    8 +--
 t/etags.sh                        |   93 +++++++++++++++++++
 t/flavor.sh                       |    3 +-
 t/internals.tap                   |   29 ++++++-
 t/lex-nodist.sh                   |    6 +-
 t/lex-pr204.sh                    |   88 ------------------
 t/location.sh                     |    8 +-
 t/maintmode-configure-msg.sh      |   72 ---------------
 t/mmode.sh                        |   64 -------------
 t/mmodely.sh                      |   95 --------------------
 t/remake5.sh                      |   74 ---------------
 t/{tags.sh => tags-id.sh}         |   19 ++++-
 t/tags2.sh                        |   42 ---------
 t/tagsub.sh                       |   48 ----------
 t/targetclash.sh                  |    4 +-
 t/triplet.sh                      |   73 +++++++++++++++
 t/yacc-nodist.sh                  |    6 +-
 t/yacc-pr204.sh                   |   83 -----------------
 44 files changed, 776 insertions(+), 1241 deletions(-)
 rename lib/am/{dejagnu.am => dejagnu.mk} (69%)
 delete mode 100644 lib/am/tags.am
 create mode 100644 lib/am/tags.mk
 delete mode 100644 m4/maintainer.m4
 create mode 100755 t/ctags.sh
 create mode 100755 t/etags.sh
 delete mode 100755 t/lex-pr204.sh
 delete mode 100755 t/maintmode-configure-msg.sh
 delete mode 100755 t/mmode.sh
 delete mode 100755 t/mmodely.sh
 delete mode 100755 t/remake5.sh
 rename t/{tags.sh => tags-id.sh} (78%)
 delete mode 100755 t/tags2.sh
 delete mode 100755 t/tagsub.sh
 create mode 100755 t/triplet.sh
 delete mode 100755 t/yacc-pr204.sh

diff --git a/Makefile.am b/Makefile.am
index f85663c..42ed0f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -193,10 +193,11 @@ dist_am_DATA = \
   lib/am/check-typos.mk \
   lib/am/clean.mk \
   lib/am/header-vars.mk \
+  lib/am/tags.mk \
+  lib/am/dejagnu.mk \
   lib/am/compile.am \
   lib/am/configure.am \
   lib/am/data.am \
-  lib/am/dejagnu.am \
   lib/am/depend2.am \
   lib/am/distdir.am \
   lib/am/footer.am \
@@ -217,7 +218,6 @@ dist_am_DATA = \
   lib/am/remake-hdr.am \
   lib/am/scripts.am \
   lib/am/subdirs.am \
-  lib/am/tags.am \
   lib/am/texi-vers.am \
   lib/am/texi-spec.am \
   lib/am/texinfos.am \
@@ -244,7 +244,6 @@ dist_automake_ac_DATA = \
   m4/install-sh.m4 \
   m4/lex.m4 \
   m4/lispdir.m4 \
-  m4/maintainer.m4 \
   m4/minuso.m4 \
   m4/missing.m4 \
   m4/options.m4 \
diff --git a/NG-NEWS b/NG-NEWS
index 54e3819..1d15d39 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -283,6 +283,13 @@ Obsolete Features Removed
   removed altogether.  Exporting AUTOMAKE_JOBS to in the environment of
   Automake will now have no effect.
 
+* Support for "maintainer mode" has been removed, and rules to remake
+  maintainer-specific files are now always active.  The 'missing' script
+  should till take care of warning users which find themselves in the
+  situation of having to rebuild some maintainer-specific files but
+  missing the relevant maintainer-specific tools (or having too old
+  versions thereof).
+
 
 Source Files with Unknown Extensions
 ====================================
diff --git a/automake.in b/automake.in
index f7bfea3..cd39d65 100644
--- a/automake.in
+++ b/automake.in
@@ -370,9 +370,6 @@ my $seen_canonical = 0;
 # Location of that macro.
 my $canonical_location;
 
-# Where AM_MAINTAINER_MODE appears.
-my $seen_maint_mode;
-
 # Actual version we've seen.
 my $package_version = '';
 
@@ -3147,36 +3144,6 @@ sub handle_data
                     'pkgdata', 'lisp', 'noinst', 'check');
 }
 
-# Handle TAGS.
-sub handle_tags
-{
-    define_variable ('am__tagged_files', INTERNAL,
-                     qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-                        $(am.config-hdr.local.in)/);
-
-    if (rvar('am__tagged_files')->value_as_list_recursive
-          || var ('ETAGS_ARGS') || var ('SUBDIRS'))
-      {
-       $output_rules .= &file_contents ('tags', new Automake::Location);
-       set_seen 'TAGS_DEPENDENCIES';
-      }
-    else
-      {
-        reject_var ('TAGS_DEPENDENCIES',
-                   "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
-                   . " without\nsources or 'ETAGS_ARGS'");
-       # Every Makefile must define some sort of TAGS rule.
-       # Otherwise, it would be possible for a top-level "make TAGS"
-       # to fail because some subdirectory failed.  Ditto ctags and
-        # cscope.
-        $output_rules .=
-          "tags TAGS:\n\n" .
-          "ctags CTAGS:\n\n" .
-          "cscope cscopelist:\n\n";
-      }
-}
-
-
 # user_phony_rule ($NAME)
 # -----------------------
 # Return false if rule $NAME does not exist.  Otherwise,
@@ -4007,7 +3974,7 @@ sub handle_tests
 {
   if (option 'dejagnu')
     {
-      $output_rules .= file_contents ('dejagnu', new Automake::Location);
+      verbatim ('dejagnu');
     }
   else
     {
@@ -4244,7 +4211,6 @@ sub scan_autoconf_traces ($)
                AM_GNU_GETTEXT => 0,
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
-               AM_MAINTAINER_MODE => 0,
                AM_PROG_AR => 0,
                AM_PROG_CC_C_O => 0,
                _AM_SUBST_NOTMAKE => 1,
@@ -4434,10 +4400,6 @@ EOF
              exit $exit_code if process_global_option_list (@opts);
            }
        }
-      elsif ($macro eq 'AM_MAINTAINER_MODE')
-       {
-         $seen_maint_mode = $where;
-       }
       elsif ($macro eq 'AM_PROG_AR')
        {
          $seen_ar = $where;
@@ -5411,11 +5373,6 @@ sub read_am_file ($$)
        chomp;
        $_ .= "\n";
 
-       # Don't look at MAINTAINER_MODE_TRUE here.  That shouldn't be
-       # used by users.  @MAINT@ is an anachronism now.
-       $_ =~ s/address@hidden@//g
-           unless $seen_maint_mode;
-
        my $new_saw_bk = check_trailing_slash ($where, $_);
 
        if (/$IGNORE_PATTERN/o)
@@ -5717,10 +5674,7 @@ sub preprocess_file ($%)
 
   # Complete %transform with global options.
   # Note that %transform goes last, so it overrides global options.
-  %transform = ( 'MAINTAINER-MODE'
-                => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
-
-                'XZ'          => !! option 'dist-xz',
+  %transform = ( 'XZ'          => !! option 'dist-xz',
                 'LZMA'        => !! option 'dist-lzma',
                 'LZIP'        => !! option 'dist-lzip',
                 'BZIP2'       => !! option 'dist-bzip2',
@@ -5737,10 +5691,6 @@ sub preprocess_file ($%)
                 'SUBDIRS'      => !! var ('SUBDIRS'),
                 'TOPDIR_P'     => $relative_dir eq '.',
 
-                'BUILD'    => ($seen_canonical >= AC_CANONICAL_BUILD),
-                'HOST'     => ($seen_canonical >= AC_CANONICAL_HOST),
-                'TARGET'   => ($seen_canonical >= AC_CANONICAL_TARGET),
-
                 'LIBTOOL'      => !! var ('LIBTOOL'),
                 'NONLIBTOOL'   => 1,
                 'SILENT'       => silent_flag (),
@@ -6737,8 +6687,11 @@ sub generate_makefile ($$)
        }
     }
 
-  # Must do this after reading .am file.
+  # Some of these must do this after reading .am file.
+
   define_variable ('subdir', INTERNAL, $relative_dir);
+  define_variable ('am.conf.is-topdir', INTERNAL,
+                   $relative_dir eq '.' ? "yes" : "");
   define_variable ('am.conf.aux-dir', INTERNAL, $am_config_aux_dir);
   define_variable ('am.relpath.makefile', INTERNAL, basename ($makefile));
   define_variable ('am.relpath.makefile.am', INTERNAL,
@@ -6746,6 +6699,13 @@ sub generate_makefile ($$)
   define_variable ('am.relpath.makefile.in', INTERNAL,
                    prepend_srcdir ($makefile_in));
 
+  define_variable 'am.conf.build-triplet', INTERNAL,
+                  $seen_canonical >= AC_CANONICAL_BUILD ? '$(build)' : '';
+  define_variable 'am.conf.host-triplet', INTERNAL,
+                  $seen_canonical >= AC_CANONICAL_HOST ? '$(host)' : '';
+  define_variable 'am.conf.target-triplet', INTERNAL,
+                  $seen_canonical >= AC_CANONICAL_TARGET ? '$(target)' : '';
+
   # If DIST_SUBDIRS is defined, make sure SUBDIRS is, so that
   # recursive rules are enabled.
   define_variable ('SUBDIRS', INTERNAL, '')
@@ -6786,9 +6746,9 @@ sub generate_makefile ($$)
   handle_man_pages;
   handle_data;
   handle_headers;
+  verbatim ('tags');
   handle_subdirs;
   handle_user_recursion;
-  handle_tags;
   handle_minor_options;
 
   # Must come after invocation of handle_programs, handle_libraries and
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 42289ed..8bee89e 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -372,7 +372,7 @@ When Automake Isn't Enough
 Frequently Asked Questions about Automake
 
 * CVS::                         CVS and generated files
-* maintainer-mode::             missing and AM_MAINTAINER_MODE
+* maintainer tools::            The missing script and maintainer tools
 * Wildcards::                   Why doesn't Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
 * Errors with distclean::       Files left in build directory after distclean
@@ -3084,17 +3084,6 @@ This macro specifies that the @file{intl/} subdirectory 
is to be built,
 even if the @code{AM_GNU_GETTEXT} macro was invoked with a first argument
 of @samp{external}.
 
address@hidden AM_MAINTAINER_MODE(@ovar{default-mode})
address@hidden --enable-maintainer-mode
address@hidden --disable-maintainer-mode
-This macro adds an @option{--enable-maintainer-mode} option to
address@hidden  If this is used, @command{automake} will cause
-``maintainer-only'' rules to be turned off by default in the
-generated @file{Makefile.in}s, unless @var{default-mode} is
address@hidden  This macro defines the @code{MAINTAINER_MODE}
-conditional, which you can use in your own @file{Makefile.am}.
address@hidden
-
 @item AM_SUBST_NOTMAKE(@var{var})
 Prevent Automake from defining a variable @var{var}, even if it is
 substituted by @command{config.status}.  Normally, Automake defines a
@@ -4021,8 +4010,8 @@ Find a maintainer tool @var{program} and define the 
@var{name}
 environment variable with its location.  If @var{program} is not
 detected, then @var{name} will instead invoke the @command{missing}
 script, in order to give useful advice to the user about the missing
-maintainer tool.  @xref{maintainer-mode}, for more information on when
-the @command{missing} script is appropriate.
+maintainer tool.  @xref{maintainer tools}, for more information on
+when the @command{missing} script is appropriate.
 
 @item AM_SILENT_RULES
 @acindex AM_SILENT_RULES
@@ -6158,10 +6147,6 @@ When @command{lex} is invoked, it is passed 
@code{AM_LFLAGS} and
 @code{LFLAGS}.  The latter is a user variable and the former is
 intended for the @file{Makefile.am} author.
 
-When @code{AM_MAINTAINER_MODE} (@pxref{maintainer-mode}) is used, the
-rebuild rule for distributed Yacc and Lex sources are only used when
address@hidden is enabled, or when the files have been erased.
-
 @cindex @command{ylwrap}
 @cindex @command{yacc}, multiple parsers
 @cindex Multiple @command{yacc} parsers
@@ -9786,10 +9771,6 @@ to this by writing an @code{installcheck-local} rule.
 Automake generates rules to automatically rebuild @file{Makefile}s,
 @file{configure}, and other derived files like @file{Makefile.in}.
 
address@hidden AM_MAINTAINER_MODE
-If you are using @code{AM_MAINTAINER_MODE} in @file{configure.ac}, then
-these automatic rebuilding rules are only enabled in maintainer mode.
-
 @vindex CONFIG_STATUS_DEPENDENCIES
 @vindex CONFIGURE_DEPENDENCIES
 @cindex @file{version.sh}, example
@@ -11394,7 +11375,7 @@ lists.
 
 @menu
 * CVS::                         CVS and generated files
-* maintainer-mode::             missing and AM_MAINTAINER_MODE
+* maintainer tools::            The missing script and maintainer tools
 * Wildcards::                   Why doesn't Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
 * Errors with distclean::       Files left in build directory after distclean
@@ -11485,7 +11466,7 @@ inaccurate.  Some rebuild rules will be triggered and 
attempt to
 run developer tools such as @command{autoconf} or @command{automake}.
 
 Calls to such tools are all wrapped into a call to the @command{missing}
-script discussed later (@pxref{maintainer-mode}), so that the user will
+script discussed later (@pxref{maintainer tools}), so that the user will
 see more descriptive warnings about missing or out-of-date tools, and
 possible suggestions about how to obtain them, rather than just some
 ``command not found'' error, or (worse) some obscure message from some
@@ -11524,7 +11505,7 @@ touch doc/*.info
 In distributed development, developers are likely to have different
 version of the maintainer tools installed.  In this case rebuilds
 triggered by timestamp lossage will lead to spurious changes
-to generated files.  There are several solutions to this:
+to generated files.  There are some popular solutions to this:
 
 @itemize
 @item
@@ -11534,10 +11515,6 @@ project you work on uses different versions.)
 @item
 Or people use a script to fix the timestamp after a checkout (the GCC
 folks have such a script).
address@hidden
-Or @file{configure.ac} uses @code{AM_MAINTAINER_MODE}, which will
-disable all of these rebuild rules by default.  This is further discussed
-in @ref{maintainer-mode}.
 @end itemize
 
 @item
@@ -11600,14 +11577,14 @@ concerns about version mismatch between developers' 
tools.  The
 Gettext manual has a section about this, see @ref{CVS Issues, CVS
 Issues, Integrating with CVS, gettext, GNU gettext tools}.
 
address@hidden maintainer-mode
address@hidden @command{missing} and @code{AM_MAINTAINER_MODE}
address@hidden maintainer tools
address@hidden The @command{missing} script and maintainer tools
 
 @subheading @command{missing}
 @cindex @command{missing}, purpose
 
 The @command{missing} script is a wrapper around several maintainer
-tools, designed to warn users if a maintainer tool is required but
+tools, designed to warn users if one of them is required but
 missing.  Typical maintainer tools are @command{autoconf},
 @command{automake}, @command{bison}, etc.  Because file generated by
 these tools are shipped with the other sources of a package, these
@@ -11625,64 +11602,6 @@ tool it attempted to use seems too old (be warned that 
diagnosing this
 correctly is typically more difficult that detecting missing tools, and
 requires cooperation from the tool itself, so it won't always work).
 
-If the required tool is installed, @command{missing} will run it and
-won't attempt to continue after failures.  This is correct during
-development: developers love fixing failures.  However, users with
-missing or too old maintainer tools may get an error when the rebuild
-rule is spuriously triggered, halting the build.  This failure to let
-the build continue is one of the arguments of the
address@hidden advocates.
-
address@hidden @code{AM_MAINTAINER_MODE}
address@hidden @code{AM_MAINTAINER_MODE}, purpose
address@hidden AM_MAINTAINER_MODE
-
address@hidden allows you to choose whether the so called
-"rebuild rules" should be enabled or disabled.  With
address@hidden([enable])}, they are enabled by default,
-otherwise they are disabled by default.  In the latter case, if
-you have @code{AM_MAINTAINER_MODE} in @file{configure.ac}, and run
address@hidden/configure && make}, then @command{make} will *never* attempt to
-rebuild @file{configure}, @file{Makefile.in}s, Lex or Yacc outputs, etc.
-I.e., this disables build rules for files that are usually distributed
-and that users should normally not have to update.
-
-The user can override the default setting by passing either
address@hidden or @samp{--disable-maintainer-mode}
-to @command{configure}.
-
-People use @code{AM_MAINTAINER_MODE} either because they do not want their
-users (or themselves) annoyed by timestamps lossage (@pxref{CVS}), or
-because they simply can't stand the rebuild rules and prefer running
-maintainer tools explicitly.
-
address@hidden also allows you to disable some custom build
-rules conditionally.  Some developers use this feature to disable
-rules that need exotic tools that users may not have available.
-
-Several years ago Fran@,{c}ois Pinard pointed out several arguments
-against this @code{AM_MAINTAINER_MODE} macro.  Most of them relate to
-insecurity.  By removing dependencies you get non-dependable builds:
-changes to sources files can have no effect on generated files and this
-can be very confusing when unnoticed.  He adds that security shouldn't
-be reserved to maintainers (what @option{--enable-maintainer-mode}
-suggests), on the contrary.  If one user has to modify a
address@hidden, then either @file{Makefile.in} should be updated
-or a warning should be output (this is what Automake uses
address@hidden for) but the last thing you want is that nothing
-happens and the user doesn't notice it (this is what happens when
-rebuild rules are disabled by @code{AM_MAINTAINER_MODE}).
-
-Jim Meyering, the inventor of the @code{AM_MAINTAINER_MODE} macro was
-swayed by Fran@,{c}ois's arguments, and got rid of
address@hidden in all of his packages.
-
-Still many people continue to use @code{AM_MAINTAINER_MODE}, because
-it helps them working on projects where all files are kept under version
-control, and because @command{missing} isn't enough if you have the
-wrong version of the tools.
-
-
 @node Wildcards
 @section Why doesn't Automake support wildcards?
 @cindex wildcards
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 67cad8d..bc9c259 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -19,8 +19,9 @@
 ## --------------------- ##
 
 ## This rule remakes the Makefile.in.
-$(am.relpath.makefile.in): %MAINTAINER-MODE% $(am.relpath.makefile.am) \
-                           %MAKEFILE-IN-DEPS% $(am.remake.configure-deps)
+$(am.relpath.makefile.in): $(am.relpath.makefile.am) \
+                          $(am.remake.configure-deps) \
+                           %MAKEFILE-IN-DEPS%
 ## If configure.ac or one of configure's dependencies has changed, all
 ## Makefile.in are to be updated; it is then more efficient to run
 ## automake on all the Makefiles at once.  It also allow Automake to be
@@ -91,7 +92,7 @@ $(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENC
 ?TOPDIR_P?     $(SHELL) ./config.status --recheck
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) .am/nil
 
-$(top_srcdir)/configure: %MAINTAINER-MODE% $(am.remake.configure-deps)
+$(top_srcdir)/configure: $(am.remake.configure-deps)
 ?TOPDIR_P?     cd $(srcdir) && $(AUTOCONF)
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) .am/nil
 
@@ -108,7 +109,7 @@ $(top_srcdir)/configure: %MAINTAINER-MODE% 
$(am.remake.configure-deps)
 ## we should hopefully be able to get rid of it in a not-so-distant
 ## future.
 if %?REGEN-ACLOCAL-M4%
-$(am.remake.aclocal-m4): %MAINTAINER-MODE% $(am.remake.aclocal-m4-deps)
+$(am.remake.aclocal-m4): $(am.remake.aclocal-m4-deps)
 ?TOPDIR_P?     cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) .am/nil
 
diff --git a/lib/am/data.am b/lib/am/data.am
index 5941245..dd604d4 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -73,10 +73,10 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
 uninstall-%DIR%%PRIMARY%:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
-?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-       dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
+       $(call am.uninst.cmd,$(%NDIR%dir), \
+?BASE?   $(notdir $(%DIR%_%PRIMARY%)) \
+?!BASE?          $(patsubst $(srcdir)/%,%,$(%DIR%_%PRIMARY%)) \
+       )
 endif %?INSTALL%
 
 
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.mk
similarity index 69%
rename from lib/am/dejagnu.am
rename to lib/am/dejagnu.mk
index 42ba485..f34178b 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.mk
@@ -14,15 +14,20 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-## Name of tool to use.  Default is the same as the package.
+# Name of tool to use.  Default is the same as the package.
+ifeq ($(call am.vars.is-undef,DEJATOOL),yes)
 DEJATOOL = $(PACKAGE)
+endif
 
-## Default flags to pass to dejagnu.  The user can override this.
+# Default flags to pass to dejagnu.  The user can override this.
+ifeq ($(call am.vars.is-undef,$(RUNTESTDEFAULTFLAGS)),yes)
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+endif
 
-EXPECT = expect
-RUNTEST = runtest
-
+# FIXME: is a good idea to let this being overridden from the
+# environment?
+EXPECT ?= expect
+RUNTEST ?= runtest
 
 .PHONY: check-DEJAGNU
 check-DEJAGNU: site.exp
@@ -40,13 +45,9 @@ check-DEJAGNU: site.exp
        exit $$exit_status
 
 
-## ------------------- ##
-## Building site.exp.  ##
-## ------------------- ##
-
-## Note that in the rule we don't directly generate site.exp to avoid
-## the possibility of a corrupted site.exp if make is interrupted.
-## Jim Meyering has some useful text on this topic.
+# Note that in the rule we don't directly generate site.exp to avoid
+# the possibility of a corrupted site.exp if make is interrupted.
+# Jim Meyering has some useful text on this topic.
 site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
        @echo 'Making a new site.exp file ...'
        @echo '## these variables are automatically generated by make ##' 
>site.tmp
@@ -54,14 +55,20 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
        @echo '# edit the last section' >>site.tmp
        @echo 'set srcdir "$(srcdir)"' >>site.tmp
        @echo "set objdir `pwd`" >>site.tmp
-## Quote the *_alias variables because they might be empty.
-?BUILD?        @echo 'set build_alias "$(build_alias)"' >>site.tmp
-?BUILD?        @echo 'set build_triplet $(build)' >>site.tmp
-?HOST? @echo 'set host_alias "$(host_alias)"' >>site.tmp
-?HOST? @echo 'set host_triplet $(host)' >>site.tmp
-?TARGET?       @echo 'set target_alias "$(target_alias)"' >>site.tmp
-?TARGET?       @echo 'set target_triplet $(target)' >>site.tmp
-## Allow the package author to extend site.exp.
+       @# Quote the *_alias variables because they might be empty.
+ifdef am.conf.build-triplet
+       @echo 'set build_triplet $(build)' >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+endif
+ifdef am.conf.host-triplet
+       @echo 'set host_triplet $(host)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+endif
+ifdef am.conf.target-triplet
+       @echo 'set target_triplet $(target)' >>site.tmp
+       @echo 'set target_alias "$(target_alias)"' >>site.tmp
+endif
+       @# Allow the package author to extend site.exp.
        @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
          echo "## Begin content included from file $$f.  Do not modify. ##" \
           && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
@@ -76,13 +83,8 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
        @test ! -f site.exp || mv site.exp site.bak
        @mv site.tmp site.exp
 
-## ---------- ##
-## Cleaning.  ##
-## ---------- ##
-
-## Any other cleaning must be done by the user or by the test suite
-## itself.  We can't predict what dejagnu or the test suite might
-## generate.
+# Any other cleaning must be done by the user or by the test suite itself.
+# We can't predict what dejagnu or the test suite might generate.
 ## FIXME: we clean these on "make distclean" only for better compatibility
 ## FIXME: with mainline Automake, but wouldn't be more correct to clean
 ## FIXME: them on "make clean" instead?
diff --git a/lib/am/header-vars.mk b/lib/am/header-vars.mk
index b4306cd..50519a1 100644
--- a/lib/am/header-vars.mk
+++ b/lib/am/header-vars.mk
@@ -90,6 +90,12 @@ am.chars.squote := '
 # definition of $(am.chars.newline) just below for a significant example.
 am.chars.empty :=
 
+# A single whitespace.
+am.chars.space := $(am.chars.empty) $(am.chars.empty)
+
+# A single tabulation character.
+am.chars.tab := $(am.chars.empty)      $(am.chars.empty)
+
 # A literal newline character, that does not get stripped if used
 # at the end of the expansion of another macro.
 define am.chars.newline
@@ -285,10 +291,12 @@ am.max-cmdline-args := 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 # the system would allow it), or our implementation will likely suffer in
 # performance and in memory consumption.
 
-# $(call am.xargs-map,FUNCTION,LIST)
-# ----------------------------------
-# Map the function $1 on the arguments $2, ensuring that each
-# call of $1 has at most 40 arguments.
+# $(call am.xargs-map,FUNCTION,LIST,[EXTRA-ARGS..])
+# -------------------------------------------------
+# Map the function $1 on the whitespace-separated list $2, ensuring that
+# each call of $1 has at most 40 entries from that list at once.  If
+# further arguments are given (up to $9), they are passed to each $1
+# invocation.
 # This implementation is hacky, but the more elegant or "naive" ones
 # (based on recursion) proved to be ludicrously memory-hungry with
 # huge lists.
@@ -303,10 +311,11 @@ $(if $2,$(strip \
     )$(eval $0.counter := $$($0.counter)x)$(strip \
     )$(eval $0.partial-args += $$i)$(strip \
     )$(if $(filter $(am.max-cmdline-args),$($0.counter)),$(strip \
-      )$(call $1,$(strip $($0.partial-args)))$(strip \
+      )$(call $1,$(strip $($0.partial-args)),$3,$4,$5,$6,$7,$8,$9)$(strip \
       )$(eval $0.partial-args :=)$(strip \
       )$(eval $0.counter :=)))$(strip \
-  )$(if $($0.counter),$(call $1,$(strip $($0.partial-args)))))
+  )$(if $($0.counter),$(call $1,$(strip \
+                        $($0.partial-args)),$3,$4,$5,$6,$7,$8,$9)))
 endef
 
 # Used only by the 'am.clean-cmd.*' functions below.  Do not use in
@@ -356,18 +365,8 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 
-# Strip all directories.
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-
 # Number of files to install concurrently.
 am__install_max = 40
-# Take a $list of "nobase" files, strip $(srcdir) from them.
-# Split apart in setup variable and an action that can be used
-# in backticks or in a pipe.
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
 # Take a "$list" of nobase files, collect them, indexed by their
 # srcdir-stripped dirnames.  For up to am__install_max files, output
 # a line containing the dirname and the files, space-separated.
@@ -375,7 +374,8 @@ am__nobase_strip = \
 # string concatenation in most shells, and should avoid line length
 # limitations, while still offering only negligible performance impact
 # through spawning more install commands than absolutely needed.
-am__nobase_list = $(am__nobase_strip_setup); \
+am__nobase_list = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
   for p in $$list; do echo "$$p $$p"; done | \
   sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
   $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
@@ -387,24 +387,43 @@ am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 
-# A shell code fragment to uninstall files from a given directory.
-# It expects the $dir and $files shell variables to be defined respectively
-# to the directory where the files to be removed are, and to the list of
-# such files.
-# Some rm implementations complain if 'rm -f' is used without arguments,
-# so the fist "test -z" check (FIXME: this is probably obsolete; see
-# automake bug#10828).
-# At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
-# "test ! -[fdr]" below instead (FIXME: this should become obsolete when
-# we can assume the $SHELL set by Autoconf-generated configure scripts is
-# a truly POSIX shell; see:
-# <http://lists.gnu.org/archive/html/bug-autoconf/2012-06/msg00009.html>).
-# We expect $dir to be either non-existent or a directory, so the
-# failure we'll experience if it is a regular file is indeed desired
-# and welcome (better to fail loudly than silently).
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         cd "$$dir" && rm -f $$files; }; \
-  }
+# New function, backslash-escape whitespace in the given string.
+define am.util.whitespace-escape
+$(subst $(am.chars.space),\$(am.chars.space),$(subst 
$(am.chars.tab),\$(am.chars.tab),$1))
+endef
+
+# Determine whether the given file exists.  Since this function is
+# expected to be used on paths referencing $(DESTDIR), it must be
+# ready to cope with whitespaces and shell metacharacters.
+# FIXME: here we assume that the shell found by Autoconf-generated
+# configure supports "test -e"; that is not completely correct ATM, but
+# future versions of Autoconf will reject non-POSIX shells, so we should
+# be safe in the long term.
+define am.util.file-exists
+$(strip \
+  $(if $(strip $(findstring *,$1) $(findstring ?,$1) \
+               $(findstring [,$1) $(findstring ],$1)), \
+    $(shell test -e '$(subst $(am.chars.squote),'\'',$1)' && echo yes), \
+    $(if $(wildcard $(call am.util.whitespace-escape,$1)),yes)))
+endef
+
+# $(call am.uninst.cmd,DIR,FILES,[RM-OPTS])
+# -----------------------------------------
+# Uninstall the given files from the given directory, avoiding to hit
+# command line length limits, and honoring $(DESTDIR).  If the given DIR
+# is actually an empty name, or it it refers to a non-existing file, it
+# is assumed nothing is to be removed.  The RM-OPTS (if present) are
+# passed to the rm invocation removing the files (this ca be useful in
+# case such files are actually directories (as happens with the HTML
+# documentation), in which case rm should be passed the '-r' option.
+# Similarly to the 'am.clean-cmd.f' above, this function is only meant
+# to be used in a "sub-recipe" by its own.
+
+define am.uninst.cmd.aux
+$(if $(and $2,$1),$(if $(call am.util.file-exists,$(DESTDIR)$2),$(strip \
+)cd '$(DESTDIR)$2' && rm -f$(if $3, $3) $1$(am.chars.newline)))
+endef
+
+define am.uninst.cmd
+$(call am.xargs-map,$0.aux,$(strip $2),$(strip $1),$(strip $3))
+endef
diff --git a/lib/am/lex.am b/lib/am/lex.am
index 7d414f5..823fd28 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -14,16 +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/>.
 
-## See the comment about am.yacc.maybe-skip in yacc.am.
-if %?MAINTAINER-MODE%
-if %?FIRST%
address@hidden@am.lex.maybe-skip = test -f $@ ||
-endif %?FIRST%
-endif %?MAINTAINER-MODE%
-
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
        %SILENT%$(am.cmd.ensure-target-dir-exists)
-?GENERIC?      %VERBOSE%$(am.lex.maybe-skip) \
-?!GENERIC??DIST_SOURCE?        %VERBOSE%$(am.lex.maybe-skip) \
-       $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+       %VERBOSE%$(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c %OBJ% \
+                -- %COMPILE%
diff --git a/lib/am/libs.am b/lib/am/libs.am
index ece5212..6ca7dad 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -63,11 +63,11 @@ endif !%?BASE%
 ## useless; sh never actually executes this command.  Read the GNU
 ## Standards for a little enlightenment on this.
        @$(POST_INSTALL)
-       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
-       for p in $$list; do \
-         if test -f $$p; then \
-?BASE?     $(am__strip_dir) \
-?!BASE?            f=$$p; \
+?BASE? @list='$(notdir $(%DIR%_LIBRARIES))'; \
+?!BASE?        @list='$(%DIR%_LIBRARIES)'; \
+       test -n "$(%NDIR%dir)" || list=; \
+       for f in $$list; do \
+         if test -f $$f; then \
 ## Must ranlib after installing because mod time changes.
 ## cd to target directory because AIX ranlib messes up with whitespace
 ## in the argument.
@@ -86,10 +86,10 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
 uninstall-%DIR%LIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
-?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-       dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
+       $(call am.uninst.cmd,$(%NDIR%dir), \
+?BASE?   $(notdir $(%DIR%_LIBRARIES)) \
+?!BASE?          $(patsubst $(srcdir)/%,%,$(%DIR%_LIBRARIES)) \
+       )
 endif %?INSTALL%
 
 
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index c6fb923..0c40354 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -61,25 +61,21 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-         list='$(%DIR%_LISP)'; \
-         if test -n "$$list"; then \
+         $(if $(%DIR%_LISP), \
            echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
            $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
-         fi; \
-         for p in $$list; do \
-## A lisp file can be in the source directory or the build directory.
-           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-?BASE?     $(am__strip_dir) \
-?!BASE?            f=$$p; \
-           echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; 
\
-           $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit 
$$?; \
+           $(foreach i, $(%DIR%_LISP), \
+             p=$(call am.vpath.rewrite,$i); \
+?BASE?       f=$(notdir $i); \
+?!BASE?              f=$i; \
+             echo " $(%DIR%LISP_INSTALL) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
+             $(%DIR%LISP_INSTALL) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit 
$$?; \
 ## Only install .elc file if it exists.
-           if test -f $${p}c; then \
-             echo " $(%DIR%LISP_INSTALL) '$${p}c' 
'$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
-             $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" || 
exit $$?; \
-           else : ; fi; \
-         done; \
-       else : ; fi
+             if test -f $${p}c; then \
+               echo " $(%DIR%LISP_INSTALL) '$${p}c' 
'$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
+               $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" 
|| exit $$?; \
+             else : ; fi;)) \
+         :; else :; fi;
 endif %?INSTALL%
 
 
@@ -92,12 +88,13 @@ if %?INSTALL%
 uninstall-%DIR%LISP:
        @$(NORMAL_UNINSTALL)
 ## Do not uninstall anything if EMACS was not found.
-       @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
-       list='$(%DIR%_LISP)'; \
-?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-       files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
-       dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
+## FIXME: we should actually check more strictly for $(EMACS) = "no".
+       $(call am.uninst.cmd,$(if $(filter no,$(EMACS)),,$(%NDIR%dir)), \
+          $(foreach i,\
+?BASE?      $(notdir $(%DIR%_LISP)), \
+?!BASE?             $(patsubst $(srcdir)/%,%,$(%DIR%_LISP)), \
+## Also remove the '.elc' byte-compiled versions (if any).
+            $(i) $(i)c))
 endif %?INSTALL%
 
 
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index d80b66f..543f7dc 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -87,10 +87,10 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
 uninstall-%DIR%LTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
-       for p in $$list; do \
-?BASE?   $(am__strip_dir) \
-?!BASE?          f=$$p; \
+?BASE? @list='$(notdir $(%DIR%_LTLIBRARIES))'; \
+?!BASE?        @list='$(%DIR%_LTLIBRARIES)'; \
+       test -n "$(%NDIR%dir)" || list=; \
+       for f in $$list; do \
 ?LIBTOOL?        echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
 ?LIBTOOL?        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
 ?!LIBTOOL?       echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
diff --git a/lib/am/mans.am b/lib/am/mans.am
index dc08f27..32ae50f 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -125,21 +125,22 @@ uninstall-man%SECTION%:
        @$(NORMAL_UNINSTALL)
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
-       files=`{ for i in $$list; do echo "$$i"; done; \
+       $(call am.uninst.cmd,$(man%SECTION%dir),$(shell \
+       { list='%NOTRANS_SECT_LIST%'; \
+       for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
 ?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
 ## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
 ?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
-       } | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
-       dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
+       } | sed -e 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'))
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
-       files=`{ for i in $$list; do echo "$$i"; done; \
+       $(call am.uninst.cmd,$(man%SECTION%dir),$(shell \
+       { list='%TRANS_SECT_LIST%'; \
+       for i in $$list; do echo "$$i"; done; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
 ?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
@@ -148,6 +149,5 @@ if %?TRANS_MANS%
 ## Extract basename of manpage, run it through the program rename
 ## transform, and change the extension if needed.
        } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' 
\
-             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-       dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
+               -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'))
 endif %?TRANS_MANS%
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 6dac5a8..a221a66 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -84,18 +84,17 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PROGRAMS
 uninstall-%DIR%PROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-## Remove any leading directory before applying $(transform),
-## but keep the directory part in the hold buffer, in order to
-## reapply it again afterwards in the nobase case.  Append $(EXEEXT).
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' \
-?!BASE?              -e 'x;s,[^/]*$$,,;G;s,\n,,' \
-       `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
+## The need to apply $(transform) is quite tricky, and forces us to
+## go though a $(shell) invocation.
+       $(call am.uninst.cmd,$(%NDIR%dir),$(shell \
+         list='$(%DIR%_PROGRAMS)'; for p in $$list; do echo "$$p"; done | \
+## Remove any leading directory before applying $(transform), but keep
+## the directory part in the hold buffer, in order to reapply it again
+## afterwards in the nobase case.  Append $(EXEEXT).
+           sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+               -e 's/$$/$(EXEEXT)/' \
+?!BASE?                -e 'x;s,[^/]*$$,,;G;s,\n,,' \
+        ))
 endif %?INSTALL%
 
 
diff --git a/lib/am/python.am b/lib/am/python.am
index 2ac22cc..fb5ae50 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -26,24 +26,12 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
+       @$(if $(and $(%NDIR%dir),$(%DIR%_PYTHON)),$(strip \
+          )$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)")
 if %?BASE%
-       @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || 
list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
-       fi; \
-       for p in $$list; do \
-## A file can be in the source directory or the build directory.
-         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
-         if test -f $$b$$p; then \
-## Compute basename of source file.  Unless this is a nobase_ target, we
-## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
-## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
-           $(am__strip_dir) \
-           dlist="$$dlist $$f"; \
-           list2="$$list2 $$b$$p"; \
-         else :; fi; \
-       done; \
+       @test -n "$(%NDIR%dir)" && test -n "$(%DIR%_PYTHON)" || exit 0; \
+       dlist='$(notdir $(%DIR%_PYTHON))'; \
+       list2='$(foreach i,$(%DIR%_PYTHON),$(call am.vpath.rewrite,$i))'; \
        for file in $$list2; do echo $$file; done | $(am__base_list) | \
        while read files; do \
 ## Don't perform translation, since script name is important.
@@ -58,10 +46,6 @@ if %?BASE%
        else :; fi
 else !%?BASE%
        @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
-       fi; \
        $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.
@@ -94,19 +78,12 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PYTHON
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
-?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-       test -n "$$files" || exit 0; \
-       dir='$(DESTDIR)$(%NDIR%dir)'; \
-## Also remove the .pyc and .pyo byte compiled versions.
-       filesc=`echo "$$files" | sed 's|$$|c|'`; \
-       fileso=`echo "$$files" | sed 's|$$|o|'`; \
-       st=0; \
-       for files in "$$files" "$$filesc" "$$fileso"; do \
-         $(am__uninstall_files_from_dir) || st=$$?; \
-       done; \
-       exit $$st
+       $(call am.uninst.cmd,$(%NDIR%dir), \
+         $(foreach i,\
+?BASE?     $(notdir $(%DIR%_PYTHON)), \
+?!BASE?            $(patsubst $(srcdir)/%,%,$(%DIR%_PYTHON)), \
+## Also remove the '.pyc' and '.py'o byte-compiled versions.
+             $(i) $(i)c $(i)o))
 endif %?INSTALL%
 
 
diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am
index 77d3fae..665b343 100644
--- a/lib/am/remake-hdr.am
+++ b/lib/am/remake-hdr.am
@@ -27,7 +27,7 @@
 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
 ## by autoheader.
 if %?FIRST%
-%CONFIG_HIN%: %MAINTAINER-MODE% $(am.remake.configure-deps)
+%CONFIG_HIN%: $(am.remake.configure-deps)
        cd $(top_srcdir) && $(AUTOHEADER)
 ## Whenever $(AUTOHEADER) has run, we must make sure that
 ## ./config.status will rebuild config.h.  The dependency from %STAMP%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 08daeda..4054ba5 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -25,46 +25,24 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @$(NORMAL_INSTALL)
-## Funny invocation because Makefile variable can be empty, leading to
-## a syntax error in sh.
-       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
-       fi; \
-?!BASE?        $(am__nobase_strip_setup); \
-       for p in $$list; do \
-## A file can be in the source directory or the build directory.
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-## A script may or may not exist.
-         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
-       done | \
-## We now have a list of "sourcefile newline (nobase-)target" pairs.
-## Turn that into "sourcefile source_base target_dir xformed_target_base",
-## with newlines being turned into spaces in a second step.
-       sed -e 'p;s,.*/,,;n' \
-?BASE?     -e 'h;s|.*|.|' \
-?!BASE?            -e "s|$$srcdirstrip/||" -e 'h;s|[^/]*$$||; s|^$$|.|' \
-           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
-             if (++n[d] == $(am__install_max)) { \
-               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
-           else { print "f", d "/" $$4, $$1 } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-?!BASE?          case $$type in \
-?!BASE?          d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
-?!BASE?             $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
-?!BASE?          f) \
-            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-            test -z "$$files" || { \
-              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; 
\
-              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit 
$$?; \
-            } \
-?!BASE?          ;; esac \
-       ; done
+       @test -n '$(and $(%DIR%_SCRIPTS),$(%NDIR%dir))' || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       $(foreach i,$(%DIR%_SCRIPTS), \
+         p=$(call am.vpath.rewrite,$i); \
+## If the _SCRIPTS variable has an entry like foo/bar, install it as
+## $(destdir)/bar, not $(destdir)/foo/bar.  The user can make a new dir
+## variable or use a nobase_ target for the latter case.  However in
+## all cases $(transform) applies only to the basename, so we have to
+## strip the directory part.
+         f='$(notdir $i)'; \
+## FIXME: optimize away if $(transform) is a no-op?
+         f=`echo "$$f" | sed '$(transform)'`; \
+## Prepend the directory part if 'nobase_' is used.
+?!BASE?          f='$(patsubst ./%,%,$(dir $i))'/$$f; \
+         echo " $(INSTALL_SCRIPT) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
+         $(INSTALL_SCRIPT) -D "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" \
+           || exit $$?;)
 endif %?INSTALL%
 
 
@@ -76,13 +54,15 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
 uninstall-%DIR%SCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
-?BASE? files=`for p in $$list; do echo "$$p"; done | \
-?BASE?        sed -e 's,.*/,,;$(transform)'`; \
-?!BASE?        $(am__nobase_strip_setup); \
-?!BASE?        files=`$(am__nobase_strip) \
-?!BASE?               -e 'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,'`; \
-       dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
+## The need to apply $(transform) is quite tricky, and forces us to
+## go though a $(shell) invocation.
+       $(call am.uninst.cmd,$(%NDIR%dir),$(shell \
+?BASE?   files='$(notdir $(%DIR%_SCRIPTS))' && \
+?!BASE?          files='$(patsubst $(srcdir)/%,%,$(%DIR%_SCRIPTS))' && \
+         for f in $$files; do echo "$$f"; done | sed -e \
+?BASE?     '$(transform)' \
+?!BASE?            'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,' \
+        ))
 endif %?INSTALL%
 
 
diff --git a/lib/am/tags.am b/lib/am/tags.am
deleted file mode 100644
index c2887d8..0000000
--- a/lib/am/tags.am
+++ /dev/null
@@ -1,179 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-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/>.
-
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-## Handle VPATH correctly.
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-
-## ---- ##
-## ID.  ##
-## ---- ##
-
-ID: $(am__tagged_files)
-       $(am__define_uniq_tagged_files); mkid -fID $$unique
-
-
-## ------ ##
-## TAGS.  ##
-## ------ ##
-
-ETAGS = etags
-.PHONY: TAGS tags
-if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += TAGS
-RECURSIVE_TARGETS += tags-recursive
-tags: tags-recursive
-else !%?SUBDIRS%
-tags: tags-am
-endif !%?SUBDIRS%
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-## We use the positional parameters to build the subdir list with
-## absolute names, without the need to worry about white space in `pwd`.
-       set x; \
-       here=`pwd`; \
-## Exuberant Ctags wants --etags-include,
-## GNU Etags             --include
-## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
-## when no files are supplied, despite any --etags-include option.
-## A workaround is to pass '.' as a file.  This is what $empty_fix is for.
-?SUBDIRS?      if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-?SUBDIRS?        include_option=--etags-include; \
-?SUBDIRS?        empty_fix=.; \
-?SUBDIRS?      else \
-?SUBDIRS?        include_option=--include; \
-?SUBDIRS?        empty_fix=; \
-?SUBDIRS?      fi; \
-?SUBDIRS?      list='$(SUBDIRS)'; for subdir in $$list; do \
-## Do nothing if we're trying to look in '.'.
-?SUBDIRS?        if test "$$subdir" = .; then :; else \
-?SUBDIRS?          test ! -f $$subdir/TAGS || \
-## Note that the = is mandatory for --etags-include.
-?SUBDIRS?            set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-?SUBDIRS?        fi; \
-?SUBDIRS?      done; \
-       $(am__define_uniq_tagged_files); \
-## Remove the 'x' we added first:
-       shift; \
-## Make sure we have something to run etags on.
-       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         if test $$# -gt 0; then \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             "$$@" $$unique; \
-         else \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             $$unique; \
-         fi; \
-       fi
-
-
-## --------------- ##
-## vi-style tags.  ##
-## --------------- ##
-
-CTAGS = ctags
-.PHONY: CTAGS ctags
-if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += CTAGS
-RECURSIVE_TARGETS += ctags-recursive
-ctags: ctags-recursive
-else !%?SUBDIRS%
-ctags: ctags-am
-endif !%?SUBDIRS%
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-       $(am__define_uniq_tagged_files); \
-## Make sure we have something to run ctags on.
-       test -z "$(CTAGS_ARGS)$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$unique
-
-
-## --------------- ##
-## "Global tags".  ##
-## --------------- ##
-
-.PHONY: GTAGS
-GTAGS:
-       here=`cd $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) "$$here"
-
-
-## ------- ##
-## cscope  ##
-## ------- ##
-
-if %?TOPDIR_P%
-CSCOPE = cscope
-.PHONY: cscope clean-cscope
-AM_RECURSIVE_TARGETS += cscope
-cscope: cscope.files
-       test ! -s cscope.files \
-         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files 
$(CSCOPE_ARGS)
-clean-cscope:
-       rm -f cscope.files
-cscope.files: clean-cscope cscopelist
-endif %?TOPDIR_P%
-
-if %?SUBDIRS%
-RECURSIVE_TARGETS += cscopelist-recursive
-cscopelist: cscopelist-recursive
-else !%?SUBDIRS%
-cscopelist: cscopelist-am
-endif !%?SUBDIRS%
-
-cscopelist-am: $(am__tagged_files)
-       list='$(am__tagged_files)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
-
-## ---------- ##
-## Cleaning.  ##
-## ---------- ##
-
-am.clean.dist.f += TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-if %?TOPDIR_P%
-am.clean.dist.f += cscope.out cscope.in.out cscope.po.out cscope.files
-endif %?TOPDIR_P%
diff --git a/lib/am/tags.mk b/lib/am/tags.mk
new file mode 100644
index 0000000..aebd8b6
--- /dev/null
+++ b/lib/am/tags.mk
@@ -0,0 +1,153 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994-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/>.
+
+# Every Makefile must define some sort of TAGS rule.  Otherwise, it
+# would be possible for a top-level "make TAGS" to fail because some
+# subdirectory failed.  Ditto for ctags and cscope.
+.PHONY: tags TAGS ctags CTAGS cscope cscopelist
+
+am.tags.files = \
+  $(call am.memoize,am.tags.files,$(strip \
+    $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) $(am.config-hdr.local.in)))
+
+# Let's see if we have to actually deal with tags creation.
+ifneq ($(or $(am.tags.files),$(ETAGS_ARGS),$(SUBDIRS)),)
+
+# ---------------------------------- #
+#  Tags-related internal variables.  #
+# ---------------------------------- #
+
+# Use $(sort) rather than $(am.util.uniq) here, because the former is
+# faster on long lists, and we don't care about the order of the list
+# anyway.
+am.tags.files.unique = \
+ $(call am.memoize,am.tags.files.unique,$(sort \
+   $(foreach f,$(am.tags.files),$(call am.vpath.rewrite,$f))))
+
+# Option to include other TAGS files in an etags-generated file.
+# Exuberant Ctags wants '--etags-include', GNU Etags wants '--include'.
+am.tags.include-option = \
+ $(call am.memoize,am.tags.include-option,$(strip $(shell \
+   if { $(ETAGS) --etags-include --version; } >/dev/null 2>&1; then \
+     printf '%s\n' --etags-include; \
+   else \
+     printf '%s\n' --include; \
+   fi)))
+
+# TAGS files in $(SUBDIRS) entries (if any) that must be included in
+# the top-level TAGS file.
+am.tags.subfiles = \
+  $(call am.memoize,am.tags.subfiles,$(strip \
+    $(foreach d,$(filter-out .,$(SUBDIRS)),$(wildcard $d/TAGS))))
+
+
+# ---------------------------------- #
+#  ID database (from GNU id-utils).  #
+# ---------------------------------- #
+
+ID: $(am.tags.files)
+       mkid -fID $(am.tags.files.unique)
+am.clean.dist.f += ID
+
+
+# -------------------------------- #
+#  GNU Etags and Exuberant ctags.  #
+# -------------------------------- #
+
+CTAGS = ctags
+ETAGS = etags
+
+ifdef SUBDIRS
+AM_RECURSIVE_TARGETS += TAGS CTAGS
+RECURSIVE_TARGETS += tags-recursive ctags-recursive
+ctags: ctags-recursive
+tags: tags-recursive
+else
+tags: tags-am
+ctags: ctags-am
+endif
+
+TAGS: tags
+CTAGS: ctags
+.PHONY: TAGS tags CTAGS ctags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am.tags.files)
+ifneq ($(or $(ETAGS_ARGS),$(am.tags.subfiles),$(am.tags.files.unique)),)
+       $(ETAGS) \
+         $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+         $(foreach 
f,$(am.tags.subfiles),'$(am.tags.include-option)=$(CURDIR)/$f') \
+         $(am.tags.files.unique)
+endif
+
+ctags-am: $(TAGS_DEPENDENCIES) $(am.tags.files)
+ifneq ($(or $(CTAGS_ARGS),$(am.tags.files.unique)),)
+       $(CTAGS) \
+         $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+         $(am.tags.files.unique)
+endif
+
+am.clean.dist.f += TAGS tags
+
+
+# -------------------- #
+#  GNU "Global tags".  #
+# -------------------- #
+
+.PHONY: GTAGS
+GTAGS:
+       cd $(top_srcdir) && gtags -i $(GTAGS_ARGS) '$(abs_top_builddir)'
+am.clean.dist.f += GTAGS GRTAGS GSYMS
+
+
+# --------- #
+#  Cscope.  #
+# --------- #
+
+ifdef am.conf.is-topdir
+CSCOPE = cscope
+.PHONY: cscope clean-cscope
+AM_RECURSIVE_TARGETS += cscope
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files 
$(CSCOPE_ARGS)
+clean-cscope:
+       rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+am.clean.dist.f += cscope.out cscope.in.out cscope.po.out cscope.files
+endif
+
+ifdef SUBDIRS
+RECURSIVE_TARGETS += cscopelist-recursive
+cscopelist: cscopelist-recursive
+else
+cscopelist: cscopelist-am
+endif
+
+cscopelist-am: $(am.tags.files)
+       list='$(am.tags.files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+endif # Dealing with tags.
diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am
index 2d5789e..79b0e6c 100644
--- a/lib/am/texi-vers.am
+++ b/lib/am/texi-vers.am
@@ -21,7 +21,7 @@ am.dist.common-files += %VTEXI% %STAMPVTI%
 ## triggered.  If you equip this rule with a command, GNU make will
 ## assume %VTEXI% has been rebuild in the current directory and
 ## discard any %VTEXI% file found in a VPATH search.
-%VTEXI%: %MAINTAINER-MODE% %STAMPVTI%
+%VTEXI%: %STAMPVTI%
 
 ## Depend on configure so that version number updates cause a rebuild.
 ## (Not configure.ac, because not all setups define the version number
@@ -41,4 +41,4 @@ am.dist.common-files += %VTEXI% %STAMPVTI%
        @cp %VTEXI% $@
 
 am.clean.mostly.f += %VTI%.tmp
-%MAINTAINER-MODE%am.clean.maint.f += %STAMPVTI% %VTEXI%
+am.clean.maint.f += %STAMPVTI% %VTEXI%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 71c497a..9ad7d39 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -135,26 +135,19 @@ install-html-am: am--install-html
 am--install-html: $(HTMLS)
        @$(NORMAL_INSTALL)
        $(call am__create_installdir,$(htmldir))
-       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         $(am__strip_dir) \
-## This indirection is required to work around a bug of the Solaris 10
-## shell /usr/xpg4/bin/sh.  The description of the bug can be found at
-## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
-## and the report of the original failure can be found at automake
-## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
-         d2=$$d$$p; \
-         if test -d "$$d2"; then \
+       @list=''; \
+       $(if $(and $(HTMLS),$(htmldir)),$(foreach i,$(HTMLS), \
+         p=$(call am.vpath.rewrite,$i); \
+         f=$(notdir $i); \
+         if test -d "$$p"; then \
            echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
            $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
-           echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+           echo " $(INSTALL_DATA) '$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(INSTALL_DATA) "$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
          else \
-           list2="$$list2 $$d2"; \
-         fi; \
-       done; \
-       test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+           list="$$list $$p"; \
+         fi;)) \
+       test -z "$$list" || { echo "$$list" | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
          $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
@@ -240,29 +233,27 @@ if %?LOCAL-TEXIS%
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
-       $(if $(and $(DVIS),$(dvidir)),rm -f $(addprefix 
'$(DESTDIR)$(dvidir)'/,$(notdir $(DVIS))))
+       $(call am.uninst.cmd,$(dvidir),$(notdir $(DVIS)))
 
 uninstall-pdf-am:
        @$(NORMAL_UNINSTALL)
-       $(if $(and $(PDFS),$(pdfdir)),rm -f $(addprefix 
'$(DESTDIR)$(pdfdir)'/,$(notdir $(PDFS))))
+       $(call am.uninst.cmd,$(pdfdir),$(notdir $(PDFS)))
 
 uninstall-ps-am:
        @$(NORMAL_UNINSTALL)
-       $(if $(and $(PSS),$(psdir)),rm -f $(addprefix 
'$(DESTDIR)$(psdir)'/,$(notdir $(PSS))))
+       $(call am.uninst.cmd,$(psdir),$(notdir $(PSS)))
 
 uninstall-html-am:
        @$(NORMAL_UNINSTALL)
 ## The HTML 'files' can be directories actually, hence the '-r'.
-       $(if $(and $(HTMLS),$(htmldir)),rm -rf $(addprefix 
'$(DESTDIR)$(htmldir)'/,$(notdir $(HTMLS))))
+       $(call am.uninst.cmd,$(htmldir),$(notdir $(HTMLS)),-r)
 
 uninstall-info-am:
        @$(PRE_UNINSTALL)
 ## Run two loops here so that we can handle PRE_UNINSTALL and
 ## NORMAL_UNINSTALL correctly.
        @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
-         list='$(INFO_DEPS)'; \
-         for file in $$list; do \
-           relfile=`echo "$$file" | sed 's|^.*/||'`; \
+         list='$(notdir $(INFO_DEPS))'; for relfile in $$list; do \
 ## install-info needs the actual info file.  We use the installed one,
 ## rather than relying on one still being in srcdir or builddir.
 ## However, "make uninstall && make uninstall" should not fail,
@@ -273,14 +264,8 @@ uninstall-info-am:
          done; \
        else :; fi
        @$(NORMAL_UNINSTALL)
-       @list='$(INFO_DEPS)'; \
-       for file in $$list; do \
-         relfile=`echo "$$file" | sed 's|^.*/||'`; \
-         (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then 
\
-            echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile 
$$relfile-[0-9] $$relfile-[0-9][0-9]"; \
-            rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9]; \
-          else :; fi); \
-       done
+       $(call am.uninst.cmd,$(infodir),\
+         $(foreach i,$(notdir $(INFO_DEPS)),$i $i-[0-9] $i-[0-9][0-9]))
 
 endif %?LOCAL-TEXIS%
 
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 5cff9ba..861c1ab 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -14,38 +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/>.
 
-## We want to disable the Yacc rebuild rule when
-##   1. AM_MAINTAINER_MODE is used, and
-##   2. --enable-maintainer-mode is not specified, and
-##   3. parser.c already exist, and
-##   4. parser.y and parser.c are distributed.
-## Point #3 is because "make maintainer-clean" erases parser.c, yet
-## the GNU Coding Standards require that ./configure; make works even
-## after that.
-## Point #4 is because parsers listed in nodist_*_SOURCES are always
-## built on the user's side, so it makes no sense to disable them.
-##
-## Points #1, #2, #3 are solved by unconditionally prefixing the rule
-## with $(am.yacc.maybe-skip) defined below only when needed.
-##
-## Point #4 requires a condition on whether parser.y/parser.c are
-## distributed or not.  We cannot have a generic rule that works in
-## both cases, so we ensure in automake that nodist_ parsers always
-## use non-generic rules.
 if %?FIRST%
-if %?MAINTAINER-MODE%
address@hidden@am.yacc.maybe-skip = test -f $@ ||
-endif %?MAINTAINER-MODE%
 am.yacc.c2h = $(basename $1)$(subst c,h,$(suffix $1))
 endif %?FIRST%
 
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
        %SILENT%$(am.cmd.ensure-target-dir-exists)
-       %VERBOSE% \
-?GENERIC?      $(am.yacc.maybe-skip) \
-?!GENERIC??DIST_SOURCE?        $(am.yacc.maybe-skip) \
-       $(SHELL) $(YLWRAP) $< \
+       %VERBOSE%$(SHELL) $(YLWRAP) $< \
          y.tab.c $@ \
          y.tab.h $(call am.yacc.c2h,$@) \
          y.output $(basename $@).output \
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
deleted file mode 100644
index 62eef9c..0000000
--- a/m4/maintainer.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless 'enable' is passed literally.
-# For symmetry, 'disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&address@hidden: $1])])
-AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
-      am_maintainer_other[ make rules and dependencies not useful
-      (and sometimes confusing) to the casual installer])],
-    [USE_MAINTAINER_MODE=$enableval],
-    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
diff --git a/t/am-xargs-map.sh b/t/am-xargs-map.sh
index e2bbdd0..93c4ef4 100755
--- a/t/am-xargs-map.sh
+++ b/t/am-xargs-map.sh
@@ -23,6 +23,8 @@ am_create_testdir=empty
 # Filter out Automake comments.
 grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
   || fatal_ "fetching makefile fragment headers-vars.am"
+echo 'x-warning = $(warning $1)' >> defn.mk
+echo 'y-warning = $(warning $1 -- $2)' >> defn.mk
 
 sed 's/^[0-9][0-9]*:://' > Makefile << 'END'
 01::include ./defn.mk
@@ -35,10 +37,11 @@ sed 's/^[0-9][0-9]*:://' > Makefile << 'END'
 08::
 09::WARN := no
 10::ifeq ($(WARN),yes)
-11::  $(call am.xargs-map,warning,$(args16))
-12::  $(call am.xargs-map,warning,$(args16) 0 1 2 3)
-13::  $(call am.xargs-map,warning,x y z)
-14::endif
+11::  $(call am.xargs-map,x-warning,$(args16))
+12::  $(call am.xargs-map,x-warning,$(args16) 0 1 2 3)
+13::  $(call am.xargs-map,x-warning,x y z)
+14::  $(call am.xargs-map,y-warning,$(args16) 0 1 2 3,X)
+15::endif
 
 args32 := $(args16) $(args16)
 args64 := $(args32) $(args32)
@@ -48,9 +51,15 @@ test-xargs-map:
        $(call am.xargs-map,bar,$(args16))
 
 args = $(error 'args' should be overridden from the command line)
+more-args = $(error 'more-args' should be overridden from the command line)
+
 foo = @echo $1$(am.chars.newline)
 echo-xargs-map:
        $(call am.xargs-map,foo,$(args))
+
+foo2 = @echo $1$(if $2, -- $2)$(am.chars.newline)
+echo2-xargs-map:
+       $(call am.xargs-map,foo2,$(args),$(more-args))
 END
 
 args1="0 1 2 3 4 5 6 7 8 9"
@@ -64,21 +73,31 @@ test $(grep -c "^Makefile:11: $args4$" stderr) -eq 4
 test $(grep -c "^Makefile:12: $args4$" stderr) -eq 4
 test $(grep -c "^Makefile:12: 0 1 2 3$" stderr) -eq 1
 test $(grep -c "^Makefile:13: x y z$" stderr) -eq 1
-test $(grep -c "^Makefile:" stderr) -eq 10
+test $(grep -c "^Makefile:14: $args4 -- X$" stderr) -eq 4
+test $(grep -c "^Makefile:14: 0 1 2 3 -- X" stderr) -eq 1
+test $(grep -c "^Makefile:" stderr) -eq 15
 
 $MAKE 'test-xargs-map'
 
 check_echo ()
 {
   cat > exp
-  $MAKE --no-print-directory "echo-xargs-map" args="$1" >got \
+  mk="$MAKE --no-print-directory"
+  case $# in
+    1) $mk "echo-xargs-map" args="$1";;
+    2) $mk "echo2-xargs-map" args="$1" more-args="$2";;
+    *) fatal_ "check_echo: incorrect usage";;
+  esac >got \
     || { cat got >&2; exit 1; }
   cat exp && cat got && diff exp got || exit 1
 }
 
-echo "$args1" | check_echo '$(args1)'
-echo "$args2" | check_echo '$(args2)'
-echo "$args4" | check_echo '$(args4)'
+echo "$args1"           | check_echo '$(args1)'
+echo "$args1 -- x"      | check_echo '$(args1)' x
+echo "$args2"           | check_echo '$(args2)'
+echo "$args2 -- no"     | check_echo '$(args2)' '$(WARN)'
+echo "$args4"           | check_echo '$(args4)'
+echo "$args4 -- a b c"  | check_echo '$(args4)' '$(notdir x/a ./b c)'
 
 check_echo '$(args8)'<<END
 $args4
@@ -96,11 +115,22 @@ $args4
 x
 END
 
+check_echo "$args4 $args4 x" '.:.' <<END
+$args4 -- .:.
+$args4 -- .:.
+x -- .:.
+END
+
 check_echo "$args4 01 02 03 04 05 06 07" <<END
 $args4
 01 02 03 04 05 06 07
 END
 
+check_echo "$args4 01 2 03" "+++" <<END
+$args4 -- +++
+01 2 03 -- +++
+END
+
 check_echo '$(args32) 11 12 13 67' <<END
 $args4
 $args4
@@ -113,6 +143,18 @@ $args4
 11 12 13 67
 END
 
+check_echo '$(args32) 11 12 13 67' 'lol cat' <<END
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+$args4 -- lol cat
+11 12 13 67 -- lol cat
+END
+
 check_echo '$(args64)' <<END
 $args4
 $args4
diff --git a/t/condlib.sh b/t/condlib.sh
index 3c88226..ea8e679 100755
--- a/t/condlib.sh
+++ b/t/condlib.sh
@@ -21,7 +21,6 @@
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
-AM_MAINTAINER_MODE
 AM_PROG_AR
 AC_PROG_CC
 END
diff --git a/t/ctags.sh b/t/ctags.sh
new file mode 100755
index 0000000..196cad1
--- /dev/null
+++ b/t/ctags.sh
@@ -0,0 +1,109 @@
+#! /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/>.
+
+# Test vi-style tags.
+
+required=ctags
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_SUBST([CC], [false])
+AM_CONDITIONAL([COND_FALSE], [false])
+AC_CONFIG_FILES([sub1/Makefile
+                 sub3/Makefile
+                 sub2/Makefile
+                 sub2/subsub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub2/subsub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1 sub2 sub3
+test-ctags: ctags
+       test ! -f tags
+       cat sub1/tags
+       cat sub2/tags
+       cat sub2/subsub/tags
+       test ! -f sub3/tags
+       grep 'iguana\.c' sub1/tags
+       grep 'zap_zap' sub1/tags
+       grep 'main' sub1/tags
+       grep 'choke_me' sub1/tags && exit 1; :
+       grep 'subsub/foo\.h' sub2/tags
+       grep 'DUMMY_DUMMY' sub2/tags
+       grep 'bar\.f77' sub2/subsub/tags
+       grep 'foo\.cxx' sub2/subsub/tags
+       grep 'foo\.h' sub2/subsub/tags && exit 1; :
+check-local: test-ctags
+END
+
+cat > sub1/Makefile.am << 'END'
+if COND_FALSE
+bin_PROGRAMS = iguana
+endif
+END
+
+cat > sub1/iguana.c <<'END'
+int main (void) { return zap_zap (0); }
+
+int
+zap_zap (int x)
+{
+  return x + choke_me ();
+}
+END
+
+cat > sub2/Makefile.am << 'END'
+SUBDIRS = subsub .
+noinst_HEADERS = subsub/foo.h
+subsub/foo.h:
+       echo '#define DUMMY_DUMMY 0' >$@
+CLEANFILES = $(noinst_HEADERS)
+END
+
+cat > sub2/subsub/Makefile.am << 'END'
+TAGS_FILES =
+EXTRA_DIST = bar.f77
+TAGS_FILES += bar.f77
+nodist_noinst_DATA = foo.cxx
+TAGS_FILES += foo.cxx
+CLEANFILES = foo.cxx
+foo.cxx:
+       echo "int cxx_func (void) { return 0; }" >$@
+END
+
+cat > sub2/subsub/bar.f77 << 'END'
+      subroutine foobarbaz
+      return
+      end
+END
+
+# No file to tag here, deliberately.
+: > sub3/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -i
+
+./configure
+$MAKE test-ctags
+$MAKE distcheck
+
+$MAKE distclean
+find . -name tags | grep . && exit 1
+
+:
diff --git a/t/dejagnu2.sh b/t/dejagnu2.sh
index 5b75bb6..51f23fb 100755
--- a/t/dejagnu2.sh
+++ b/t/dejagnu2.sh
@@ -31,16 +31,10 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-override
-
-grep 'site\.exp' Makefile.in
-test $(grep -c '^site\.exp:' Makefile.in) -eq 1
+$AUTOMAKE
 
 ./configure
 $MAKE site.exp
 grep ':GREP:ME:' site.exp
 
-AUTOMAKE_fails
-grep '^Makefile\.am:3:.*site\.exp' stderr
-
 :
diff --git a/t/etags.sh b/t/etags.sh
new file mode 100755
index 0000000..c8a6e90
--- /dev/null
+++ b/t/etags.sh
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 1997-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 tags and subdirs work correctly.  Bug report by
+# François Pinard, and later by Akim Demaille.
+
+required=etags
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_SUBST([CC], [false])
+AM_CONDITIONAL([CONF_FALSE], [false])
+AC_CONFIG_FILES([sub1/Makefile])
+AC_CONFIG_FILES([sub2/Makefile])
+AC_CONFIG_FILES([sub2/subsub/Makefile])
+AC_CONFIG_FILES([sub3/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub2/subsub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1 sub2 sub3
+test-tags: tags
+       cat sub1/TAGS
+       cat sub2/TAGS
+       cat sub2/subsub/TAGS
+       test ! -f sub3/TAGS
+       grep 'sub1/TAGS' TAGS
+       grep 'sub2/TAGS' TAGS
+       grep 'sub3/TAGS' TAGS && exit 1; :
+       grep 'iguana\.c' sub1/TAGS
+       grep 'subsub/TAGS' sub2/TAGS
+       grep 'subsub/foo\.h' sub2/TAGS
+       grep 'bar\.baz' sub2/subsub/TAGS
+       grep 'foo\.off' sub2/subsub/TAGS
+       grep 'foo\.h' sub2/subsub/TAGS && exit 1; :
+check-local: test-tags
+END
+
+cat > sub1/Makefile.am << 'END'
+if COND_FALSE
+bin_PROGRAMS = iguana
+endif
+END
+echo 'int main () { return choke_me (); }' > sub1/iguana.c
+
+cat > sub2/Makefile.am << 'END'
+SUBDIRS = subsub .
+noinst_HEADERS = subsub/foo.h
+subsub/foo.h:
+       echo dummy >$@
+CLEANFILES = $(noinst_HEADERS)
+END
+
+cat > sub2/subsub/Makefile.am << 'END'
+EXTRA_DIST = bar.baz
+nodist_noinst_DATA = foo.off
+TAGS_FILES = $(EXTRA_DIST) $(nodist_noinst_DATA)
+MOSTLYCLEANFILES = $(nodist_noinst_DATA)
+foo.off:
+       echo $@ >$@
+END
+: > sub2/subsub/bar.baz
+
+# No file to tag here, deliberately.
+: > sub3/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -i
+
+./configure
+$MAKE test-tags
+$MAKE distcheck
+
+$MAKE distclean
+find . -name TAGS | grep . && exit 1
+
+:
diff --git a/t/flavor.sh b/t/flavor.sh
index 90e0b15..058e55f 100755
--- a/t/flavor.sh
+++ b/t/flavor.sh
@@ -21,7 +21,6 @@
 . ./defs || exit 1
 
 cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
 AC_OUTPUT
 END
 
@@ -38,7 +37,7 @@ $AUTOCONF
 for flavor in --gnits --gnu --foreign --ignore-deps; do
 
   $AUTOMAKE --add-missing $flavor
-  ./configure --enable-maintainer-mode
+  ./configure
   grep " $flavor" Makefile
   $MAKE
 
diff --git a/t/internals.tap b/t/internals.tap
index 31b939c..f4c8a18 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -19,7 +19,7 @@
 am_create_testdir=empty
 . ./defs || exit 1
 
-plan_ 12
+plan_ 13
 
 # Filter out Automake comments.
 grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
@@ -252,4 +252,31 @@ test:
        test -f n3
 END
 
+T 'am.util.file-exists' <<'END'
+prepare:
+       : > 'a'
+       test -f 'a'
+       : > '?'
+       test -f '?'
+       : > 'foo bar'
+       test -f 'foo bar'
+       mkdir 'a  b'
+       test -d 'a  b'
+       : > 'a  b'/'c   d'
+       test -f 'a  b'/'c       d'
+test: prepare
+       test x'$(call am.util.file-exists,.)' = x'yes'
+       test x'$(call am.util.file-exists,Makefile)' = x'yes'
+       test x'$(call am.util.file-exists,.././defn.mk)' = x'yes'
+       test x'$(call am.util.file-exists,none)' = x
+       test x'$(call am.util.file-exists,Makefile oops)' = x
+       test x'$(call am.util.file-exists,foo bar)' = x'yes'
+       test x'$(call am.util.file-exists,a  b)' = x'yes'
+       test x'$(call am.util.file-exists,a  b/c        d)' = x'yes'
+       test x'$(call am.util.file-exists,*)' = x
+       test x'$(call am.util.file-exists,a)' = x'yes'
+       test x'$(call am.util.file-exists,[ab])' = x
+       test x'$(call am.util.file-exists,?)' = x'yes'
+END
+
 :
diff --git a/t/lex-nodist.sh b/t/lex-nodist.sh
index b2f7b29..c04d613 100755
--- a/t/lex-nodist.sh
+++ b/t/lex-nodist.sh
@@ -15,10 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Checks for .c files derived from non-distributed .l sources.
-# The test 'lex-pr204.test' does similar check with AM_MAINTAINER_MODE
-# enabled.
-# The tests 'yacc-nodist.test' and 'yacc-pr204.test' does similar checks
-# for yacc-generated .c and .h files.
+# The test 'yacc-nodist.test' does similar checks for yacc-generated
+# .c and .h files.
 
 required='cc lex'
 . ./defs || exit 1
diff --git a/t/lex-pr204.sh b/t/lex-pr204.sh
deleted file mode 100755
index 535b482..0000000
--- a/t/lex-pr204.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-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/>.
-
-# Related to PR 204.
-# C sources derived from nodist_ lex sources should not be distributed.
-# See also related test 'lex-nodist.test'.
-# The tests 'yacc-nodist.test' and 'yacc-pr204.test' does similar checks
-# for yacc-generated .c and .h files.
-
-required='cc lex'
-. ./defs || exit 1
-
-cat >> configure.ac <<'EOF'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-dnl We use AC_PROG_LEX deliberately.
-dnl Sister 'lex-nodist.test' should use 'AM_PROG_LEX' instead.
-AC_PROG_LEX
-AC_OUTPUT
-EOF
-
-# The LEXER2 intermediate variable is there to make sure Automake
-# matches 'nodist_' against the right variable name...
-cat > Makefile.am << 'EOF'
-EXTRA_PROGRAMS = foo
-LEXER2 = lexer2.l
-nodist_foo_SOURCES = lexer.l $(LEXER2)
-
-distdirtest: distdir
-       test ! -f $(distdir)/lexer.c
-       test ! -f $(distdir)/lexer.l
-       test ! -f $(distdir)/lexer.h
-       test ! -f $(distdir)/lexer2.c
-       test ! -f $(distdir)/lexer2.l
-       test ! -f $(distdir)/lexer2.h
-EOF
-
-cat > lexer.l << 'END'
-%{
-#define YY_NO_UNISTD_H 1
-%}
-%%
-"GOOD"   return EOF;
-.
-%%
-int main (void)
-{
-  return yylex ();
-}
-END
-
-cp lexer.l lexer2.l
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-$MAKE distdirtest
-
-# Make sure lexer.c and lexer2.c are still targets.
-$MAKE lexer.c lexer2.c
-test -f lexer.c
-test -f lexer2.c
-
-# Ensure the rebuild rule works despite AM_MAINTAINER_MODE, because
-# it's a nodist_ lexer.
-$sleep
-touch lexer.l lexer2.l
-$sleep
-$MAKE lexer.c lexer2.c
-is_newest lexer.c lexer.l
-is_newest lexer2.c lexer2.l
-
-:
diff --git a/t/location.sh b/t/location.sh
index dab1e33..424904b 100755
--- a/t/location.sh
+++ b/t/location.sh
@@ -32,7 +32,7 @@ if COND2
   lib_LIBRARIES = libfoo.a
 endif
 if COND1
-  bin_PROGRAMS += ctags
+  bin_PROGRAMS += distdir
 endif
 VAR = 1 \
       2 \
@@ -77,9 +77,9 @@ sed 's/^> //' > expected << 'END'
 > Makefile.am:1:   while processing program 'libfoo.a'
 > library.am: ... 'libfoo.a' previously defined here
 > Makefile.am:3:   while processing library 'libfoo.a'
-> tags.am: warning: redefinition of 'ctags' ...
-> program.am: ... 'ctags$(EXEEXT)' previously defined here
-> Makefile.am:6:   while processing program 'ctags'
+> distdir.am: warning: redefinition of 'distdir' ...
+> program.am: ... 'distdir$(EXEEXT)' previously defined here
+> Makefile.am:6:   while processing program 'distdir'
 END
 
 cat expected
diff --git a/t/maintmode-configure-msg.sh b/t/maintmode-configure-msg.sh
deleted file mode 100755
index ebdf4d7..0000000
--- a/t/maintmode-configure-msg.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-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 our macro 'AM_MAINTAINER_MODE' adds proper text to
-# the configure help screen.  Also make sure the "checking ..." messages
-# related to the enabling/disabling of maintainer mode are correct (see
-# automake bug#9890).
-
-. ./defs || exit 1
-
-set_maintmode ()
-{
-  rm -rf autom4te*.cache # Just to be sure not to use a stale cache.
-  echo "AC_INIT([$me], [1.0])" > configure.ac
-  case $1 in
-    DEFAULT) echo AM_MAINTAINER_MODE;;
-          *) echo "AM_MAINTAINER_MODE([$*])";;
-  esac >> configure.ac
-}
-
-check_configure_message_with ()
-{
-  answer=$1; shift
-  ./configure ${1+"$@"} >stdout || { cat stdout; exit 1; }
-  cat stdout
-  grep "^checking whether to enable maintainer-specific.*\\.\\.\\. $answer$" 
stdout
-  test $(grep -c 'checking.*maint' stdout) -eq 1
-}
-
-set_maintmode "DEFAULT"
-
-$ACLOCAL
-
-$AUTOCONF --force
-
-grep_configure_help --enable-maintainer-mode 'enable make rules'
-
-check_configure_message_with "no"
-check_configure_message_with "yes" --enable-maintainer-mode
-
-set_maintmode "disable"
-
-$AUTOCONF --force
-grep_configure_help --enable-maintainer-mode 'enable make rules'
-
-check_configure_message_with "no"
-check_configure_message_with "yes" --enable-maintainer-mode
-
-set_maintmode "enable"
-
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; exit 1; }
-cat stdout
-grep_configure_help --disable-maintainer-mode 'disable make rules'
-
-check_configure_message_with "yes"
-check_configure_message_with "no" --disable-maintainer-mode
-
-:
diff --git a/t/mmode.sh b/t/mmode.sh
deleted file mode 100755
index 23cb646..0000000
--- a/t/mmode.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-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/>.
-
-# Check for AM_MAINTAINER_MODE defaults.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-: >Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-grep '^MAINT.*#' Makefile
-
-./configure --disable-maintainer-mode
-grep '^MAINT.*#' Makefile
-
-./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && exit 1
-
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.ac > configure.int
-mv -f configure.int configure.ac
-mv configure configure1
-$AUTOCONF --force
-diff configure configure1
-
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.ac > configure.int
-mv -f configure.int configure.ac
-$AUTOCONF --force
-
-./configure
-grep '^MAINT.*#' Makefile && exit 1
-
-./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && exit 1
-
-./configure --disable-maintainer-mode
-grep '^MAINT.*#' Makefile
-
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.ac > configure.int
-mv -f configure.int configure.ac
-$AUTOCONF --force -Werror && exit 1
-
-:
diff --git a/t/mmodely.sh b/t/mmodely.sh
deleted file mode 100755
index 0ece11f..0000000
--- a/t/mmodely.sh
+++ /dev/null
@@ -1,95 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2004-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/>.
-
-# Verify that intermediate files are only built from Yacc and Lex
-# sources in maintainer mode.
-# From Derek R. Price.
-
-required=cc
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AM_PROG_LEX
-AC_PROG_YACC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-YACC = false
-LEX = false
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y joe.l
-LDADD = @LEXLIB@
-END
-
-# The point of this test is that it is not dependent on a working lex
-# or yacc.
-cat > joe.c <<EOF
-int joe (int arg)
-{
-    return arg * 2;
-}
-EOF
-# On systems which link in libraries non-lazily and whose linkers
-# complain about unresolved symbols by default, such as Solaris, an
-# yylex function needs to be defined to avoid an error due to an
-# unresolved symbol.
-cat > zardoz.c <<EOF
-int joe (int arg);
-int yylex (void)
-{
-    return 0;
-}
-int main (int argc, char **argv)
-{
-    return joe (argc);
-}
-EOF
-
-# Ensure a later timestamp for our Lex & Yacc sources.
-$sleep
-: > joe.l
-: > zardoz.y
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-$MAKE
-
-cat >myyacc.sh <<'END'
-#! /bin/sh
-echo "$@" >y.tab.c
-END
-cat >mylex.sh <<'END'
-echo "$@" >lex.yy.c
-END
-chmod +x myyacc.sh mylex.sh
-PATH=$(pwd)$PATH_SEPARATOR$PATH; export PATH
-
-# "make maintainer-clean; ./configure; make" should always work,
-# per GNU Standard.
-$MAKE maintainer-clean
-./configure
-$MAKE zardoz.c joe.c YACC="myyacc.sh" LEX="mylex.sh" \
-                     LEX_OUTPUT_ROOT='lex.yy'
-$FGREP zardoz.y zardoz.c
-$FGREP joe.l joe.c
-
-:
diff --git a/t/remake5.sh b/t/remake5.sh
deleted file mode 100755
index 1383d0d..0000000
--- a/t/remake5.sh
+++ /dev/null
@@ -1,74 +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/>.
-
-# Check that AM_MAINTAINER_MODE disable some rebuild rules,
-# but not all.
-# Report from Ralf Corsepius.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<'EOF'
-AM_MAINTAINER_MODE
-m4_include([foo.m4])
-if test ! -f rebuild_ok; then
-  ACLOCAL=false
-  AUTOMAKE=false
-  AUTOCONF=false
-fi
-AC_OUTPUT
-EOF
-
-: > foo.m4
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-./configure
-$MAKE
-
-# Make sure the rules to rebuild configure/Makefile.in are not
-# triggered by default.  ($MAKE will fail if they are, because the
-# tools are set to false.)
-$sleep
-touch aclocal.m4 Makefile.am configure.ac foo.m4
-$MAKE
-
-# Make sure the rebuild rule for Makefile is triggered.
-$sleep
-echo '# GrEpMe' >>Makefile.in
-$MAKE
-grep GrEpMe Makefile
-
-# Make sure the rebuild rule for config.status is triggered.
-$sleep
-grep 'AUTOCONF.*=.*false' Makefile
-: > rebuild_ok
-./configure --no-create
-$MAKE
-grep 'AUTOCONF.*=.*false' Makefile && exit 1
-
-# Make sure rebuild rules do work if --enable-maintainer-mode is given.
-./configure --enable-maintainer-mode
-$sleep
-echo 'AC_SUBST([YIPPY_YIPPY_YEAH])' >foo.m4
-$MAKE
-grep YIPPY_YIPPY_YEAH Makefile
-
-# Try the distribution, for completeness.
-$MAKE distcheck
-
-:
diff --git a/t/tags.sh b/t/tags-id.sh
similarity index 78%
rename from t/tags.sh
rename to t/tags-id.sh
index 8f38e6b..9032125 100755
--- a/t/tags.sh
+++ b/t/tags-id.sh
@@ -17,13 +17,30 @@
 # Test for bug reported by Harlan Stenn: the tags target doesn't work
 # when there are only headers in a directory.
 
+required=mkid
 . ./defs || exit 1
 
+echo AC_OUTPUT >> configure.ac
+
 cat > Makefile.am << 'END'
 noinst_HEADERS = iguana.h
+test-id: ID
+       test -f $(srcdir)/iguana.h
+       test -f ID
+check-local: test-id
+END
+
+cat > iguana.h << 'END'
+#define FOO "bar"
+int zap (int x, char y);
 END
 
 $ACLOCAL
+$AUTOCONF
 $AUTOMAKE
 
-grep '^ID:' Makefile.in
+./configure
+$MAKE test-id
+$MAKE distcheck
+
+:
diff --git a/t/tags2.sh b/t/tags2.sh
deleted file mode 100755
index 521d2ef..0000000
--- a/t/tags2.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-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/>.
-
-# TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
-# sources) exist.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat >Makefile.am << 'END'
-TAGS_DEPENDENCIES = foo
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'define.*TAGS_DEPENDENCIES.*without' stderr
-
-cat >>Makefile.am << 'END'
-bin_PROGRAMS = bar
-END
-
-AUTOMAKE_run
-grep 'define.*TAGS_DEPENDENCIES.*without' stderr && exit 1
-
-:
diff --git a/t/tagsub.sh b/t/tagsub.sh
deleted file mode 100755
index 9103805..0000000
--- a/t/tagsub.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1997-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 tags and subdirs work correctly.  Bug report by
-# François Pinard, and later by Akim Demaille.
-
-required=etags
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-echo 'SUBDIRS = sub' > Makefile.am
-mkdir sub
-echo 'noinst_HEADERS = iguana.h' > sub/Makefile.am
-: > sub/iguana.h
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE tags
-test -f sub/TAGS
-test -f TAGS
-$FGREP sub/TAGS TAGS
-$FGREP iguana.h sub/TAGS
-
-$MAKE distclean
-test ! -e sub/TAGS
-test ! -e TAGS
-
-:
diff --git a/t/targetclash.sh b/t/targetclash.sh
index 031cbc1..9c71007 100755
--- a/t/targetclash.sh
+++ b/t/targetclash.sh
@@ -23,11 +23,11 @@ AC_PROG_CC
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = ctags
+bin_PROGRAMS = distdir
 END
 
 $ACLOCAL
 AUTOMAKE_fails -a
-grep 'redefinition.*ctags' stderr
+grep 'redefinition.*distdir' stderr
 
 :
diff --git a/t/triplet.sh b/t/triplet.sh
new file mode 100755
index 0000000..f2796c3
--- /dev/null
+++ b/t/triplet.sh
@@ -0,0 +1,73 @@
+#! /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/>.
+
+# The $(host), $(build), $(target) variables, and their '*_alias'
+# and 'am.conf.*-triplet' counterparts.
+
+. ./defs || exit 1
+
+: > config.guess
+: > config.sub
+: > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+grep "^am\.conf\.host-triplet = *$" Makefile.in
+grep "^am\.conf\.build-triplet = *$" Makefile.in
+grep "^am\.conf\.target-triplet = *$" Makefile.in
+
+mv -f configure.ac configure.tmpl
+
+for M in HOST BUILD TARGET; do
+  m=$(echo $M | LC_ALL=C tr '[A-Z]' '[a-z]')
+  (cat configure.tmpl && echo AC_CANONICAL_$M) > configure.ac
+  rm -rf autom4te.cache
+  $AUTOMAKE
+  grep "^$m = @address@hidden" Makefile.in
+  grep "^${m}_alias = @address@hidden" Makefile.in
+  grep "^am\\.conf\\.${m}-triplet = \\\$(${m})$" Makefile.in
+  case $m in
+    build)
+      grep '^am\.conf\.host-triplet = *$' Makefile.in
+      grep '^am\.conf\.target-triplet = *$' Makefile.in
+      ;;
+    host)
+      grep '^am\.conf\.build-triplet = $(build)$' Makefile.in
+      grep '^am\.conf\.target-triplet = *$' Makefile.in
+      ;;
+    target)
+      grep '^am\.conf\.build-triplet = $(build)$' Makefile.in
+      grep '^am\.conf\.target-triplet = $(target)$' Makefile.in
+      ;;
+  esac
+done
+
+rm -rf autom4te.cache
+
+cat configure.tmpl - >configure.ac <<'END'
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+AC_CANONICAL_TARGET
+END
+
+$AUTOMAKE
+for m in host build target; do
+  grep "^$m = @address@hidden" Makefile.in
+  grep "^${m}_alias = @address@hidden" Makefile.in
+  grep "^am\.conf\.${m}-triplet = \$(${m})$" Makefile.in
+done
+
+:
diff --git a/t/yacc-nodist.sh b/t/yacc-nodist.sh
index 14fa0a7..4209ec1 100755
--- a/t/yacc-nodist.sh
+++ b/t/yacc-nodist.sh
@@ -15,10 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Checks for .c and .h files derived from non-distributed yacc sources.
-# The test 'yacc-pr204.test' does similar check with AM_MAINTAINER_MODE
-# enabled.
-# The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
-# for lex-generated .c files.
+# The test 'lex-nodist.test' does similar checks for lex-generated .c
+# files.
 
 required='cc yacc'
 . ./defs || exit 1
diff --git a/t/yacc-pr204.sh b/t/yacc-pr204.sh
deleted file mode 100755
index 44b73b3..0000000
--- a/t/yacc-pr204.sh
+++ /dev/null
@@ -1,83 +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/>.
-
-# For PR 204.
-# C sources derived from nodist_ yacc sources should not be distributed.
-# See also related test 'yacc-nodist.test'.
-# The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
-# for lex-generated C files.
-
-required='cc yacc'
-. ./defs || exit 1
-
-cat >> configure.ac <<'EOF'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_PROG_YACC
-AC_OUTPUT
-EOF
-
-# The PARSE2 intermediate variable is there to make
-# sure Automake match 'nodist_' against the right
-# variable name...
-cat > Makefile.am << 'EOF'
-AM_YFLAGS = -d
-EXTRA_PROGRAMS = foo
-PARSE2 = parse2.y
-nodist_foo_SOURCES = parse.y $(PARSE2)
-
-distdirtest: distdir
-       test ! -f $(distdir)/parse.c
-       test ! -f $(distdir)/parse.y
-       test ! -f $(distdir)/parse.h
-       test ! -f $(distdir)/parse2.c
-       test ! -f $(distdir)/parse2.y
-       test ! -f $(distdir)/parse2.h
-EOF
-
-cat > parse.y << 'END'
-%{
-int yylex () {return 0;}
-void yyerror (char *s) {}
-%}
-%%
-maude : 'm' 'a' 'u' 'd' 'e' {};
-END
-
-cp parse.y parse2.y
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-$MAKE distdirtest
-
-# Make sure parse.c and parse2.c are still targets.
-$MAKE parse.c parse2.c
-test -f parse.c
-test -f parse2.c
-
-# Ensure the rebuild rule works despite AM_MAINTAINER_MODE, because
-# it's a nodist_ parser.
-$sleep
-touch parse.y parse2.y
-$sleep
-$MAKE parse.c parse2.c
-is_newest parse.c parse.y
-is_newest parse2.c parse2.y
-
-:


hooks/post-receive
-- 
GNU Automake



reply via email to

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