From de4cfc180fcc5a6e223f863020ab86bd13aa11e7 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 25 Apr 2003 18:39:20 +0000 Subject: [PATCH] * 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. --- ChangeLog | 12 ++++++ Makefile.in | 29 +++++++------- NEWS | 4 +- lib/Automake/Makefile.in | 14 +++---- lib/Automake/tests/Makefile.in | 14 +++---- lib/Makefile.in | 14 +++---- lib/am/Makefile.in | 14 +++---- lib/am/configure.am | 40 +++++++++++++++----- m4/Makefile.in | 14 +++---- tests/Makefile.am | 1 + tests/Makefile.in | 15 ++++---- tests/aclocal6.test | 69 ++++++++++++++++++++++++++++++++++ 12 files changed, 165 insertions(+), 75 deletions(-) create mode 100755 tests/aclocal6.test diff --git a/ChangeLog b/ChangeLog index f2b94a8c..99b5697e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2003-04-25 Alexandre Duret-Lutz + + * 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 * automake.in (scan_aclocal_m4): Do not parse ACLOCAL_AMFLAGS diff --git a/Makefile.in b/Makefile.in index 885c10b5..62c3e90c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 d483dcdf..3329581f 100644 --- 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. New in 1.7: diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 8357eb3f..d7614802 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -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) diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index f996a9b6..4e45b86f 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -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: diff --git a/lib/Makefile.in b/lib/Makefile.in index 1b184b15..f67448c7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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) diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index 2c4c7f9c..7d50df18 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -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) diff --git a/lib/am/configure.am b/lib/am/configure.am index 6ba9a77b..fc3115f7 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -17,6 +17,17 @@ ## 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 diff --git a/m4/Makefile.in b/m4/Makefile.in index 7e38d114..10909489 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -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) diff --git a/tests/Makefile.am b/tests/Makefile.am index edc7b37d..4eb5cc9e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,6 +9,7 @@ aclocal.test \ aclocal3.test \ aclocal4.test \ aclocal5.test \ +aclocal6.test \ acoutnoq.test \ acoutpt.test \ acoutpt2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 246b6f94..b86ee284 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 00000000..c0a150f7 --- /dev/null +++ b/tests/aclocal6.test @@ -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 -- 2.43.5