Skip to content

Commit aa019da

Browse files
committed
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
1 parent 76f7b0b commit aa019da

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

GNUmakefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ distclean maintainer-clean:
6363
@rm -rf autom4te.cache/
6464
rm -f config.cache config.log config.status GNUmakefile
6565

66+
check check-tests installcheck installcheck-parallel installcheck-tests: CHECKPREP_TOP=src/test/regress
6667
check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
6768
$(MAKE) -C src/test/regress $@
6869

6970
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
71+
$(call recurse,checkprep, src/test src/pl src/interfaces/ecpg contrib src/bin)
7072

7173
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
7274

src/Makefile.global.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
# Meta configuration
2121

22-
standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check installcheck init-po update-po
22+
standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check checkprep installcheck init-po update-po
2323
# these targets should recurse even into subdirectories not being built:
2424
standard_always_targets = distprep clean distclean maintainer-clean
2525

@@ -390,11 +390,17 @@ ifeq ($(MAKELEVEL),0)
390390
rm -rf '$(abs_top_builddir)'/tmp_install
391391
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
392392
$(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
393+
$(MAKE) -j1 $(if $(CHECKPREP_TOP),-C $(CHECKPREP_TOP),) checkprep >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
393394
endif
394-
$(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)
395395
endif
396396
endif
397397

398+
# Tasks to run serially at the end of temp-install. Some EXTRA_INSTALL
399+
# entries appear more than once in the tree, and parallel installs of the same
400+
# file can fail with EEXIST.
401+
checkprep:
402+
$(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install || exit; done)
403+
398404
PROVE = @PROVE@
399405
# There are common routines in src/test/perl, and some test suites have
400406
# extra perl modules in their own directory.

src/makefiles/pgxs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ endif
435435
endif # PGXS
436436

437437
ifndef NO_TEMP_INSTALL
438-
temp-install: EXTRA_INSTALL+=$(subdir)
438+
checkprep: EXTRA_INSTALL+=$(subdir)
439439
endif
440440

441441

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy