Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f98dY-0001MQ-2y for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Apr 2018 12:26:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f98dW-0000qb-SH for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Apr 2018 12:26:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f98dW-0000qR-Hn for pgsql-hackers@lists.postgresql.org; Thu, 19 Apr 2018 12:26:02 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f98dS-0007O0-A9 for pgsql-hackers@postgresql.org; Thu, 19 Apr 2018 12:26:02 +0000 Received: by mail-lf0-x22e.google.com with SMTP id z130-v6so74102lff.5 for ; Thu, 19 Apr 2018 05:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=7Xeim3/NvEJc5EcoF9RoA3l82zH6svv86h85zCEKML0=; b=JCrn5CAH5H5lmJh3HUIQIqxru8zVRzsyll9QQ8qmsWQOBg8/d5+KEALcT89bzDT3o5 cwOlsxqjpJJV78zFj2u86sKFd9Au1iyptll65zZcFYp9aRfHBxD0MDcJ1kXlNVkCOJqn UfgrXpjUnAwc8drR5dF9LzLLj7ngo2YL/1hT5MPKspumap9A+Ycbs/IYHN9CIWhTrfU+ LOkHYAFfJIn9pPjZt76D1BXNYevPMcta7oef+h/+uWva6f4Bbj9QOuIEjU0mD8CgisjB UiUjlPhg3lY9qpuARcG7IaJH+5hiPdDdRfJu/JMaVGRX2nmABPSRGIkFl5qs3I4Ps6RX wxVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=7Xeim3/NvEJc5EcoF9RoA3l82zH6svv86h85zCEKML0=; b=rsWLjk8e71518Jn4IZA4ZUHbYeH832VW9x1Fus3U2iIZuLLcY/XVBxXxnrTp6b0GGG fVgwNOSsa1zoPTZ1kb+ZUtBgIzqG8PrUbUZSzAMy5vE3gqBlpcMgkQ6aNmiQJwXroeTX PnH4KPZPzD2bnMLj3UF++YwwXhluV3EmuKVBnzFJv8nKo38q55EnK59XCuJCAjdNhwXf CtmEVnt+jPULa88gJVM04lO6qdysz2PUKoGqzD0qcA/9J9jceHpGmvM0RLnAi1s4Tar8 1MF86laz2KivBW3CsediYTCUav8YJPsnT3EarvhZFGpcIUfzISSAzuiK6i0IzA88p+sj vQ0A== X-Gm-Message-State: ALQs6tAG7hJJ//N30HLG8K6g8rNi6+qRmJXvQITKVz/+q1djBE9eDsVq 6AtXdVzXLLc00nt+4QMQuJciuQ== X-Google-Smtp-Source: AB8JxZpmZd80xVaY8E32L5L1fSbifXvS1ezLbOdV909yrxi0SRSjRtdmFgCoAp2STkQ6KfZT1vADHQ== X-Received: by 2002:a19:6d03:: with SMTP id i3-v6mr250128lfc.34.1524140756058; Thu, 19 Apr 2018 05:25:56 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.148]) by smtp.gmail.com with ESMTPSA id q24-v6sm724858lff.14.2018.04.19.05.25.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 05:25:55 -0700 (PDT) Subject: Re: make installcheck-world in a clean environment From: Alexander Lakhin To: pgsql-hackers@postgresql.org References: <91833017-8f78-a51e-f229-55ad467ffef3@gmail.com> Message-ID: <1f99c502-0722-0cc3-d392-4c59ab13be38@gmail.com> Date: Thu, 19 Apr 2018 15:25:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <91833017-8f78-a51e-f229-55ad467ffef3@gmail.com> Content-Type: multipart/mixed; boundary="------------1E250D86A106DA900B4A1BFA" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------1E250D86A106DA900B4A1BFA Content-Type: multipart/alternative; boundary="------------E52E19085F073ECF71A43138" --------------E52E19085F073ECF71A43138 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 06.04.2018 09:19, Alexander Lakhin wrote: > To avoid overheating of this pretty hot discussion, I would like just > to propose "a more elaborated fix" (for REL_10_STABLE and master). > In fact, when we perform "make installcheck" it not only requires us > to build ecpg, but it also rebuilds libpostgres, libpgport and libpq > (for installcheck-world). > I believe that the larger testing surface (coverage), the better, so > using installed assets (libs, headers) is more useful. In hope to keep a lid on this explosive topic, I propose the improved fix. Best regards, ------ Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------E52E19085F073ECF71A43138 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
06.04.2018 09:19, Alexander Lakhin wrote:
To avoid overheating of this pretty hot discussion, I would like just to propose "a more elaborated fix" (for REL_10_STABLE and master).
In fact, when we perform "make installcheck" it not only requires us to build ecpg, but it also rebuilds libpostgres, libpgport and libpq (for installcheck-world).
I believe that the larger testing surface (coverage), the better, so using installed assets (libs, headers) is more useful.
In hope to keep a lid on this explosive topic, I propose the improved fix.

Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

--------------E52E19085F073ECF71A43138-- --------------1E250D86A106DA900B4A1BFA Content-Type: text/x-patch; name="make-checkinstall-10.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="make-checkinstall-10.patch" diff --git a/src/Makefile.global.in b/src/Makefile.global.in index e8b3a51..17f7015 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -234,7 +234,13 @@ CPPFLAGS = @CPPFLAGS@ override CPPFLAGS := $(ICU_CFLAGS) $(CPPFLAGS) +ifdef USE_INSTALLED_ASSETS +USE_INCLUDEDIR = 1 +endif ifdef PGXS +USE_INCLUDEDIR = 1 +endif +ifdef USE_INCLUDEDIR override CPPFLAGS := -I$(includedir_server) -I$(includedir_internal) $(CPPFLAGS) else # not PGXS override CPPFLAGS := -I$(top_srcdir)/src/include $(CPPFLAGS) @@ -278,7 +284,13 @@ with_gnu_ld = @with_gnu_ld@ # to rpathdir don't work right. So we must NOT do LDFLAGS := something, # meaning this has to be done first and elsewhere we must only do LDFLAGS += # something. +ifdef USE_INSTALLED_ASSETS + USE_LIBDIR = 1 +endif ifdef PGXS + USE_LIBDIR = 1 +endif +ifdef USE_LIBDIR LDFLAGS = -L$(libdir) else LDFLAGS = -L$(top_builddir)/src/port -L$(top_builddir)/src/common diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile index 41460a1..d235059 100644 --- a/src/interfaces/ecpg/Makefile +++ b/src/interfaces/ecpg/Makefile @@ -26,5 +26,8 @@ install-ecpglib-recurse: install-pgtypeslib-recurse clean distclean maintainer-clean: $(MAKE) -C test clean -check checktcp installcheck: +check checktcp: $(MAKE) -C test $@ + +installcheck: + USE_INSTALLED_ASSETS=1 $(MAKE) -C test $@ diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress index b3d7c1e..dbac870 100644 --- a/src/interfaces/ecpg/test/Makefile.regress +++ b/src/interfaces/ecpg/test/Makefile.regress @@ -1,18 +1,25 @@ # This file is included into the Makefiles of subdirectories of ecpg/test/, # so the file references have one more level of .. than you might expect. -override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \ - -I$(libpq_srcdir) $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) -override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(filter-out -l%, $(libpq)) $(LDFLAGS) override LIBS := -lecpg -lpgtypes $(filter -l%, $(libpq)) $(LIBS) $(PTHREAD_LIBS) -# Standard way to invoke the ecpg preprocessor +ifdef USE_INSTALLED_ASSETS +ECPG = '$(DESTDIR)$(bindir)/ecpg' --regression -I'$(DESTDIR)$(includedir)' \ + -I'$(DESTDIR)$(pkgincludedir)/informix/esql' +override CPPFLAGS := -I'$(DESTDIR)$(includedir)' \ + -I'$(DESTDIR)$(pkgincludedir)/informix/esql' $(CPPFLAGS) +else ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir) +ECPG_DEP = ../../preproc/ecpg$(X) +override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \ + -I$(libpq_srcdir) $(CPPFLAGS) +override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(filter-out -l%, $(libpq)) $(LDFLAGS) +endif # Files that most or all ecpg preprocessor test outputs depend on -ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \ +ECPG_TEST_DEPENDENCIES = $(ECPG_DEP) \ $(srcdir)/../regression.h \ $(srcdir)/../../include/sqlca.h \ $(srcdir)/../../include/sqlda.h \ diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index c27004e..982e2b2 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -271,6 +271,7 @@ endif # against installed postmaster ifndef NO_INSTALLCHECK +installcheck: export USE_INSTALLED_ASSETS=1 installcheck: submake $(REGRESS_PREP) $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS) endif diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile index c3c8280..ef90762 100644 --- a/src/test/isolation/Makefile +++ b/src/test/isolation/Makefile @@ -9,12 +9,21 @@ subdir = src/test/isolation top_builddir = ../../.. include $(top_builddir)/src/Makefile.global +# we need to build these libs only when we don't use installed ones +ifndef USE_INSTALLED_ASSETS +SUBMAKE_LIBPGPORT = submake-libpgport +SUBMAKE_LIBPQ = submake-libpq +endif + override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS) OBJS = specparse.o isolationtester.o $(WIN32RES) all: isolationtester$(X) pg_isolation_regress$(X) +installed_all: + USE_INSTALLED_ASSETS=1 $(MAKE) all + # Though we don't install these binaries, build them during installation # (including temp-install). Otherwise, "make -j check-world" and "make -j # installcheck-world" would spawn multiple, concurrent builds in this @@ -31,7 +40,7 @@ pg_regress.o: | submake-regress pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ -isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport +isolationtester$(X): $(OBJS) | $(SUBMAKE_LIBPQ) $(SUBMAKE_LIBPGPORT) $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ distprep: specparse.c specscanner.c @@ -49,7 +58,7 @@ clean distclean: maintainer-clean: distclean rm -f specparse.c specscanner.c -installcheck: all +installcheck: installed_all $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule check: all diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index 3ab5d7c..068cd8e 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -28,6 +28,11 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \ '-DSHELLPROG="$(SHELL)"' \ '-DDLSUFFIX="$(DLSUFFIX)"' +# we need to build libpgport only when we don't use installed libs +ifndef USE_INSTALLED_ASSETS +SUBMAKE_LIBPGPORT = submake-libpgport +endif + ## ## Prepare for tests ## @@ -36,9 +41,13 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \ all: pg_regress$(X) -pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport +pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | $(SUBMAKE_LIBPGPORT) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ +.PHONY: installed_all +installed_all: + USE_INSTALLED_ASSETS=1 $(MAKE) all + # dependencies ensure that path changes propagate 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) @@ -107,7 +116,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-generated-headers +submake-contrib-spi: | $(SUBMAKE_LIBPGPORT) submake-generated-headers $(MAKE) -C $(top_builddir)/contrib/spi .PHONY: submake-contrib-spi @@ -132,16 +141,16 @@ check: all tablespace-setup check-tests: all tablespace-setup | temp-install $(pg_regress_check) $(REGRESS_OPTS) $(MAXCONNOPT) $(TESTS) $(EXTRA_TESTS) -installcheck: all tablespace-setup +installcheck: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS) -installcheck-parallel: all tablespace-setup +installcheck-parallel: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS) -installcheck-tests: all tablespace-setup +installcheck-tests: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) $(TESTS) $(EXTRA_TESTS) -standbycheck: all +standbycheck: installed_all $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/standby_schedule --use-existing # old interfaces follow... --------------1E250D86A106DA900B4A1BFA Content-Type: text/x-patch; name="make-checkinstall-master.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="make-checkinstall-master.patch" diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 2529202..6604115 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -244,7 +244,13 @@ CPPFLAGS = @CPPFLAGS@ override CPPFLAGS := $(ICU_CFLAGS) $(CPPFLAGS) +ifdef USE_INSTALLED_ASSETS +USE_INCLUDEDIR = 1 +endif ifdef PGXS +USE_INCLUDEDIR = 1 +endif +ifdef USE_INCLUDEDIR override CPPFLAGS := -I$(includedir_server) -I$(includedir_internal) $(CPPFLAGS) else # not PGXS override CPPFLAGS := -I$(top_srcdir)/src/include $(CPPFLAGS) @@ -305,7 +311,13 @@ with_gnu_ld = @with_gnu_ld@ # "LDFLAGS := something" anywhere, ditto for LDFLAGS_INTERNAL. # These initial assignments must be "=" type, and elsewhere we must only do # "LDFLAGS += something" or "LDFLAGS_INTERNAL += something". +ifdef USE_INSTALLED_ASSETS + USE_LIBDIR = 1 +endif ifdef PGXS + USE_LIBDIR = 1 +endif +ifdef USE_LIBDIR LDFLAGS_INTERNAL = -L$(libdir) else LDFLAGS_INTERNAL = -L$(top_builddir)/src/port -L$(top_builddir)/src/common diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile index 41460a1..d235059 100644 --- a/src/interfaces/ecpg/Makefile +++ b/src/interfaces/ecpg/Makefile @@ -26,5 +26,8 @@ install-ecpglib-recurse: install-pgtypeslib-recurse clean distclean maintainer-clean: $(MAKE) -C test clean -check checktcp installcheck: +check checktcp: $(MAKE) -C test $@ + +installcheck: + USE_INSTALLED_ASSETS=1 $(MAKE) -C test $@ diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress index 06c0461..c11198f 100644 --- a/src/interfaces/ecpg/test/Makefile.regress +++ b/src/interfaces/ecpg/test/Makefile.regress @@ -1,19 +1,27 @@ # This file is included into the Makefiles of subdirectories of ecpg/test/, # so the file references have one more level of .. than you might expect. -override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \ - -I$(libpq_srcdir) $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) -LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq) - override LIBS += $(PTHREAD_LIBS) -# Standard way to invoke the ecpg preprocessor +ifdef USE_INSTALLED_ASSETS +ECPG = '$(DESTDIR)$(bindir)/ecpg' --regression -I'$(DESTDIR)$(includedir)' \ + -I'$(DESTDIR)$(pkgincludedir)/informix/esql' +override CPPFLAGS := -I'$(DESTDIR)$(includedir)' \ + -I'$(DESTDIR)$(pkgincludedir)/informix/esql' $(CPPFLAGS) +LDFLAGS_INTERNAL += -lecpg -lpgtypes $(libpq) +else ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir) +ECPG_DEP = ../../preproc/ecpg$(X) +override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \ + -I$(libpq_srcdir) $(CPPFLAGS) +override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(filter-out -l%, $(libpq)) $(LDFLAGS) +LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq) +endif # Files that most or all ecpg preprocessor test outputs depend on -ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \ +ECPG_TEST_DEPENDENCIES = $(ECPG_DEP) \ $(srcdir)/../regression.h \ $(srcdir)/../../include/sqlca.h \ $(srcdir)/../../include/sqlda.h \ diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index bfae02f..f4154f8 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -298,6 +298,7 @@ endif # against installed postmaster ifndef NO_INSTALLCHECK +installcheck: export USE_INSTALLED_ASSETS=1 installcheck: submake $(REGRESS_PREP) $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS) endif diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile index c3c8280..ef90762 100644 --- a/src/test/isolation/Makefile +++ b/src/test/isolation/Makefile @@ -9,12 +9,21 @@ subdir = src/test/isolation top_builddir = ../../.. include $(top_builddir)/src/Makefile.global +# we need to build these libs only when we don't use installed ones +ifndef USE_INSTALLED_ASSETS +SUBMAKE_LIBPGPORT = submake-libpgport +SUBMAKE_LIBPQ = submake-libpq +endif + override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS) OBJS = specparse.o isolationtester.o $(WIN32RES) all: isolationtester$(X) pg_isolation_regress$(X) +installed_all: + USE_INSTALLED_ASSETS=1 $(MAKE) all + # Though we don't install these binaries, build them during installation # (including temp-install). Otherwise, "make -j check-world" and "make -j # installcheck-world" would spawn multiple, concurrent builds in this @@ -31,7 +40,7 @@ pg_regress.o: | submake-regress pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ -isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport +isolationtester$(X): $(OBJS) | $(SUBMAKE_LIBPQ) $(SUBMAKE_LIBPGPORT) $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ distprep: specparse.c specscanner.c @@ -49,7 +58,7 @@ clean distclean: maintainer-clean: distclean rm -f specparse.c specscanner.c -installcheck: all +installcheck: installed_all $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule check: all diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index 378bd01..343bcdd 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -28,6 +28,11 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \ '-DSHELLPROG="$(SHELL)"' \ '-DDLSUFFIX="$(DLSUFFIX)"' +# we need to build libpgport only when we don't use installed libs +ifndef USE_INSTALLED_ASSETS +SUBMAKE_LIBPGPORT = submake-libpgport +endif + ## ## Prepare for tests ## @@ -36,9 +41,13 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \ all: pg_regress$(X) -pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport +pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | $(SUBMAKE_LIBPGPORT) $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ +.PHONY: installed_all +installed_all: + USE_INSTALLED_ASSETS=1 $(MAKE) all + # dependencies ensure that path changes propagate 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) @@ -109,7 +118,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-generated-headers +submake-contrib-spi: | $(SUBMAKE_LIBPGPORT) submake-generated-headers $(MAKE) -C $(top_builddir)/contrib/spi .PHONY: submake-contrib-spi @@ -134,16 +143,16 @@ check: all tablespace-setup check-tests: all tablespace-setup | temp-install $(pg_regress_check) $(REGRESS_OPTS) $(MAXCONNOPT) $(TESTS) $(EXTRA_TESTS) -installcheck: all tablespace-setup +installcheck: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS) -installcheck-parallel: all tablespace-setup +installcheck-parallel: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS) -installcheck-tests: all tablespace-setup +installcheck-tests: installed_all tablespace-setup $(pg_regress_installcheck) $(REGRESS_OPTS) $(TESTS) $(EXTRA_TESTS) -standbycheck: all +standbycheck: installed_all $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/standby_schedule --use-existing # old interfaces follow... --------------1E250D86A106DA900B4A1BFA--