Fix pg_config.h make rule
According to the Autoconf documentation, there should be a make rule pg_config.h: stamp-h so that with the right setup around this, a change in pg_config.h.in will trigger a rebuild of everything that depends on pg_config.h. But this doesn't always work, sometimes you need to run make twice to get everything up to date after a change of pg_config.h.in. The fix is to write the rule as pg_config.h: stamp-h ; instead (with an empty command instead of no command). This is what Automake-generated makefiles effectively do, so it seems safe to be on this side. It's not actually clear why this is (apparently) more correct. It's been posted to <http://lists.gnu.org/archive/html/help-make/2012-04/msg00058.html> without response so far.
This commit is contained in:
parent
916d589a10
commit
d7b2cd9d40
@ -536,18 +536,18 @@ $(top_builddir)/src/Makefile.global: $(top_srcdir)/src/Makefile.global.in $(top_
|
||||
# unnecessarily. Therefore we make config.status update a timestamp file
|
||||
# stamp-h every time it runs, so that we don't trigger this rule every time.
|
||||
# (We do trigger the null rule for stamp-h to pg_config.h every time; so it's
|
||||
# important for that rule to be null!)
|
||||
# important for that rule to be empty!)
|
||||
#
|
||||
# Of course you need to turn on dependency tracking to get any
|
||||
# dependencies on pg_config.h.
|
||||
$(top_builddir)/src/include/pg_config.h: $(top_builddir)/src/include/stamp-h
|
||||
$(top_builddir)/src/include/pg_config.h: $(top_builddir)/src/include/stamp-h ;
|
||||
|
||||
$(top_builddir)/src/include/stamp-h: $(top_srcdir)/src/include/pg_config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && ./config.status src/include/pg_config.h
|
||||
|
||||
# Also remake ecpg_config.h from ecpg_config.h.in if the latter changed, same
|
||||
# logic as above.
|
||||
$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/interfaces/ecpg/include/stamp-h
|
||||
$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/interfaces/ecpg/include/stamp-h ;
|
||||
|
||||
$(top_builddir)/src/interfaces/ecpg/include/stamp-h: $(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && ./config.status src/interfaces/ecpg/include/ecpg_config.h
|
||||
|
Loading…
Reference in New Issue
Block a user