forked from orioledb/orioledb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
289 lines (256 loc) · 7.66 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# contrib/orioledb/Makefile
MODULE_big = orioledb
EXTENSION = orioledb
DATA = orioledb--1.0.sql
PGFILEDESC = "orioledb - orioledb transactional storage engine via TableAm"
SHLIB_LINK += -lzstd
EXTRA_CLEAN = include/utils/stopevents_defs.h \
include/utils/stopevents_data.h
OBJS = src/btree/btree.o \
src/btree/build.o \
src/btree/check.o \
src/btree/find.o \
src/btree/insert.o \
src/btree/io.o \
src/btree/iterator.o \
src/btree/merge.o \
src/btree/modify.o \
src/btree/page_chunks.o \
src/btree/page_contents.o \
src/btree/page_state.o \
src/btree/print.o \
src/btree/scan.o \
src/btree/split.o \
src/btree/undo.o \
src/catalog/ddl.o \
src/catalog/free_extents.o \
src/catalog/indices.o \
src/catalog/o_aggregate_cache.o \
src/catalog/o_amop_cache.o \
src/catalog/o_amproc_cache.o \
src/catalog/o_class_cache.o \
src/catalog/o_enum_cache.o \
src/catalog/o_collation_cache.o \
src/catalog/o_database_cache.o \
src/catalog/o_indices.o \
src/catalog/o_operator_cache.o \
src/catalog/o_opclass_cache.o \
src/catalog/o_proc_cache.o \
src/catalog/o_range_cache.o \
src/catalog/o_sys_cache.o \
src/catalog/o_tables.o \
src/catalog/o_type_cache.o \
src/catalog/sys_trees.o \
src/checkpoint/checkpoint.o \
src/orioledb.o \
src/recovery/recovery.o \
src/recovery/wal.o \
src/recovery/worker.o \
src/tableam/bitmap_scan.o \
src/tableam/descr.o \
src/tableam/func.o \
src/tableam/handler.o \
src/tableam/index_scan.o \
src/tableam/key_range.o \
src/tableam/key_bitmap.o \
src/tableam/operations.o \
src/tableam/scan.o \
src/tableam/tree.o \
src/transam/undo.o \
src/transam/oxid.o \
src/tuple/format.o \
src/tuple/toast.o \
src/tuple/slot.o \
src/tuple/sort.o \
src/workers/bgwriter.o \
src/utils/compress.o \
src/utils/o_buffers.o \
src/utils/page_pool.o \
src/utils/planner.o \
src/utils/seq_buf.o \
src/utils/stopevent.o \
src/utils/ucm.o \
$(WIN32RES)
REGRESSCHECKS = btree_sys_check \
alter_type \
bitmap_scan \
btree_compression \
btree_print \
collate \
createas \
ddl \
explain \
foreign_keys \
generated \
getsomeattrs \
indices \
indices_build \
inherits \
ioc \
joins \
opclass \
parallel_scan \
partial \
partition \
primary_key \
row_level_locks \
subquery \
subtransactions \
tableam \
toast \
trigger \
types
ISOLATIONCHECKS = bitmap_hist_scan \
btree_iterate \
btree_print_backend_id \
concurrent_update_delete \
fkeys \
included \
insert_fails \
ioc_deadlock \
ioc_lost_update \
isol_ddl \
isol_rc \
isol_rr \
isol_rr_bscan \
isol_rr_seqscan \
load_refind_page \
merge \
partition_move \
rightlink \
rll \
rll_deadlock \
rll_mix \
rll_subtrans \
table_lock_test \
uniq
TESTGRESCHECKS_PART_1 = t/checkpointer_test.py \
t/eviction_bgwriter_test.py \
t/eviction_compression_test.py \
t/eviction_test.py \
t/file_operations_test.py \
t/files_test.py \
t/incomplete_split_test.py \
t/merge_test.py \
t/o_tables_test.py \
t/o_tables_2_test.py \
t/recovery_test.py \
t/recovery_opclass_test.py \
t/recovery_worker_test.py \
t/replication_test.py \
t/types_test.py \
t/undo_eviction_test.py \
t/toast_index_test.py
TESTGRESCHECKS_PART_2 = t/checkpoint_concurrent_test.py \
t/checkpoint_eviction_test.py \
t/checkpoint_same_trx_test.py \
t/checkpoint_split1_test.py \
t/checkpoint_split2_test.py \
t/checkpoint_split3_test.py \
t/checkpoint_update_compress_test.py \
t/checkpoint_update_test.py \
t/ddl_test.py \
t/eviction_full_memory_test.py \
t/include_indices_test.py \
t/indices_build_test.py \
t/not_supported_yet_test.py \
t/parallel_test.py \
t/reindex_test.py \
t/schema_test.py \
t/trigger_test.py \
t/vacuum_test.py
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
override PG_CPPFLAGS += -I$(CURDIR)/include
include $(PGXS)
ifeq ($(shell expr $(MAJORVERSION) \>= 14), 1)
REGRESSCHECKS += toast_column_compress
endif
ifeq ($(shell expr $(MAJORVERSION) \>= 15), 1)
TESTGRESCHECKS_PART_2 += t/merge_into_test.py
ISOLATIONCHECKS += isol_merge
endif
regresscheck: | install
$(pg_regress_check) \
--temp-config orioledb_regression.conf \
$(REGRESSCHECKS)
isolationcheck: | install
$(pg_isolation_regress_check) \
--temp-config orioledb_isolation.conf \
$(ISOLATIONCHECKS)
$(TESTGRESCHECKS_PART_1) $(TESTGRESCHECKS_PART_2): | install
$(with_temp_install) \
python3 -W ignore::DeprecationWarning -m unittest -v $@
installcheck: regresscheck isolationcheck testgrescheck
echo "All checks are successful!"
else
subdir = contrib/orioledb
top_builddir = ../..
override PG_CPPFLAGS += -I$(top_srcdir)/$(subdir)/include
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
regresscheck: | submake-regress submake-orioledb temp-install
$(pg_regress_check) \
--temp-config $(top_srcdir)/contrib/orioledb/orioledb_regression.conf \
$(REGRESSCHECKS)
isolationcheck: | submake-isolation submake-orioledb temp-install
$(pg_isolation_regress_check) \
--temp-config $(top_srcdir)/contrib/orioledb/orioledb_isolation.conf \
$(ISOLATIONCHECKS)
$(TESTGRESCHECKS_PART_1) $(TESTGRESCHECKS_PART_2): | submake-orioledb temp-install
PG_CONFIG="$(abs_top_builddir)/tmp_install$(bindir)/pg_config" \
$(with_temp_install) \
python3 -m unittest -v $@
check: regresscheck isolationcheck testgrescheck
echo "All checks are successful!"
endif
COMMIT_HASH = $(shell git rev-parse HEAD)
override CFLAGS_SL += -DCOMMIT_HASH=$(COMMIT_HASH)
ifdef VALGRIND
override with_temp_install += PGCTLTIMEOUT=1200 \
valgrind --leak-check=no --gen-suppressions=all \
--suppressions=valgrind.supp --time-stamp=yes \
--log-file=pid-%p.log --trace-children=yes \
--trace-children-skip=*/initdb
else
override with_temp_install += PGCTLTIMEOUT=900
endif
include/utils/stopevents_data.h: include/utils/stopevents_defs.h
include/utils/stopevents_defs.h: stopevents.txt stopevents_gen.py
python3 stopevents_gen.py
ifndef ORIOLEDB_PATCHSET_VERSION
ORIOLEDB_PATCHSET_VERSION=1
endif
CUR_ORIOLEDB_PATCHSET_VERSION := $(shell grep '^$(MAJORVERSION):' .pgtags | cut -d'_' -f2)
check_patchset_version:
@if [ $(CUR_ORIOLEDB_PATCHSET_VERSION) != $(ORIOLEDB_PATCHSET_VERSION) ]; then \
echo "Wrong orioledb patchset version:"\
"expected $(CUR_ORIOLEDB_PATCHSET_VERSION),"\
"got $(ORIOLEDB_PATCHSET_VERSION)"; \
echo "Rebuild and install patched orioledb/postgres using tag"\
"'patches$(MAJORVERSION)_$(CUR_ORIOLEDB_PATCHSET_VERSION)'"; \
false; \
fi
$(OBJS): include/utils/stopevents_defs.h check_patchset_version
submake-regress:
$(MAKE) -C $(top_builddir)/src/test/regress all
submake-isolation:
$(MAKE) -C $(top_builddir)/src/test/isolation all
submake-orioledb:
$(MAKE) -C $(top_builddir)/contrib/orioledb
testgrescheck: $(TESTGRESCHECKS_PART_1) $(TESTGRESCHECKS_PART_2)
testgrescheck_part_1: $(TESTGRESCHECKS_PART_1)
testgrescheck_part_2: $(TESTGRESCHECKS_PART_2)
temp-install: EXTRA_INSTALL=contrib/orioledb
orioledb.typedefs: $(OBJS)
./typedefs_gen.py
pgindent: orioledb.typedefs
pgindent --typedefs=orioledb.typedefs \
src/*.c \
src/*/*.c \
include/*.h \
include/*/*.h
.PHONY: submake-orioledb submake-regress check \
regresscheck isolationcheck testgrescheck pgindent \
$(TESTGRESCHECKS_PART_1) $(TESTGRESCHECKS_PART_2)