From 0f591481e2a4dec4c95e2c7806be213be7d45aad Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 18 Aug 2015 21:11:46 +0900 Subject: [PATCH] Follow the change of regression test framework. pg_regress no longer installs extra modules since 9.5. This commit makes Makefile to give --extra-install flag to pg_regress only when required. --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 933ed8c..d3ee851 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,12 @@ CHECKING=$(shell echo $(LAST_LIBPATH)| grep './tmp_check/install/' | wc -l) EXTENSION = pg_dbms_stats -REGRESS = init-common ut_fdw_init init-$(MAJORVERSION) ut-common \ - ut-$(MAJORVERSION) ut_imp_exp-$(MAJORVERSION) +REGRESS = init-common ut_fdw_init init-$(REGTESTVER) ut-common \ + ut-$(REGTESTVER) ut_imp_exp-$(REGTESTVER) +EXTRA_INSTALL = contrib/file_fdw -REGRESS_OPTS = --encoding=UTF8 --temp-config=regress.conf --extra-install=contrib/file_fdw +# Before 9.5 needs extra-install flag for pg_regress +REGRESS_OPTS = --encoding=UTF8 --temp-config=regress.conf $(if $(filter 0,$(shell test "$(MAJORVERSION)" \< "9.5"; echo $$?)),--extra-install=$(EXTRA_INSTALL)) DATA = pg_dbms_stats--1.3.6.sql pg_dbms_stats--1.0--1.3.2.sql pg_dbms_stats--1.3.2--1.3.3.sql pg_dbms_stats--1.3.3--1.3.4.sql pg_dbms_stats--1.3.4--1.3.5.sql pg_dbms_stats--1.3.5--1.3.6.sql @@ -55,9 +57,8 @@ include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif -ifeq "$(MAJORVERSION)" "9.5" -MAJORVERSION=9.4 -endif +# Some versions makes no difference in regard to regression test +REGTESTVER = $(if $(filter 0,$(shell test "$(MAJORVERSION)" \< "9.4"; echo $$?)),$(MAJORVERSION),9.4) TARSOURCES = Makefile *.c *.h \ $(EXTDIR)/pg_dbms_stats--*-9.*.sql \ @@ -73,7 +74,7 @@ rpms: rpm94 rpm93 rpm92 rpm91 sourcetar: $(STARBALL) -$(DATA): %.sql: $(EXTDIR)/%-$(MAJORVERSION).sql +$(DATA): %.sql: $(EXTDIR)/%-$(REGTESTVER).sql cp $< $@ $(STARBALLS): $(TARSOURCES) -- 2.11.0