diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-04-24 18:33:42 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-04-24 18:33:42 +0000 |
commit | 9f26c3bba3592b9667052232dacc40056e500900 (patch) | |
tree | af2b123efa96d1a39498fb7943f74ec05870e330 /lib/am/configure.am | |
parent | 4449619660dd8d6def565ccc5137bacd131d4eb8 (diff) | |
download | automake-9f26c3bba3592b9667052232dacc40056e500900.tar.gz |
For automake PR/46:
* lib/am/configure.am (%MAKEFILE-IN%): If Makefile.in is rebuilt
because of one of configure's dependencies, run automake without
argument to update the whole tree at once. Depend upon
%CONFIGURE_DEPS%.
(%MAKEFILE%): If Makefile is rebuilt because config.status has
been updated, run config.status without arguments.
* automake.in (scan_autoconf_traces): Prepend $(top_srcdir)
before all files in @configure_deps.
* tests/subdir5.test: Modernize configure.in, make sure
maude/Makefile was actually created, and exercise %CONFIGURE_DEPS%.
* tests/subdir8.test: New file.
* tests/Makefile.am (TESTS): Add subdir8.test.
(XFAIL_TESTS): Replace subdir5.test by subdir8.test.
Diffstat (limited to 'lib/am/configure.am')
-rw-r--r-- | lib/am/configure.am | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/lib/am/configure.am b/lib/am/configure.am index fe53b48fb..cb265f3f1 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 2001 +## Copyright (C) 2001, 2002, 2003 ## Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify @@ -22,17 +22,44 @@ ## --------------------- ## ## This rule remakes the Makefile.in. -%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) +%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %CONFIGURE_DEPS% +## If configure.ac or one of configure's dependencies has changed, all +## Makefile.in are to be updated; it is then more efficient to run +## automake on all the Makefiles at once. It also allow Automake to be +## run for newly added directories. + @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%; \ + exit 0;; \ + esac; \ + done; \ +## Otherwise, rebuild only this file. + echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES% ## This rule remakes the Makefile. %MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status +## If Makefile is to be updated because of config.status, then run +## config.status without argument in order to (i) rerun all the +## AC_CONFIG_COMMANDS including those that are not visible to +## Automake, and (ii) to save time by running config.status all with +## all the files, instead of once per file (iii) generate Makefiles +## in newly added directories. + @case '$?' in \ +## 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;; \ + *) \ ## 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. - cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe) - - + echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \ + esac; ## --------------------------- ## ## config.status & configure. ## |