automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-587-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-587-g5f335be
Date: Thu, 22 Dec 2011 20:37:55 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=5f335bed3e033246f23c61c130578c9c01ab74bb

The branch, maint has been updated
       via  5f335bed3e033246f23c61c130578c9c01ab74bb (commit)
       via  f75e3bf59e5c117a4159e523fcc9a837fe278618 (commit)
       via  4c6598062ee2f7e78da86ea6332cfd3847ac221e (commit)
       via  d3e03785dcf45cd002b8671e8024ffb6444bb384 (commit)
       via  01c5ee33ccd34bef24b6d4cab8fd431dd3c4473c (commit)
       via  9f7864ba9b8a12761db67c16025c45ed95aca47e (commit)
      from  b7d67d5551bc9d6dac34deda5f82e9292a2cdbb5 (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 5f335bed3e033246f23c61c130578c9c01ab74bb
Author: Stefano Lattarini <address@hidden>
Date:   Sat Nov 13 12:21:28 2010 +0100

    regex: deprecate the obsolete macro AM_WITH_REGEX
    
    This is a backport of commit v1.11-433-g37b0aee.
    
    Today, practically nobody uses the GNU rx library, which, according
    to its own website <http://www.gnu.org/software/rx/rx.html>, has
    been "decommissioned".  Consequently, the automake-provided macro
    AM_WITH_REGEX is not used nor required anymore.  Deprecate it, so
    that it will be possible to safely remove it in the next major
    automake version.
    
    * m4/regex.m4 (AM_WITH_REGEX): Give a warning of the class
    `obsolete' when this macro is used.
    * doc/automake.texi (Public Macros): Move description of
    `AM_WITH_REGEX' from here ...
    (Obsolete Macros): ... to here, and declare it as obsolete
    and "to be removed in a future version".
    * tests/regex-obsolete.test: New test.
    * tests/Makefile.am (TESTS): Add it.
    * NEWS: Update.
    
    See also:
    <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00131.html>

commit f75e3bf59e5c117a4159e523fcc9a837fe278618
Author: Stefano Lattarini <address@hidden>
Date:   Thu Dec 22 19:51:52 2011 +0100

    maint: distribute .xz tarballs, not .bz2 ones
    
    Many GNU packages are moving towards xz-compressed tarballs, so
    let's follow suit, by dropping the creation and distribution of
    a bzip2-compressed tarball and switching to xz instead.
    For compatibility and safeness, we will continue to create and
    distribute a gzip-compressed tarball as well.
    
    * configure.ac (AM_INIT_AUTOMAKE): Drop `dist-bzip2', add
    `dist-xz'.
    * NEWS: Update.
    
    Suggested by Jim Meyering.

commit 4c6598062ee2f7e78da86ea6332cfd3847ac221e
Merge: d3e0378 9f7864b
Author: Stefano Lattarini <address@hidden>
Date:   Thu Dec 22 19:20:46 2011 +0100

    Merge branch 'pr9768-fix' into maint
    
    * pr9768-fix:
      include: avoid "deleted .am file" problem

commit d3e03785dcf45cd002b8671e8024ffb6444bb384
Author: Stefano Lattarini <address@hidden>
Date:   Thu Dec 22 19:16:48 2011 +0100

    maint: better use of autoconf 2.68 features
    
    * configure.ac: Now that Automake requires autoconf 2.68 for its
    own bootstrapping and build system, we can assume that PACKAGE_URL
    gets automatically AC_SUBT'd.

commit 01c5ee33ccd34bef24b6d4cab8fd431dd3c4473c
Author: Stefano Lattarini <address@hidden>
Date:   Thu Dec 22 19:05:32 2011 +0100

    cosmetics: use proper m4 quoting in configure.ac
    
    * configure.ac (AC_CONFIG_SRCDIR): Use proper m4 quoting
    for its arguments.
    (AC_CONFIG_AUX_DIR): Likewise.
    (AC_PROG_PATH): Likewise.

commit 9f7864ba9b8a12761db67c16025c45ed95aca47e
Author: Stefano Lattarini <address@hidden>
Date:   Sun Oct 16 14:57:37 2011 +0200

    include: avoid "deleted .am file" problem
    
    * automake.in (handle_configure): When processing `configure.am',
    also expand `HAVE-MAKEFILE-IN-DEPS' to a boolean telling whether
    `MAKEFILE-IN-DEPS' is empty or not.
    * lib/am/configure.am [?HAVE-MAKEFILE-IN-DEPS?]
    (%MAKEFILE-IN-DEPS%): New target without dependencies, to
    avoid the "deleted .am file" problem.  Emit this only when
    `?HAVE-MAKEFILE-IN-DEPS?' is true, to avoid generating an
    "empty" dependency declaration.
    * tests/deleted-am.test: Make grepping of error message stricter.
    * tests/dist-missing-am.test: Likewise.
    * tests/remake-deleted-am.test: New test.
    * tests/remake-deleted-am-2.test: Likewise.
    * tests/remake-deleted-am-subdir.test: Likewise.
    * tests/remake-renamed-am.test: Likewise.
    * tests/makefile-deps.test: Likewise.
    * tests/Makefile.am (TESTS): Add the new tests.
    * NEWS: Update.
    
    Fixes automake bug#9768.
    
    Report by Peter Johansson.
    
    See also commit `Release-1-10-40-gd0ebf71', which fixed a similar
    problem for .m4 files included by configure.ac.

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

Summary of changes:
 ChangeLog                                          |   75 +++++++++++++++++++
 NEWS                                               |   11 +++
 automake.in                                        |    1 +
 configure.ac                                       |   11 +--
 doc/automake.texi                                  |   28 ++++---
 lib/am/configure.am                                |    3 +
 m4/regex.m4                                        |   13 ++-
 tests/Makefile.am                                  |    6 ++
 tests/deleted-am.test                              |   18 ++---
 tests/dist-missing-am.test                         |    8 +-
 tests/{confvar.test => makefile-deps.test}         |   11 +--
 tests/{regex.test => regex-obsolete.test}          |   12 ++-
 tests/remake-deleted-am-2.test                     |   77 +++++++++++++++++++
 tests/remake-deleted-am-subdir.test                |   79 ++++++++++++++++++++
 tests/remake-deleted-am.test                       |   69 +++++++++++++++++
 ...{distcheck-hook.test => remake-renamed-am.test} |   49 +++++++-----
 16 files changed, 396 insertions(+), 75 deletions(-)
 copy tests/{confvar.test => makefile-deps.test} (76%)
 copy tests/{regex.test => regex-obsolete.test} (73%)
 create mode 100755 tests/remake-deleted-am-2.test
 create mode 100755 tests/remake-deleted-am-subdir.test
 create mode 100755 tests/remake-deleted-am.test
 copy tests/{distcheck-hook.test => remake-renamed-am.test} (54%)

diff --git a/ChangeLog b/ChangeLog
index d97d461..6255aa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,78 @@
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       regex: deprecate the obsolete macro AM_WITH_REGEX
+       This is a backport of commit v1.11-433-g37b0aee.
+       Today, practically nobody uses the GNU rx library, which, according
+       to its own website <http://www.gnu.org/software/rx/rx.html>, has
+       been "decommissioned".  Consequently, the automake-provided macro
+       AM_WITH_REGEX is not used nor required anymore.  Deprecate it, so
+       that it will be possible to safely remove it in the next major
+       automake version.
+       * m4/regex.m4 (AM_WITH_REGEX): Give a warning of the class
+       `obsolete' when this macro is used.
+       * doc/automake.texi (Public Macros): Move description of
+       `AM_WITH_REGEX' from here ...
+       (Obsolete Macros): ... to here, and declare it as obsolete
+       and "to be removed in a future version".
+       * tests/regex-obsolete.test: New test.
+       * tests/Makefile.am (TESTS): Add it.
+       * NEWS: Update.
+       See also:
+       
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00131.html>
+
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       maint: distribute .xz tarballs, not .bz2 ones
+       Many GNU packages are moving towards xz-compressed tarballs, so
+       let's follow suit, by dropping the creation and distribution of
+       a bzip2-compressed tarball and switching to xz instead.
+       For compatibility and safeness, we will continue to create and
+       distribute a gzip-compressed tarball as well.
+       * configure.ac (AM_INIT_AUTOMAKE): Drop `dist-bzip2', add
+       `dist-xz'.
+       * NEWS: Update
+       Suggested by Jim Meyering.
+
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       include: avoid "deleted .am file" problem
+       * automake.in (handle_configure): When processing `configure.am',
+       also expand `HAVE-MAKEFILE-IN-DEPS' to a boolean telling whether
+       `MAKEFILE-IN-DEPS' is empty or not.
+       * lib/am/configure.am [?HAVE-MAKEFILE-IN-DEPS?]
+       (%MAKEFILE-IN-DEPS%): New target without dependencies, to
+       avoid the "deleted .am file" problem.  Emit this only when
+       `?HAVE-MAKEFILE-IN-DEPS?' is true, to avoid generating an
+       "empty" dependency declaration.
+       * tests/deleted-am.test: Make grepping of error message stricter.
+       * tests/dist-missing-am.test: Likewise.
+       * tests/remake-deleted-am.test: New test.
+       * tests/remake-deleted-am-2.test: Likewise.
+       * tests/remake-deleted-am-subdir.test: Likewise.
+       * tests/remake-renamed-am.test: Likewise.
+       * tests/makefile-deps.test: Likewise.
+       * tests/Makefile.am (TESTS): Add the new tests.
+       * NEWS: Update.
+       Fixes automake bug#9768.
+       Report by Peter Johansson.
+       See also commit `Release-1-10-40-gd0ebf71', which fixed a similar
+       problem for .m4 files included by configure.ac.
+
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       maint: better use of autoconf 2.68 features
+       * configure.ac: Now that Automake requires autoconf 2.68 for its
+       own bootstrapping and build system, we can assume that PACKAGE_URL
+       gets automatically AC_SUBT'd.
+
+2011-12-22  Stefano Lattarini  <address@hidden>
+
+       cosmetics: use proper m4 quoting in configure.ac
+       * configure.ac (AC_CONFIG_SRCDIR): Use proper m4 quoting
+       for its arguments.
+       (AC_CONFIG_AUX_DIR): Likewise.
+       (AC_PROG_PATH): Likewise.
+
 2011-12-14  Stefano Lattarini  <address@hidden>
 
        tests: better handling of gettext and libtool requirements
diff --git a/NEWS b/NEWS
index 785d6b0..db448a9 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,10 @@ New in 1.11.0a:
     search path are looked up is probably going to be changed in the
     next Automake release (1.12).
 
+  - The obsolescent AM_WITH_REGEX  macro has been deprecated (since the
+    GNU rx library has been decommissioned), and will be removed in the
+    next major Automake release (1.12).
+
 * Changes to aclocal:
 
   - The `--acdir' option is deprecated.  Now you should use the new options
@@ -24,6 +28,9 @@ New in 1.11.0a:
 
 * Miscellaneous changes:
 
+  - Automake is now distributed as a gzip-compressed and an xz-compressed
+    tarball.  Previously, bzip2 was used instead of xz.
+
   - The last relics of Python 1.5 support have been removed from the
     AM_PATH_PYTHON macro.
 
@@ -82,6 +89,10 @@ Bugs fixed in 1.11.0a:
 
 * Long-standing bugs:
 
+  - The "deleted header file problem" for *.am files is avoided by stub
+    rules.  This allows `make' to trigger a rerun of `automake' also if
+    some previously needed `.am' file has been removed.
+
   - "make distcheck" now correctly complains also when "make uninstall"
     leaves one and only one file installed in $(prefix).
 
diff --git a/automake.in b/automake.in
index db7f3c6..309eade 100644
--- a/automake.in
+++ b/automake.in
@@ -4249,6 +4249,7 @@ sub handle_configure ($$$@)
      'MAKEFILE-DEPS'       => "@rewritten",
      'CONFIG-MAKEFILE'     => ($relative_dir eq '.') ? '$@' : '$(subdir)/$@',
      'MAKEFILE-IN'         => $rel_makefile_in,
+     'HAVE-MAKEFILE-IN-DEPS' => (@include_stack > 0),
      'MAKEFILE-IN-DEPS'    => "@include_stack",
      'MAKEFILE-AM'         => $rel_makefile_am,
      'AUTOMAKE-OPTIONS'    => $automake_options,
diff --git a/configure.ac b/configure.ac
index 334fc4d..1ae68c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,11 +20,8 @@
 AC_PREREQ([2.68])
 AC_INIT([GNU Automake], [1.11.0a], address@hidden)
 
-m4_ifndef([AC_PACKAGE_URL],
-         [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])])
-
-AC_CONFIG_SRCDIR(automake.in)
-AC_CONFIG_AUX_DIR(lib)
+AC_CONFIG_SRCDIR([automake.in])
+AC_CONFIG_AUX_DIR([lib])
 
 AC_CANONICAL_BUILD
 
@@ -38,7 +35,7 @@ AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
 AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 
-AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests 
parallel-tests])
+AM_INIT_AUTOMAKE([1.10a dist-xz filename-length-max=99 color-tests 
parallel-tests])
 
 # The API version is the base version.  We must guarantee
 # compatibility for all releases with the same API version.
@@ -58,7 +55,7 @@ AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
 ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" 
--acdir=m4 -I m4"
 AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" 
--libdir=lib"
 
-AC_PATH_PROG(PERL, perl)
+AC_PATH_PROG([PERL], [perl])
 if test -z "$PERL"; then
    AC_MSG_ERROR([perl not found])
 fi
diff --git a/doc/automake.texi b/doc/automake.texi
index a5f857d..ced1b72 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4037,19 +4037,6 @@ Add support for the @uref{http://dmalloc.com/, Dmalloc 
package}.  If
 the user runs @command{configure} with @option{--with-dmalloc}, then
 define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
 
address@hidden AM_WITH_REGEX
address@hidden AM_WITH_REGEX
address@hidden WITH_REGEX
address@hidden --with-regex
address@hidden regex package
address@hidden rx package
-Adds @option{--with-regex} to the @command{configure} command line.  If
-specified (the default), then the @samp{regex} regular expression
-library is used, @file{regex.o} is put into @code{LIBOBJS}, and
address@hidden is defined.  If @option{--without-regex} is given, then
-the @code{rx} regular expression library is used, and @file{rx.o} is put
-into @code{LIBOBJS}.
-
 @end table
 
 
@@ -4127,6 +4114,21 @@ system.  If so, set the shell variable 
@code{am_cv_sys_posix_termios} to
 @samp{yes}.  If not, set the variable to @samp{no}.  This macro is obsolete,
 you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
 
address@hidden AM_WITH_REGEX
address@hidden AM_WITH_REGEX
address@hidden WITH_REGEX
address@hidden --with-regex
address@hidden regex package
address@hidden rx package
+Adds @option{--with-regex} to the @command{configure} command line.  If
+specified (the default), then the @samp{regex} regular expression
+library is used, @file{regex.o} is put into @code{LIBOBJS}, and
address@hidden is defined.  If @option{--without-regex} is given, then
+the @samp{rx} regular expression library is used, and @file{rx.o} is put
+into @code{LIBOBJS}.  This macro is obsolete now (since @samp{rx} doesn't
+seem to be maintained), and @emph{will be removed the next major version
+of Automake}.  Consider using gnulib if you need regex functionality.
+
 @end table
 
 
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 594ec67..cadb27c 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -83,6 +83,9 @@ endif %?TOPDIR_P%
            cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% 
$(am__depfiles_maybe);; \
        esac;
 
+## Avoid the "deleted header file" problem for the dependencies.
+?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
+
 DIST_COMMON += %MAKEFILE-AM%
 
 
diff --git a/m4/regex.m4 b/m4/regex.m4
index c05bb38..9355840 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,18 +1,22 @@
 ## --------------------------------- ##                     -*- Autoconf -*-
 ## Check if --with-regex was given.  ##
 ## --------------------------------- ##
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2010, 2011 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.
 
-# serial 7
+# serial 10
 
 # AM_WITH_REGEX
 # -------------
 #
+# THIS MACRO IS OBSOLETE now, since rx doesn't seem to be maintained,
+# while regex is.  This macro should be removed in the next major
+# automake version (1.12).
+#
 # The idea is to distribute rx.[hc] and regex.[hc] together, for a
 # while.  The WITH_REGEX symbol is used to decide which of regex.h or
 # rx.h should be included in the application.  If `./configure
@@ -23,10 +27,9 @@
 # package will use the system's rx which, on Linux at least, will
 # result in a smaller executable file.
 #
-# FIXME: This macro seems quite obsolete now since rx doesn't seem to
-# be maintained, while regex is.
 AC_DEFUN([AM_WITH_REGEX],
 [AC_PREREQ(2.50)dnl
+m4_warn([obsolete], [$0 is obsolete, since GNU rx is unmantained now])dnl
 AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])dnl
 AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
 AC_ARG_WITH([regex],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b2a61ec..5ac0e48 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -555,6 +555,7 @@ maintclean.test \
 maintclean-vpath.test \
 maintmode-configure-msg.test \
 make.test \
+makefile-deps.test \
 makej.test \
 makej2.test \
 maken.test \
@@ -730,8 +731,13 @@ remake-subdir2.test \
 remake-subdir-long-time.test \
 remake-am-pr10111.test \
 remake-m4-pr10111.test \
+remake-deleted-am.test \
+remake-deleted-am-2.test \
+remake-deleted-am-subdir.test \
+remake-renamed-am.test \
 pr8365-remake-timing.test \
 regex.test \
+regex-obsolete.test \
 req.test \
 reqd.test \
 reqd2.test \
diff --git a/tests/deleted-am.test b/tests/deleted-am.test
index cc82e79..fa41e9e 100755
--- a/tests/deleted-am.test
+++ b/tests/deleted-am.test
@@ -39,12 +39,9 @@ $MAKE
 rm -f zardoz.am
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
-# FIXME: enable this stricter grepping, once bug#9768 has been taken
-# FIXME: care of.
-## This error will come from automake, not make, so we can be stricter
-## in our grepping of it.
-# grep 'cannot open.*zardoz\.am' output
-grep 'zardoz\.am' output
+# This error will come from automake, not make, so we can be stricter
+# in our grepping of it.
+grep 'cannot open.*zardoz\.am' output
 grep 'foobar\.am' output && Exit 1 # No spurious error, please.
 
 # Try  with one less indirection.
@@ -55,11 +52,8 @@ $MAKE # Sanity check.
 rm -f foobar.am
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
-# FIXME: enable this stricter grepping, once bug#9768 has been taken
-# FIXME: care of.
-## This error will come from automake, not make, so we can be stricter
-## in our grepping of it.
-# grep 'cannot open.*foobar\.am' output
-grep 'foobar\.am' output
+# This error will come from automake, not make, so we can be stricter
+# in our grepping of it.
+grep 'cannot open.*foobar\.am' output
 
 :
diff --git a/tests/dist-missing-am.test b/tests/dist-missing-am.test
index 49e82aa..bb404bc 100755
--- a/tests/dist-missing-am.test
+++ b/tests/dist-missing-am.test
@@ -58,11 +58,9 @@ for vpath in false :; do
   fi
   $MAKE >output 2>&1 && { cat output; Exit 1; }
   cat output
-# FIXME: enable this stricter grepping, once bug#9768 has been taken
-# FIXME: care of.
-#  # This error comes from automake, not make, so we can be stricter
-#  # in our grepping of it.
-#  grep 'cannot open.*zardoz\.am' output
+  # This error comes from automake, not make, so we can be stricter
+  # in our grepping of it.
+  grep 'cannot open.*zardoz\.am' output
   grep 'foobar\.am' output && Exit 1 # No spurious error, please.
   cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
 done
diff --git a/tests/confvar.test b/tests/makefile-deps.test
similarity index 76%
copy from tests/confvar.test
copy to tests/makefile-deps.test
index 13cc7dd..819c7d3 100755
--- a/tests/confvar.test
+++ b/tests/makefile-deps.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,21 +14,18 @@
 # 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 configure_vars stuff works.
+# Make sure we don't emit a rule with empty target if list of
+# automatically-computed dependencies for Makefile.in is empty.
 
 . ./defs || Exit 1
 
 set -e
 
-cat >> configure.in << 'END'
-AC_SUBST([QBERT])
-END
-
 : > Makefile.am
 
 $ACLOCAL
 $AUTOMAKE
 
-grep '^QBERT =' Makefile.in
+grep "^ *:" Makefile.in && Exit 1
 
 :
diff --git a/tests/regex.test b/tests/regex-obsolete.test
similarity index 73%
copy from tests/regex.test
copy to tests/regex-obsolete.test
index babd92a..c283025 100755
--- a/tests/regex.test
+++ b/tests/regex-obsolete.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure AM_WITH_REGEX compiles and runs.
+# Check tha the AM_WITH_REGEX macro is reported as obsolete.
 
 . ./defs || Exit 1
 
@@ -25,6 +25,8 @@ AM_WITH_REGEX
 END
 
 $ACLOCAL
-$AUTOCONF
-./configure
-./configure --without-regex
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:.*AM_WITH_REGEX.*obsolete' stderr
+
+:
diff --git a/tests/remake-deleted-am-2.test b/tests/remake-deleted-am-2.test
new file mode 100755
index 0000000..07142f6
--- /dev/null
+++ b/tests/remake-deleted-am-2.test
@@ -0,0 +1,77 @@
+#! /bin/sh
+# Copyright (C) 2011 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 inclusion of `.am' fragments by automake does not suffer
+# of the "deleted header problem".  This test checks deeper inclusion
+# stacks, and use VPATH builds.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+$ACLOCAL
+$AUTOCONF
+
+cat > Makefile.am <<'END'
+include $(srcdir)/foo.am
+END
+
+cat > foo.am <<'END'
+# this is foo
+include sub/bar.am
+include baz.am
+END
+
+mkdir sub
+echo 'include $(top_srcdir)/sub/zardoz.am' > sub/bar.am
+echo '# this is zardoz' > sub/zardoz.am
+
+echo 'include fnord.am' > baz.am
+echo '# you are not seeing this' > fnord.am
+
+$AUTOMAKE
+# Sanity checks.
+$FGREP 'this is zardoz' Makefile.in
+$FGREP 'you are not seeing this' Makefile.in
+
+mkdir build
+cd build
+
+srcdir=..
+
+$srcdir/configure
+$MAKE
+
+$sleep
+echo '# this is baz' > $srcdir/baz.am
+rm -f $srcdir/fnord.am
+$MAKE
+# Sanity checks.
+$FGREP 'you are not seeing this' $srcdir/Makefile.in Makefile && Exit 1
+$FGREP 'this is baz' $srcdir/Makefile.in
+$FGREP 'this is baz' Makefile
+
+$sleep
+rm -rf $srcdir/sub $srcdir/foo.am $srcdir/baz.am
+echo '# no more inclusions' > $srcdir/Makefile.am
+$MAKE
+# Sanity checks.
+$EGREP 'this is (foo|bar|baz)' Makefile $srcdir/Makefile.in && Exit 1
+$FGREP 'no more inclusions' Makefile
+
+:
diff --git a/tests/remake-deleted-am-subdir.test 
b/tests/remake-deleted-am-subdir.test
new file mode 100755
index 0000000..9ed1078
--- /dev/null
+++ b/tests/remake-deleted-am-subdir.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2011 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 inclusion of `.am' fragments by automake does not suffer
+# of the "deleted header problem".  This test does the check when the
+# SUBDIRS variable is involved.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+cat > Makefile.am <<'END'
+include foo.am
+SUBDIRS = sub1 sub2
+END
+
+echo '# this is foo.am' > foo.am
+
+mkdir sub1 sub2
+
+echo 'include $(srcdir)/bar.am' > sub1/Makefile.am
+echo '# this is bar.am' > sub1/bar.am
+
+echo 'include $(top_srcdir)/foo.am' > sub2/Makefile.am
+
+$AUTOMAKE
+# Sanity checks.
+$FGREP 'this is foo.am' Makefile.in
+$FGREP 'this is bar.am' sub1/Makefile.in
+$FGREP 'this is foo.am' sub2/Makefile.in
+
+./configure
+$MAKE # Should be no-op.
+
+$sleep
+echo '# this is sub1/Makefile.am' > sub1/Makefile.am
+rm -f sub1/bar.am
+$MAKE all
+# Sanity checks.
+$FGREP 'this is bar' sub1/Makefile.in sub1/Makefile && Exit 1
+$FGREP 'this is sub1/Makefile.am' sub1/Makefile.in
+$FGREP 'this is sub1/Makefile.am' sub1/Makefile
+
+$sleep
+for d in . sub2; do
+  sed "s|.*include.*foo\.am.*|# this is $d/Makefile.am|" $d/Makefile.am > t
+  mv -f t $d/Makefile.am
+done
+rm -f foo.am
+$MAKE all
+# Sanity checks.
+$FGREP 'this is foo' sub*/Makefile* Makefile* && Exit 1
+for d in . sub1 sub2; do
+  $FGREP "this is $d/Makefile.am" $d/Makefile.in
+  $FGREP "this is $d/Makefile.am" $d/Makefile
+done
+
+:
diff --git a/tests/remake-deleted-am.test b/tests/remake-deleted-am.test
new file mode 100755
index 0000000..fa5a672
--- /dev/null
+++ b/tests/remake-deleted-am.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011 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 inclusion of `.am' fragments by automake does not suffer
+# of the "deleted header problem".  Basic checks are done here.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+$ACLOCAL
+$AUTOCONF
+
+cat > Makefile.am <<'END'
+include foo.am
+include $(srcdir)/bar.am
+include $(top_srcdir)/baz.am
+END
+
+echo '# this is foo' > foo.am
+echo '# this is bar' > bar.am
+echo '# this is baz' > baz.am
+
+$AUTOMAKE
+# Sanity checks.
+$FGREP 'this is foo' Makefile.in
+$FGREP 'this is bar' Makefile.in
+$FGREP 'this is baz' Makefile.in
+
+./configure
+$MAKE # Should be no-op.
+
+$sleep
+sed '/^include foo\.am$/d' Makefile.am > t
+mv -f t Makefile.am
+rm -f foo.am
+$MAKE Makefile
+# Sanity checks.
+$FGREP 'this is foo' Makefile.in Makefile && Exit 1
+$FGREP 'this is bar' Makefile.in
+$FGREP 'this is bar' Makefile
+$FGREP 'this is baz' Makefile.in
+$FGREP 'this is baz' Makefile
+
+$sleep
+echo '# empty empty' > Makefile.am
+rm -f bar.am baz.am
+$MAKE Makefile
+# Sanity checks.
+$FGREP 'empty empty' Makefile.in
+$FGREP 'empty empty' Makefile
+grep 'this is ba[rz]' Makefile Makefile.in && Exit 1
+
+:
diff --git a/tests/distcheck-hook.test b/tests/remake-renamed-am.test
similarity index 54%
copy from tests/distcheck-hook.test
copy to tests/remake-renamed-am.test
index 9a2c384..b3a7a41 100755
--- a/tests/distcheck-hook.test
+++ b/tests/remake-renamed-am.test
@@ -14,40 +14,47 @@
 # 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 basic support for distcheck-hook.
+# Check that inclusion of `.am' fragments by automake does not suffer
+# of the "deleted header problem".  This test checks that we can rename
+# an included .am file without confusing the remake rules.
 
 . ./defs || Exit 1
 
 set -e
 
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
-distcheck-hook:
-       ls -l $(distdir)
-       chmod u+w $(distdir)
-       : > $(distdir)/dc-hook-has-run
-       chmod a-w $(distdir)
-check-local:
-       ls -l $(srcdir)
-       test -f $(srcdir)/dc-hook-has-run
+include foo.am
+END
+
+cat > foo.am <<'END'
+all-local:
+       echo ok > has-run-1
 END
 
 $ACLOCAL
 $AUTOMAKE
-$FGREP 'distcheck-hook' Makefile.in
-$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
-
 $AUTOCONF
-./configure
 
+./configure
+$MAKE
+test -f has-run-1
+
+$sleep
+rm -f has-run-1
+mv -f foo.am bar.am
+echo include bar.am > Makefile.am
+$MAKE Makefile
+$FGREP 'foo.am' Makefile Makefile.in && Exit 1
+
+$sleep
+rm -f has-run-1 bar.am
+echo 'all-local:; echo ok > has-run-2' > zardoz.am
+echo 'include $(srcdir)/zardoz.am' > Makefile.am
+using_gmake || $MAKE Makefile
 $MAKE
-$MAKE check && Exit 1
-$MAKE distdir
-test -f $distdir/dc-hook-has-run && Exit 1
-$MAKE distcheck
+test ! -f has-run-1
+test -f has-run-2
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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