-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
65 lines (53 loc) · 1.74 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# contrib/pg_query_state/Makefile
MODULE_big = pg_query_state
OBJS = pg_query_state.o signal_handler.o $(WIN32RES)
EXTENSION = pg_query_state
EXTVERSION = 1.1
DATA = pg_query_state--1.0--1.1.sql
DATA_built = $(EXTENSION)--$(EXTVERSION).sql
PGFILEDESC = "pg_query_state - facility to track progress of plan execution"
EXTRA_CLEAN = ./isolation_output $(EXTENSION)--$(EXTVERSION).sql \
Dockerfile ./tests/*.pyc ./tmp_stress
ISOLATION = corner_cases
#
# PG11 doesn't support ISOLATION_OPTS variable. We have to use
# "CREATE/DROP EXTENTION" command in spec.
#
# One day, when we'll get rid of PG11, it will be possible to uncomment this
# variable and remove "CREATE EXTENTION" from spec.
#
# ISOLATION_OPTS = --load-extension=pg_query_state
ifdef USE_PGXS
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/pg_query_state
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
# need this to provide make check in case of "in source" build
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/test.conf
endif
$(EXTENSION)--$(EXTVERSION).sql: init.sql
cat $^ > $@
#
# Make conditional targets to save backward compatibility with PG11.
#
ifeq ($(MAJORVERSION),11)
ISOLATIONCHECKS = corner_cases
check: isolationcheck
installcheck: submake-isolation
$(MKDIR_P) isolation_output
$(pg_isolation_regress_installcheck) \
--outputdir=isolation_output \
$(ISOLATIONCHECKS)
isolationcheck: | submake-isolation temp-install
$(MKDIR_P) isolation_output
$(pg_isolation_regress_check) \
--outputdir=isolation_output \
$(ISOLATIONCHECKS)
submake-isolation:
$(MAKE) -C $(top_builddir)/src/test/isolation all
temp-install: EXTRA_INSTALL=contrib/pg_query_state
endif