From 02a18de4d4dcd4b9a0d07486608cc5d70dd36016 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 27 Apr 2013 15:32:53 +0200 Subject: [PATCH] Fix remaking of config.h and config.h.in Remaking config.h and config.h.in updates the target only when its contents actually changes. This is important, because after updating config.h we need to recompile everything. The make rules to do that are straight from the Autoconf manual. But they don't work: the rules that connect config.h and config.h.in to stamp-h and stamp-h.in don't have recipes. Since make doesn't have an implicit rule either, it concludes that the target remains unchanged. It still updates the prerequisites. The recipe for updating the stamp files then change the the targetes behind make's back. Make misses the change of config.h and/or config.h.in, and we get an incomplete rebuild. The rules need empty recipes instead. This Autoconf manual was fixed accordingly in autoconf.git commit 6b42b38. --- Make.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Make.mk b/Make.mk index feae71a64..656c81f57 100644 --- a/Make.mk +++ b/Make.mk @@ -389,7 +389,7 @@ $(srcdir)/configure: configure.ac aclocal.m4 cd $(srcdir) && autoconf # autoheader might not change config.h.in, so touch a stamp file. -$(srcdir)/config.h.in: stamp-h.in +$(srcdir)/config.h.in: stamp-h.in ; $(srcdir)/stamp-h.in: configure.ac aclocal.m4 cd $(srcdir) && autoheader touch $@ @@ -398,7 +398,7 @@ $(srcdir)/aclocal.m4: $(filter m4/%.m4, $(src)) cd $(srcdir) && aclocal -I m4 # config.status might not change config.h; use the stamp file. -config.h: stamp-h +config.h: stamp-h ; stamp-h: config.h.in config.status ./config.status config.h stamp-h -- 2.43.0