9898EXTRA_CLEAN += $(_IN_PATCHED )
9999all : $(_IN_PATCHED ) sql/pgtap.sql sql/uninstall_pgtap.sql sql/pgtap-core.sql sql/pgtap-schema.sql
100100
101- # Add extension build targets on 9.1 and up.
102- ifeq ($(shell echo $(VERSION ) | grep -qE "^(8[.]|9[.]0) " && echo no || echo yes),yes)
101+ # Add extension build targets.
103102all : sql/$(MAINEXT ) --$(EXTVERSION ) .sql sql/$(MAINEXT ) -core--$(EXTVERSION ) .sql sql/$(MAINEXT ) -schema--$(EXTVERSION ) .sql
104103
105104sql/$(MAINEXT ) --$(EXTVERSION ) .sql : sql/$(MAINEXT ) .sql
@@ -113,10 +112,6 @@ sql/$(MAINEXT)-schema--$(EXTVERSION).sql: sql/$(MAINEXT)-schema.sql
113112
114113# sort is necessary to remove dupes so install won't complain
115114DATA = $(sort $(wildcard sql/* --* .sql) $(BASE_FILES ) $(VERSION_FILES ) $(_IN_PATCHED ) )
116- else
117- # No extension support, just install the base files.
118- DATA = $(BASE_FILES )
119- endif
120115
121116# Load PGXS now that we've set all the variables it might need.
122117ifdef NO_PGXS
@@ -131,17 +126,17 @@ endif
131126#
132127
133128# Row security policy tests not supported by 9.4 and earlier.
134- ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01234]|8[.] " && echo yes || echo no) ,yes)
129+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01234]" && echo yes || echo no) ,yes)
135130EXCLUDE_TEST_FILES += test/sql/policy.sql
136131endif
137132
138133# Partition tests tests not supported by 9.x and earlier.
139- ifeq ($(shell echo $(VERSION ) | grep -qE "^[89] [.]" && echo yes || echo no) ,yes)
134+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9 [.]" && echo yes || echo no) ,yes)
140135EXCLUDE_TEST_FILES += test/sql/partitions.sql
141136endif
142137
143- # Stored procecures not supported prior to Postgres 11.
144- ifeq ($(shell echo $(VERSION ) | grep -qE "^([89] |10) [.]" && echo yes || echo no),yes)
138+ # Stored procedures not supported prior to Postgres 11.
139+ ifeq ($(shell echo $(VERSION ) | grep -qE "^(9 |10) [.]" && echo yes || echo no),yes)
145140EXCLUDE_TEST_FILES += test/sql/proctap.sql
146141endif
147142
@@ -207,16 +202,16 @@ uninstall-all:
207202# VERSION = 9.1.0 # Uncomment to test all patches.
208203sql/pgtap.sql : sql/pgtap.sql.in
209204 cp $< $@
210- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][0123456]|8[.][1234]) " && echo yes || echo no),yes)
205+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][0123456]" && echo yes || echo no) ,yes)
211206 patch -p0 < compat/install-9.6.patch
212207endif
213- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][01234]|8[.][1234]) " && echo yes || echo no),yes)
208+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01234]" && echo yes || echo no) ,yes)
214209 patch -p0 < compat/install-9.4.patch
215210endif
216- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][012]|8[.][1234]) " && echo yes || echo no),yes)
211+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][012]" && echo yes || echo no) ,yes)
217212 patch -p0 < compat/install-9.2.patch
218213endif
219- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][01]|8[.][1234]) " && echo yes || echo no),yes)
214+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01]" && echo yes || echo no) ,yes)
220215 patch -p0 < compat/install-9.1.patch
221216endif
222217 sed -e 's,MODULE_PATHNAME,pgtap,g' -e 's,__OS__,$(OSNAME),g' -e 's,__VERSION__,$(NUMVERSION),g' sql/pgtap.sql > sql/pgtap.tmp
@@ -226,35 +221,35 @@ endif
226221EXTRA_CLEAN += sql/pgtap--0.99.0--1.0.0.sql
227222sql/pgtap--0.99.0--1.0.0.sql : sql/pgtap--0.99.0--1.0.0.sql.in
228223 cp $< $@
229- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][01234]|8[.][1234]) " && echo yes || echo no),yes)
224+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01234]|" && echo yes || echo no) ,yes)
230225 patch -p0 < compat/9.4/pgtap--0.99.0--1.0.0.patch
231226endif
232227
233228EXTRA_CLEAN += sql/pgtap--0.98.0--0.99.0.sql
234229sql/pgtap--0.98.0--0.99.0.sql : sql/pgtap--0.98.0--0.99.0.sql.in
235230 cp $< $@
236- ifeq ($(shell echo $(VERSION ) | grep -qE "^([89] |10) [.]" && echo yes || echo no),yes)
231+ ifeq ($(shell echo $(VERSION ) | grep -qE "^(9 |10) [.]" && echo yes || echo no),yes)
237232 patch -p0 < compat/10/pgtap--0.98.0--0.99.0.patch
238233endif
239234
240235EXTRA_CLEAN += sql/pgtap--0.97.0--0.98.0.sql
241236sql/pgtap--0.97.0--0.98.0.sql : sql/pgtap--0.97.0--0.98.0.sql.in
242237 cp $< $@
243- ifeq ($(shell echo $(VERSION ) | grep -qE "^[89] [.]" && echo yes || echo no) ,yes)
238+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9 [.]" && echo yes || echo no) ,yes)
244239 patch -p0 < compat/9.6/pgtap--0.97.0--0.98.0.patch
245240endif
246241
247242EXTRA_CLEAN += sql/pgtap--0.96.0--0.97.0.sql
248243sql/pgtap--0.96.0--0.97.0.sql : sql/pgtap--0.96.0--0.97.0.sql.in
249244 cp $< $@
250- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][01234]|8[.][1234]) " && echo yes || echo no),yes)
245+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][01234]" && echo yes || echo no) ,yes)
251246 patch -p0 < compat/9.4/pgtap--0.96.0--0.97.0.patch
252247endif
253248
254249EXTRA_CLEAN += sql/pgtap--0.95.0--0.96.0.sql
255250sql/pgtap--0.95.0--0.96.0.sql : sql/pgtap--0.95.0--0.96.0.sql.in
256251 cp $< $@
257- ifeq ($(shell echo $(VERSION ) | grep -qE "^( 9[.][012]|8[.][1234]) " && echo yes || echo no),yes)
252+ ifeq ($(shell echo $(VERSION ) | grep -qE "^9[.][012]" && echo yes || echo no) ,yes)
258253 patch -p0 < compat/9.2/pgtap--0.95.0--0.96.0.patch
259254endif
260255
@@ -471,7 +466,7 @@ updatecheck_deps: pgtap-version-$(UPDATE_FROM) test/sql/update.sql
471466# TODO: find something that can generically compare majors (ie: GE91 from
472467# https://github.com/decibel/pgxntool/blob/0.1.10/base.mk).
473468updatecheck_setup : updatecheck_deps
474- @if echo $(VERSION ) | grep -qE " 8[.]| 9[.][012]" ; then echo " updatecheck is not supported prior to 9.3" ; exit 1; fi
469+ @if echo $(VERSION ) | grep -qE " ^ 9[.][012]" ; then echo " updatecheck is not supported prior to 9.3" ; exit 1; fi
475470 $(eval SETUP_SCH = test/schedule/update.sch)
476471 $(eval REGRESS_OPTS += --launcher "tools/psql_args.sh -v 'old_ver=$(UPDATE_FROM ) ' -v 'new_ver=$(EXTVERSION ) '")
477472 @echo
0 commit comments