aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-05-09 20:45:56 +0300
committerPeter Eisentraut <peter_e@gmx.net>2012-05-09 20:45:56 +0300
commit5d39807a008a5a73999477a7b3c21b2165fee549 (patch)
tree658f318dc7df9d3d8dd4e74cd135d73253d44f04
parent1c882e07da553d792f479beb92b4729a4c0bd8de (diff)
downloadpostgresql-5d39807a008a5a73999477a7b3c21b2165fee549.tar.gz
postgresql-5d39807a008a5a73999477a7b3c21b2165fee549.zip
Add make dependency so that postgres.bki is rebuilt in major version change
Every time since the current rule for postgres.bki was put in place when we change the major version, people complain that their tests fail in strange ways. This is because the version number in postgres.bki is not updated, because it has no dependency for that. And you can't even force the rebuild manually if you don't happen to know which file has the problem. Fix that now before it will happen again. The only remaining problem with switching major versions, as far as the regression tests are concerned, is that contrib needs to be rebuilt. But that's easily invoked, and in any case the failure modes are more friendly if you forget that.
-rw-r--r--src/backend/catalog/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 5a4419d3a80..62fc9b04663 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -56,7 +56,12 @@ postgres.shdescription: postgres.bki ;
schemapg.h: postgres.bki ;
-postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS)
+# Technically, this should depend on Makefile.global, but then
+# postgres.bki would need to be rebuilt after every configure run,
+# even in distribution tarballs. So this is cheating a bit, but it
+# will achieve the goal of updating the version number when it
+# changes.
+postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(top_srcdir)/configure
$(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
.PHONY: install-data