diff options
author | Noah Misch <noah@leadboat.com> | 2018-12-31 13:54:38 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2018-12-31 13:57:57 -0800 |
commit | bedda9fbb76897c987c720aed6551dff48d4cfb4 (patch) | |
tree | d0b98388580a98fb6aaf266cead32f7f4dcba7f7 /src | |
parent | e7ebc8c285f12b0f50924a69627a40050c85a1e2 (diff) | |
download | postgresql-bedda9fbb76897c987c720aed6551dff48d4cfb4.tar.gz postgresql-bedda9fbb76897c987c720aed6551dff48d4cfb4.zip |
Process EXTRA_INSTALL serially, during the first temp-install.
This closes a race condition in "make -j check-world"; the symptom was
EEXIST errors. Back-patch to v10, before which parallel check-world had
worse problems.
Discussion: https://postgr.es/m/20181224221601.GA3227827@rfd.leadboat.com
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 10 | ||||
-rw-r--r-- | src/makefiles/pgxs.mk | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 3e56ef013b4..9fe3b4d678c 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -19,7 +19,7 @@ # # Meta configuration -standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck init-po update-po +standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check checkprep installcheck init-po update-po # these targets should recurse even into subdirectories not being built: standard_always_targets = distprep clean distclean maintainer-clean @@ -344,11 +344,17 @@ ifeq ($(MAKELEVEL),0) rm -rf '$(abs_top_builddir)'/tmp_install $(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log $(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 + $(MAKE) -j1 $(if $(CHECKPREP_TOP),-C $(CHECKPREP_TOP),) checkprep >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 endif - $(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 || exit; done) endif endif +# Tasks to run serially at the end of temp-install. Some EXTRA_INSTALL +# entries appear more than once in the tree, and parallel installs of the same +# file can fail with EEXIST. +checkprep: + $(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install || exit; done) + PROVE = @PROVE@ # There are common routines in src/test/perl, and some test suites have # extra perl modules in their own directory. diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index ff7f5297e7e..a7b34c69374 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -285,7 +285,7 @@ else check: submake $(REGRESS_PREP) $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) -temp-install: EXTRA_INSTALL+=$(subdir) +checkprep: EXTRA_INSTALL+=$(subdir) endif endif # REGRESS |