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.
This commit is contained in:
parent
9760dc9d12
commit
02a18de4d4
1 changed files with 2 additions and 2 deletions
4
Make.mk
4
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue