diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-05-07 21:28:38 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-05-07 21:28:38 +0300 |
commit | d7b2cd9d40e858778ca93b59383d280e510a01e7 (patch) | |
tree | 18510f1214da9f9a3f40241de4da73bca511c6b9 /src | |
parent | 916d589a10185bb30fc77923029d806f5907ab1e (diff) | |
download | postgresql-d7b2cd9d40e858778ca93b59383d280e510a01e7.tar.gz postgresql-d7b2cd9d40e858778ca93b59383d280e510a01e7.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 51c2102b742..e10c86cd311 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -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 |