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
This commit is contained in:
parent
76f7b0b08a
commit
aa019da523
@ -63,10 +63,12 @@ distclean maintainer-clean:
|
|||||||
@rm -rf autom4te.cache/
|
@rm -rf autom4te.cache/
|
||||||
rm -f config.cache config.log config.status GNUmakefile
|
rm -f config.cache config.log config.status GNUmakefile
|
||||||
|
|
||||||
|
check check-tests installcheck installcheck-parallel installcheck-tests: CHECKPREP_TOP=src/test/regress
|
||||||
check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
|
check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
|
||||||
$(MAKE) -C src/test/regress $@
|
$(MAKE) -C src/test/regress $@
|
||||||
|
|
||||||
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
|
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
|
||||||
|
$(call recurse,checkprep, src/test src/pl src/interfaces/ecpg contrib src/bin)
|
||||||
|
|
||||||
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
|
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
# Meta configuration
|
# 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:
|
# these targets should recurse even into subdirectories not being built:
|
||||||
standard_always_targets = distprep clean distclean maintainer-clean
|
standard_always_targets = distprep clean distclean maintainer-clean
|
||||||
|
|
||||||
@ -390,10 +390,16 @@ ifeq ($(MAKELEVEL),0)
|
|||||||
rm -rf '$(abs_top_builddir)'/tmp_install
|
rm -rf '$(abs_top_builddir)'/tmp_install
|
||||||
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
|
$(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) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
|
||||||
endif
|
$(MAKE) -j1 $(if $(CHECKPREP_TOP),-C $(CHECKPREP_TOP),) checkprep >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
|
||||||
$(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
|
||||||
endif
|
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@
|
PROVE = @PROVE@
|
||||||
# There are common routines in src/test/perl, and some test suites have
|
# There are common routines in src/test/perl, and some test suites have
|
||||||
|
@ -435,7 +435,7 @@ endif
|
|||||||
endif # PGXS
|
endif # PGXS
|
||||||
|
|
||||||
ifndef NO_TEMP_INSTALL
|
ifndef NO_TEMP_INSTALL
|
||||||
temp-install: EXTRA_INSTALL+=$(subdir)
|
checkprep: EXTRA_INSTALL+=$(subdir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user