DISTPG-349 modified build script

pull/184/head
Vadim Yalovets 2021-12-01 21:30:14 +02:00 committed by Hamid Akhtar
parent da73cfb70b
commit 2a6cf2a354
1 changed files with 24 additions and 4 deletions

View File

@ -23,20 +23,40 @@ PG_VERSION := $(shell pg_config --version | awk {'print $$1 $$2'})
MAJOR := $(shell echo $(PG_VERSION) | sed -e 's/\.[^./]*$$//')
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
ifneq (,$(wildcard ../pg_stat_monitor--1.0.14.sql.in))
CP := $(shell cp ../pg_stat_monitor--1.0.14.sql.in ../pg_stat_monitor--1.0.sql)
endif
ifneq (,$(wildcard pg_stat_monitor--1.0.14.sql.in))
CP := $(shell cp pg_stat_monitor--1.0.14.sql.in pg_stat_monitor--1.0.sql)
endif
endif
ifneq (,$(findstring PostgreSQL13,$(MAJOR)))
ifneq (,$(wildcard ../pg_stat_monitor--1.0.13.sql.in))
CP := $(shell cp ../pg_stat_monitor--1.0.13.sql.in ../pg_stat_monitor--1.0.sql)
endif
ifneq (,$(wildcard pg_stat_monitor--1.0.13.sql.in))
CP := $(shell cp pg_stat_monitor--1.0.13.sql.in pg_stat_monitor--1.0.sql)
endif
endif
ifneq (,$(findstring PostgreSQL12,$(MAJOR)))
ifneq (,$(wildcard ../pg_stat_monitor--1.0.sql.in))
CP := $(shell cp ../pg_stat_monitor--1.0.sql.in ../pg_stat_monitor--1.0.sql)
endif
ifneq (,$(wildcard pg_stat_monitor--1.0.sql.in))
CP := $(shell cp pg_stat_monitor--1.0.sql.in pg_stat_monitor--1.0.sql)
endif
endif
ifneq (,$(findstring PostgreSQL11,$(MAJOR)))
ifneq (,$(wildcard ../pg_stat_monitor--1.0.sql.in))
CP := $(shell cp ../pg_stat_monitor--1.0.sql.in ../pg_stat_monitor--1.0.sql)
endif
ifneq (,$(wildcard pg_stat_monitor--1.0.sql.in))
CP := $(shell cp pg_stat_monitor--1.0.sql.in pg_stat_monitor--1.0.sql)
endif
endif
ifdef USE_PGXS
PGXS := $(shell $(PG_CONFIG) --pgxs)