Skip to content

Commit d7b2cd9

Browse files
committed
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.
1 parent 916d589 commit d7b2cd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Makefile.global.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,18 +536,18 @@ $(top_builddir)/src/Makefile.global: $(top_srcdir)/src/Makefile.global.in $(top_
536536
# unnecessarily. Therefore we make config.status update a timestamp file
537537
# stamp-h every time it runs, so that we don't trigger this rule every time.
538538
# (We do trigger the null rule for stamp-h to pg_config.h every time; so it's
539-
# important for that rule to be null!)
539+
# important for that rule to be empty!)
540540
#
541541
# Of course you need to turn on dependency tracking to get any
542542
# dependencies on pg_config.h.
543-
$(top_builddir)/src/include/pg_config.h: $(top_builddir)/src/include/stamp-h
543+
$(top_builddir)/src/include/pg_config.h: $(top_builddir)/src/include/stamp-h ;
544544

545545
$(top_builddir)/src/include/stamp-h: $(top_srcdir)/src/include/pg_config.h.in $(top_builddir)/config.status
546546
cd $(top_builddir) && ./config.status src/include/pg_config.h
547547

548548
# Also remake ecpg_config.h from ecpg_config.h.in if the latter changed, same
549549
# logic as above.
550-
$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/interfaces/ecpg/include/stamp-h
550+
$(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h: $(top_builddir)/src/interfaces/ecpg/include/stamp-h ;
551551

552552
$(top_builddir)/src/interfaces/ecpg/include/stamp-h: $(top_builddir)/src/interfaces/ecpg/include/ecpg_config.h.in $(top_builddir)/config.status
553553
cd $(top_builddir) && ./config.status src/interfaces/ecpg/include/ecpg_config.h

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy