summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2016-07-01 19:08:55 +0000
committerTom Lane2016-07-01 19:09:02 +0000
commit548af97fcec5543603c20b61fec60f8147a05b29 (patch)
tree177d40e557de9107379401ca68874fa3bbc03e08 /src/test
parent1bdae16fca884a9190dc330790e7a63c04989fa3 (diff)
Provide and use a makefile target to build all generated headers.
As of 9.6, pg_regress doesn't build unless storage/lwlocknames.h has been created; but there was nothing forcing that to happen if you just went into src/test/regress/ and built there. We previously had a similar complaint about plpython. To fix in a way that won't break next time we invent a generated header, make src/backend/Makefile expose a phony target for updating all the include files it builds, and invoke that before building pg_regress or plpython. In principle, maybe we ought to invoke that everywhere; but it would add a lot of usually-useless make cycles, so let's just do it in the places where people have complained. I made a couple of cosmetic adjustments in src/backend/Makefile as well, to deal with the generated headers in consistent orders. Michael Paquier and Tom Lane Report: <31398.1467036827@sss.pgh.pa.us> Report: <20150916200959.GB32090@msg.df7cb.de>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/modules/Makefile5
-rw-r--r--src/test/regress/GNUmakefile4
2 files changed, 3 insertions, 6 deletions
diff --git a/src/test/modules/Makefile b/src/test/modules/Makefile
index 892662755a8..3ce99046f84 100644
--- a/src/test/modules/Makefile
+++ b/src/test/modules/Makefile
@@ -17,9 +17,6 @@ SUBDIRS = \
test_shm_mq \
worker_spi
-all: submake-errcodes
-
-submake-errcodes:
- $(MAKE) -C $(top_builddir)/src/backend submake-errcodes
+all: submake-generated-headers
$(recurse)
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index f5ed474d6e3..6a275cb729c 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -36,7 +36,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
all: pg_regress$(X)
-pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
+pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-generated-headers
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
# dependencies ensure that path changes propagate
@@ -105,7 +105,7 @@ $(top_builddir)/contrib/spi/refint$(DLSUFFIX): | submake-contrib-spi ;
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): | submake-contrib-spi ;
-submake-contrib-spi:
+submake-contrib-spi: | submake-libpgport submake-generated-headers
$(MAKE) -C $(top_builddir)/contrib/spi
.PHONY: submake-contrib-spi