Fixing issue where makefile was not honoring PG's global makefiles when placed under the contrib folder.
parent
613318d542
commit
0393caec41
57
Makefile
57
Makefile
|
@ -17,50 +17,11 @@ REGRESS = basic version guc counters relations database error_insert application
|
||||||
# which typical installcheck users do not have (e.g. buildfarm clients).
|
# which typical installcheck users do not have (e.g. buildfarm clients).
|
||||||
# NO_INSTALLCHECK = 1
|
# NO_INSTALLCHECK = 1
|
||||||
|
|
||||||
|
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
PG_VERSION := $(shell pg_config --version | awk {'print $$1 $$2'})
|
PGSM_INPUT_SQL_VERSION := 1.0
|
||||||
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
|
|
||||||
TAP_TESTS = 1
|
|
||||||
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
|
|
||||||
TAP_TESTS = 1
|
|
||||||
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
|
ifdef USE_PGXS
|
||||||
|
MAJORVERSION := $(shell pg_config --version | awk {'print $$2'} | cut -f1 -d".")
|
||||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
include $(PGXS)
|
include $(PGXS)
|
||||||
else
|
else
|
||||||
|
@ -70,6 +31,20 @@ include $(top_builddir)/src/Makefile.global
|
||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(shell test $(MAJORVERSION) -gt 12; echo $$?),0)
|
||||||
|
PGSM_INPUT_SQL_VERSION := 1.0.${MAJORVERSION}
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(info Using pg_stat_monitor--${PGSM_INPUT_SQL_VERSION}.sql.in file to generate sql filea.)
|
||||||
|
|
||||||
|
ifneq (,$(wildcard ../pg_stat_monitor--${PGSM_INPUT_SQL_VERSION}.sql.in))
|
||||||
|
CP := $(shell cp -v ../pg_stat_monitor--${PGSM_INPUT_SQL_VERSION}.sql.in ../pg_stat_monitor--1.0.sql)
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard pg_stat_monitor--${PGSM_INPUT_SQL_VERSION}.sql.in))
|
||||||
|
CP := $(shell cp -v pg_stat_monitor--${PGSM_INPUT_SQL_VERSION}.sql.in pg_stat_monitor--1.0.sql)
|
||||||
|
endif
|
||||||
|
TAP_TESTS = 1
|
||||||
|
|
||||||
#NEEDTARGET = $(shell test $(VERSION_NUM) -lt 120000 && echo yes)
|
#NEEDTARGET = $(shell test $(VERSION_NUM) -lt 120000 && echo yes)
|
||||||
#ifeq ($(NEEDTARGET),yes)
|
#ifeq ($(NEEDTARGET),yes)
|
||||||
#installcheck:
|
#installcheck:
|
||||||
|
|
Loading…
Reference in New Issue