Fix parallel make risk with new check temp-install setup
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 30 Apr 2015 00:34:22 +0000 (20:34 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 30 Apr 2015 00:34:22 +0000 (20:34 -0400)
The "check" target no longer needs to depend on "all", because it now
runs "install" directly, which in turn depends on "all".  Doing both
will cause problems with parallel make, because two builds will run next
to each other.

Also remove the redirection of the temp-install output into a log file.
This was appropriate when this was done from within pg_regress, but now
it's just a regular make run, and especially with the above changes this
will now take the place of running the "all" target before the test
suites.

problem report by Jeff Janes, patch in part by Michael Paquier

14 files changed:
GNUmakefile.in
contrib/test_decoding/Makefile
src/Makefile.global.in
src/bin/initdb/Makefile
src/bin/pg_basebackup/Makefile
src/bin/pg_config/Makefile
src/bin/pg_controldata/Makefile
src/bin/pg_ctl/Makefile
src/bin/scripts/Makefile
src/interfaces/ecpg/Makefile
src/makefiles/pgxs.mk
src/pl/plperl/GNUmakefile
src/pl/plpython/Makefile
src/pl/tcl/Makefile

index 361897a80b55f96c9c32cbee5410c8ae32fc3db2..ba39bf13307e55d70bd2379dcfdb0a6d9acfc555 100644 (file)
@@ -62,8 +62,6 @@ distclean maintainer-clean:
 # Garbage from autoconf:
        @rm -rf autom4te.cache/
 
-check check-tests: all
-
 check check-tests installcheck installcheck-parallel installcheck-tests:
        $(MAKE) -C src/test/regress $@
 
index 656eabfa005324b544a46191e23485cad984ba56..a362e696916a093f5d1abacf616eef349d68b1c8 100644 (file)
@@ -40,7 +40,7 @@ submake-test_decoding:
 REGRESSCHECKS=ddl rewrite toast permissions decoding_in_xact decoding_into_rel \
        binary prepared replorigin
 
-regresscheck: all | submake-regress submake-test_decoding temp-install
+regresscheck: | submake-regress submake-test_decoding temp-install
        $(MKDIR_P) regression_output
        $(pg_regress_check) \
            --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
@@ -54,7 +54,7 @@ regresscheck-install-force: | submake-regress submake-test_decoding temp-install
 
 ISOLATIONCHECKS=mxact delayed_startup ondisk_startup concurrent_ddl_dml
 
-isolationcheck: all | submake-isolation submake-test_decoding temp-install
+isolationcheck: | submake-isolation submake-test_decoding temp-install
        $(MKDIR_P) isolation_output
        $(pg_isolation_regress_check) \
            --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
index 81cae942d9f0f202e579c7d5a61e9c0a56df9732..a0fe8e43eb967e8e075a9eedb865dad35baada95 100644 (file)
@@ -308,10 +308,9 @@ check: temp-install
 temp-install:
 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) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install
 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)
+       $(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@
 PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/
index fc809a0706d5f8fd5a393d8ca8d6c7ec532203ff..d4797880dd5a6c66be42fcbddf19da622efa7c00 100644 (file)
@@ -58,7 +58,7 @@ clean distclean maintainer-clean:
 # ensure that changes in datadir propagate into object file
 initdb.o: initdb.c $(top_builddir)/src/Makefile.global
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index 58f8b66494d8416b3051593eca6eda842e4f4e38..0d8421a71e591422084ccfe9f7c0a541654f6d80 100644 (file)
@@ -50,7 +50,7 @@ clean distclean maintainer-clean:
                $(OBJS)
        rm -rf tmp_check
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index 71ce236b9e7e3986e80c09ea04a2dc0e01e7f824..dbc98990fb72f75b217a8f86213d0b65a37d1c46 100644 (file)
@@ -49,7 +49,7 @@ clean distclean maintainer-clean:
        rm -f pg_config$(X) $(OBJS)
        rm -rf tmp_check
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index f7a4010bf801b5b18d09b95a00d18cde37999b56..fd7399ba98fce7160bfe4a5df3205f269c8e5363 100644 (file)
@@ -35,7 +35,7 @@ clean distclean maintainer-clean:
        rm -f pg_controldata$(X) $(OBJS)
        rm -rf tmp_check
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index 525e1d4750fc712c5c67bedc70bcb4018fff82b7..37eb482a5c0af8be75cf96c03a4260406f811127 100644 (file)
@@ -38,7 +38,7 @@ clean distclean maintainer-clean:
        rm -f pg_ctl$(X) $(OBJS)
        rm -rf tmp_check
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index 8b6f54ccee8c0497493a164a3cf7df4121737c3c..c8317164f8a2e15d2b59c077837a225428789f8c 100644 (file)
@@ -69,7 +69,7 @@ clean distclean maintainer-clean:
        rm -f dumputils.c print.c mbprint.c kwlookup.c keywords.c
        rm -rf tmp_check
 
-check: all
+check:
        $(prove_check)
 
 installcheck:
index b80de4e2475585dcae9e15ebe8960104eef152a7..41460a17c96449c5797aaa7ce86781b9e98fefd6 100644 (file)
@@ -26,5 +26,5 @@ install-ecpglib-recurse: install-pgtypeslib-recurse
 clean distclean maintainer-clean:
        $(MAKE) -C test clean
 
-check checktcp installcheck: all
+check checktcp installcheck:
        $(MAKE) -C test $@
index 08e25da72319198550611f7ad151b8812c68e20e..b5113726841aea42664ba364e0b91cf35dd8d836 100644 (file)
@@ -291,7 +291,7 @@ check:
        @echo '"$(MAKE) check" is not supported.'
        @echo 'Do "$(MAKE) install", then "$(MAKE) installcheck" instead.'
 else
-check: all submake $(REGRESS_PREP)
+check: submake $(REGRESS_PREP)
        $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 temp-install: EXTRA_INSTALL+=$(subdir)
index cebffde79d741f898296349f94006ce301a9ec72..904a320cf6af33cbacd74725ae3633a03e6a77fb 100644 (file)
@@ -114,7 +114,7 @@ uninstall-data:
 .PHONY: install-data uninstall-data
 
 
-check: all submake
+check: submake
        $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake
index e70e285611df77495185c4290c8e7ad09e9f21c0..de97cbb780bc5c8acc4de5cb904e604a48e0a970 100644 (file)
@@ -141,7 +141,7 @@ uninstall-data:
 include $(srcdir)/regress-python3-mangle.mk
 
 
-check: all submake
+check: submake
        $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake
index 851e3c063f5ce7ff5b4d7b8a0c329159f5231c16..533d3b4efd06d20d9a08f3692197357efb9f511c 100644 (file)
@@ -92,7 +92,7 @@ uninstall-data:
 .PHONY: install-data uninstall-data
 
 
-check: all submake
+check: submake
        $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake