]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* tests/aclocal6.test: New file.
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 25 Apr 2003 18:39:21 +0000 (18:39 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 25 Apr 2003 18:39:21 +0000 (18:39 +0000)
* lib/am/configure.am (am--refresh): New rule.
(%MAKEFILE-IN%, %MAKEFILE%, $(top_builddir)/config.status,
$(top_srcdir)/configure): Call the top-level am--refresh from
subdirectories.
($(ACLOCAL_M4)): Depend upon %CONFIGURE_DEPS%.  Call the
top-level am--refresh when not in the top-level directory.
Fix jump directories for VPATH builds.
Suggested by Raja R. Harinath.

12 files changed:
ChangeLog
Makefile.in
NEWS
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/configure.am
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/aclocal6.test [new file with mode: 0755]

index f2b94a8c457e624556ce113d4555e495bd42cb5b..99b5697ee08a75fb2673db71478262bfbc7c4e8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-04-25  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * tests/aclocal6.test: New file.
+       * lib/am/configure.am (am--refresh): New rule.
+       (%MAKEFILE-IN%, %MAKEFILE%, $(top_builddir)/config.status,
+       $(top_srcdir)/configure): Call the top-level am--refresh from
+       subdirectories.
+       ($(ACLOCAL_M4)): Depend upon %CONFIGURE_DEPS%.  Call the
+       top-level am--refresh when not in the top-level directory.
+       Fix jump directories for VPATH builds.
+       Suggested by Raja R. Harinath.
+
 2003-04-24  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * automake.in (scan_aclocal_m4): Do not parse ACLOCAL_AMFLAGS
index 885c10b58e637f62b74421063def8cf3e8c15fd4..62c3e90c1920ebdba7ccc0762e3c9777e085ae1f 100644 (file)
@@ -188,12 +188,13 @@ all: all-recursive
 
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno
+am--refresh:
 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+             cd $(srcdir) && $(AUTOMAKE) --gnu ; \
              exit 0;; \
          esac; \
        done; \
@@ -203,20 +204,20 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
@@ -720,12 +721,12 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info-am
 
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-       clean-generic clean-recursive ctags ctags-recursive dist \
-       dist-all dist-bzip2 dist-gzip dist-info distcheck distclean \
-       distclean-generic distclean-recursive distclean-tags \
-       distcleancheck distdir distuninstallcheck dvi dvi-am \
-       dvi-recursive html html-am html-recursive info info-am \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+       check-am clean clean-generic clean-recursive ctags \
+       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-info \
+       distcheck distclean distclean-generic distclean-recursive \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am dvi-recursive html html-am html-recursive info info-am \
        info-recursive install install-am install-binSCRIPTS \
        install-data install-data-am install-data-recursive \
        install-exec install-exec-am install-exec-recursive \
diff --git a/NEWS b/NEWS
index d483dcdf75a8557216df66a3669ebadf68d50e5a..3329581f890f5b139cacd220b10ca5dcc5ab5bc8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -100,7 +100,7 @@ New in 1.7a:
 * For similar reasons, the rules to rebuild configure, config.status, and
   aclocal.m4 are now defined in all directories.  Note that if you
   were using the CONFIG_STATUS_DEPENDENCIES and CONFIGURE_DEPENDENCIES
-  (undocumented) variables, you will have to define them in all directories.
+  (undocumented) variables, you should better define them in all directories.
   This is easily done using an AC_SUBST.
 
 * aclocal will now use `m4_include' instead of copying local m4 files
@@ -116,8 +116,6 @@ New in 1.7a:
   to override the aclocal.m4 dependencies computed (inaccurately) by
   older versions of Automake; this variable should be considered obsolete
   and will be flagged as such when running `automake -Wobsolete'.
-  Note that local m4 files are no longer dependencies of aclocal.m4
-  (since it only includes them) but they are dependencies of configure.
 
 \f
 New in 1.7:
index 8357eb3f301b246b90d1d3c80657b530907dc72d..d7614802fa3e61b175bc6cdc35ea6e37e7cd8d24 100644 (file)
@@ -138,8 +138,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -149,20 +148,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 uninstall-info-am:
 dist_perllibDATA_INSTALL = $(INSTALL_DATA)
 install-dist_perllibDATA: $(dist_perllib_DATA)
index f996a9b6fed9dc0f6d43d50ad3b8050d5ecee93b..4e45b86f7feaf8171c2c3dd6ae5c0f90b32ed9f2 100644 (file)
@@ -118,8 +118,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -129,20 +128,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 uninstall-info-am:
 tags: TAGS
 TAGS:
index 1b184b15ec51ddafdd3c0aeee244431345e054c3..f67448c72d1db58fe59b104a02ce824af2abca03 100644 (file)
@@ -136,8 +136,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -147,20 +146,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 uninstall-info-am:
 dist_pkgvdataDATA_INSTALL = $(INSTALL_DATA)
 install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
index 2c4c7f9c3dafaf82c95ec45c0910a2a7392b2140..7d50df1898ad68fa8da6d62d4d6fd583ff426e6d 100644 (file)
@@ -124,8 +124,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -135,20 +134,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 uninstall-info-am:
 dist_amDATA_INSTALL = $(INSTALL_DATA)
 install-dist_amDATA: $(dist_am_DATA)
index 6ba9a77b8541c407266b0cf72fdfbddb8c720a50..fc3115f721c9390c158be83a8c2cc058c66c4097 100644 (file)
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
+
+## This dummy rule is called from subdirectories whenever one of the
+## top-level Makefile's dependencies must be updated.  It does not
+## need to depend on %MAKEFILE% because GNU make will always make sure
+## %MAKEFILE% is updated before considering the am--refresh target.
+if %?TOPDIR_P%
+.PHONY: am--refresh
+am--refresh:
+endif %?TOPDIR_P%
+
+
 ## --------------------- ##
 ## Building Makefile.*.  ##
 ## --------------------- ##
@@ -30,8 +41,9 @@
        @for dep in $?; do \
          case '$(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %CONFIGURE_DEPS%' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \
-             cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%; \
+?TOPDIR_P?           echo ' cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \
+?TOPDIR_P?           cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%; \
+?!TOPDIR_P?          cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -52,8 +64,9 @@
 ## Don't prefix $(top_builddir), because GNU make will strip it out
 ## when it's `.'.
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+?TOPDIR_P?         echo ' $(SHELL) ./config.status'; \
+?TOPDIR_P?         $(SHELL) ./config.status;; \
+?!TOPDIR_P?        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
 ## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
 ## .P files.  Ideally we wouldn't have to do this by hand.
@@ -61,6 +74,7 @@
            cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
        esac;
 
+
 ## --------------------------- ##
 ## config.status & configure.  ##
 ## --------------------------- ##
@@ -74,10 +88,12 @@ DIST_COMMON += configure %CONFIGURE-AC%
 endif %?TOPDIR_P%
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+?TOPDIR_P?     $(SHELL) ./config.status --recheck
+?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure: %MAINTAINER-MODE% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) %CONFIGURE_DEPS%
-       cd $(top_srcdir) && $(AUTOCONF)
+?TOPDIR_P?     cd $(srcdir) && $(AUTOCONF)
+?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 
 ## ------------ ##
@@ -86,10 +102,15 @@ $(top_srcdir)/configure: %MAINTAINER-MODE% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCA
 
 ## aclocal.m4 must be built by the top-level Makefile, because this is
 ## where the user is expected to define $(ACLOCAL_AMFLAGS).
+##
+## Whenever a configure dependency changes we need to rebuild
+## aclocal.m4 too.  Changing configure.ac, or any file included by
+## aclocal.m4 might require adding more files to aclocal.m4.  Hence
+## the %CONFIGURE_DEPS% dependency.
 if %?REGEN-ACLOCAL-M4%
-$(ACLOCAL_M4): %MAINTAINER-MODE% $(top_srcdir)/%CONFIGURE-AC% %ACLOCAL_M4_DEPS%
-?TOPDIR_P?     $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-?!TOPDIR_P?    cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+$(ACLOCAL_M4): %MAINTAINER-MODE% $(top_srcdir)/%CONFIGURE-AC% %ACLOCAL_M4_DEPS% %CONFIGURE_DEPS%
+?TOPDIR_P?     cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 endif %?REGEN-ACLOCAL-M4%
 
 
@@ -97,7 +118,6 @@ endif %?REGEN-ACLOCAL-M4%
 ## cleanup.  ##
 ## --------- ##
 
-
 ## We special-case config.status here.  If we do it as part of the
 ## normal clean processing for this directory, then it might be
 ## removed before some subdir is cleaned.  However, that subdir's
index 7e38d114e321f26de7d90bccc67bb65895653f3a..109094891f1e1d350a4788621a756bad35e3823a 100644 (file)
@@ -154,8 +154,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -165,20 +164,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 uninstall-info-am:
 dist_m4dataDATA_INSTALL = $(INSTALL_DATA)
 install-dist_m4dataDATA: $(dist_m4data_DATA)
index edc7b37dc8baca938b0dcb6fc9961525faa77635..4eb5cc9e71c4fc1aa7ab3e1411d37791879a65b3 100644 (file)
@@ -9,6 +9,7 @@ aclocal.test \
 aclocal3.test \
 aclocal4.test \
 aclocal5.test \
+aclocal6.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
index 246b6f9480e5d959ca720b9812833ddbb6c55e4b..b86ee2845cb5ba3591e829ca4a26b2c9788537c8 100644 (file)
@@ -112,6 +112,7 @@ aclocal.test \
 aclocal3.test \
 aclocal4.test \
 aclocal5.test \
+aclocal6.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
@@ -581,8 +582,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
        @for dep in $?; do \
          case '$(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4' in \
            *$$dep*) \
-             echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(top_srcdir) && $(AUTOMAKE) --gnu ; \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh; \
              exit 0;; \
          esac; \
        done; \
@@ -592,20 +592,19 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status'; \
-           cd $(top_builddir) && $(SHELL) ./config.status;; \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(SHELL) ./config.status --recheck
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure:  $(top_srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
-       cd $(top_srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(top_srcdir)/configure.in 
-       cd $(top_srcdir) && $(MAKE) $(AM_MAKEFLAGS) '$$(ACLOCAL_M4)'
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(top_srcdir)/configure.in  $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/amversion.m4 $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/depend.m4 $(top_srcdir)/m4/depout.m4 $(top_srcdir)/m4/make.m4 $(top_srcdir)/m4/cond.m4 $(top_srcdir)/m4/runlog.m4
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 defs: $(top_builddir)/config.status defs.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 uninstall-info-am:
diff --git a/tests/aclocal6.test b/tests/aclocal6.test
new file mode 100755 (executable)
index 0000000..c0a150f
--- /dev/null
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure aclocal.m4 is rebuilt whenever a configure
+# dependency changes.  Test for VPATH too.
+
+required='GNUmake'
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+SOME_DEFS
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+ACLOCAL_AMFLAGS = -I m4
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+mkdir m4
+echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
+echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
+
+$ACLOCAL -I m4
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+
+mkdir build
+cd build
+
+../configure
+$MAKE
+
+# Update an aclocal.m4 dependency, then make sure all Makefiles
+# are updated, even from a sub-directory.
+echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4
+cd sub
+$MAKE
+cd ..
+grep GREPME Makefile
+grep GREPME sub/Makefile
+
+# Make sure configure dependencies are distributed.
+$MAKE distdir
+test -f aclocal6-1.0/m4/moredefs.m4
+test -f aclocal6-1.0/m4/somedefs.m4