|
2 | 2 |
|
3 | 3 | MODULE_big = pg_pathman
|
4 | 4 |
|
5 |
| -ifdef USE_PGXS |
6 |
| -PG_CONFIG = pg_config |
7 |
| -VNUM := $(shell $(PG_CONFIG) --version | awk '{print $$2}') |
8 |
| -ifeq ($(VNUM),$(filter 10% 11%,$(VNUM))) |
9 |
| - EXTRA_REGRESS = pathman_declarative |
10 |
| - EXTRA_OBJS = src/declarative.o |
11 |
| -endif |
12 |
| -endif |
13 |
| -include $(PGXS) |
14 |
| - |
15 | 5 | OBJS = src/init.o src/relation_info.o src/utils.o src/partition_filter.o \
|
16 | 6 | src/runtime_append.o src/runtime_merge_append.o src/pg_pathman.o src/rangeset.o \
|
17 | 7 | src/pl_funcs.o src/pl_range_funcs.o src/pl_hash_funcs.o src/pathman_workers.o \
|
18 | 8 | src/hooks.o src/nodes_common.o src/xact_handling.o src/utility_stmt_hooking.o \
|
19 | 9 | src/planner_tree_modification.o src/debug_print.o src/partition_creation.o \
|
20 | 10 | src/compat/pg_compat.o src/compat/rowmarks_fix.o src/partition_router.o \
|
21 |
| - src/partition_overseer.o $(EXTRA_OBJS) $(WIN32RES) |
| 11 | + src/partition_overseer.o $(WIN32RES) |
22 | 12 |
|
23 | 13 | ifdef USE_PGXS
|
24 | 14 | override PG_CPPFLAGS += -I$(CURDIR)/src/include
|
@@ -70,24 +60,45 @@ REGRESS = pathman_array_qual \
|
70 | 60 | pathman_update_triggers \
|
71 | 61 | pathman_upd_del \
|
72 | 62 | pathman_utility_stmt \
|
73 |
| - pathman_views $(EXTRA_REGRESS) |
| 63 | + pathman_views |
74 | 64 |
|
75 | 65 |
|
76 | 66 | EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/conf.add
|
77 | 67 |
|
78 | 68 | EXTRA_CLEAN = pg_pathman--$(EXTVERSION).sql ./isolation_output
|
79 | 69 |
|
80 | 70 | ifdef USE_PGXS
|
81 |
| -PG_CONFIG = pg_config |
| 71 | +PG_CONFIG=pg_config |
82 | 72 | PGXS := $(shell $(PG_CONFIG) --pgxs)
|
83 |
| -include $(PGXS) |
| 73 | +VNUM := $(shell $(PG_CONFIG) --version | awk '{print $$2}') |
84 | 74 | else
|
85 | 75 | subdir = contrib/pg_pathman
|
86 | 76 | top_builddir = ../..
|
87 | 77 | include $(top_builddir)/src/Makefile.global
|
| 78 | +endif |
| 79 | + |
| 80 | +# our standard version could also use declarative syntax |
| 81 | +ifdef PGPRO_EDITION |
| 82 | +ifeq ($(PGPRO_EDITION),standard) |
| 83 | +VNUM := $(VERSION) |
| 84 | +endif |
| 85 | +endif |
| 86 | + |
| 87 | +ifdef VNUM |
| 88 | +ifeq ($(VNUM),$(filter 10% 11%,$(VNUM))) |
| 89 | +REGRESS += pathman_declarative |
| 90 | +OBJS += src/declarative.o |
| 91 | +override PG_CPPFLAGS += -DENABLE_DECLARATIVE |
| 92 | +endif |
| 93 | +endif |
| 94 | + |
| 95 | +ifdef USE_PGXS |
| 96 | +include $(PGXS) |
| 97 | +else |
88 | 98 | include $(top_srcdir)/contrib/contrib-global.mk
|
89 | 99 | endif
|
90 | 100 |
|
| 101 | + |
91 | 102 | $(EXTENSION)--$(EXTVERSION).sql: init.sql hash.sql range.sql
|
92 | 103 | cat $^ > $@
|
93 | 104 |
|
|
0 commit comments