From 6c2d5f855f8feec9b7db5537aae704ed00ab82c8 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Tue, 6 Dec 2005 14:59:06 +0100 Subject: [PATCH] Regenerate Makefile.config automatically if config.status has changed. Thus, if I edit e.g. the CFLAGS settings in configure.in: - Makefile runs autoconf to update configure. - Makefile runs config.status --recheck to update config.status. - Makefile runs config.status to update Makefile.config. (GNU Make implicitly tries to keep included makefiles up to date.) - src/**/Makefile use the CFLAGS from the updated Makefile.config. (Source files will not be automatically recompiled, however. If that is ever implemented, Makefile.config should be given a separate timestamp file like config.h has.) --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 1c788d53..08d92fe3 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,13 @@ $(ACLOCAL_M4): $(top_srcdir)/configure.in $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOCONF) +# Makefile.config doesn't need a separate timestamp file because +# touching it doesn't directly cause other files to be rebuilt. +$(top_builddir)/Makefile.config: $(top_srcdir)/Makefile.config.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=Makefile.config CONFIG_HEADERS= \ + $(SHELL) ./config.status + $(top_builddir)/config.h: $(top_builddir)/stamp-h @cd $(top_builddir) && \ if test ! -f $@; then \