aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.global.in4
-rw-r--r--src/pl/plpython/Makefile3
-rw-r--r--src/test/regress/GNUmakefile8
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 20090b360e3..408736cb290 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -563,11 +563,11 @@ endif
submake-libpq:
$(MAKE) -C $(libpq_builddir) all
-submake-libpgport:
+submake-libpgport: | submake-generated-headers
$(MAKE) -C $(top_builddir)/src/port all
$(MAKE) -C $(top_builddir)/src/common all
-submake-libpgfeutils:
+submake-libpgfeutils: | submake-generated-headers
$(MAKE) -C $(top_builddir)/src/port all
$(MAKE) -C $(top_builddir)/src/common all
$(MAKE) -C $(top_builddir)/src/fe_utils all
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index fb785496ea5..653fe644ee6 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -99,6 +99,9 @@ include $(top_srcdir)/src/Makefile.shlib
all: all-lib
+# Ensure parallel safety if a build is started in this directory
+$(OBJS): | submake-generated-headers
+
install: all install-lib install-data
installdirs: installdirs-lib
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 7ba4e9c5abb..378bd017530 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -43,7 +43,8 @@ pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
pg_regress.o: pg_regress.c $(top_builddir)/src/port/pg_config_paths.h
pg_regress.o: override CPPFLAGS += -I$(top_builddir)/src/port $(EXTRADEFS)
-$(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
+# note: because of the submake dependency, this rule's action is really a no-op
+$(top_builddir)/src/port/pg_config_paths.h: | submake-libpgport
$(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
install: all installdirs
@@ -65,6 +66,9 @@ include $(top_srcdir)/src/Makefile.shlib
all: all-lib
+# Ensure parallel safety if a build is started in this directory
+$(OBJS): | submake-libpgport submake-generated-headers
+
# Test input and expected files. These are created by pg_regress itself, so we
# don't have a rule to create them. We do need rules to clean them however.
input_files = $(patsubst $(srcdir)/input/%.source,sql/%.sql, $(wildcard $(srcdir)/input/*.source))
@@ -105,7 +109,7 @@ $(top_builddir)/contrib/spi/refint$(DLSUFFIX): | submake-contrib-spi ;
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): | submake-contrib-spi ;
-submake-contrib-spi: | submake-libpgport
+submake-contrib-spi: | submake-libpgport submake-generated-headers
$(MAKE) -C $(top_builddir)/contrib/spi
.PHONY: submake-contrib-spi