forked from pgroonga/pgroonga
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgroonga.mk
More file actions
85 lines (73 loc) · 2.21 KB
/
pgroonga.mk
File metadata and controls
85 lines (73 loc) · 2.21 KB
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
PACKAGES =
ifdef HAVE_MSGPACK
ifdef MSGPACK_PACKAGE_NAME
PACKAGES += $(MSGPACK_PACKAGE_NAME)
else
PACKAGES += msgpack
endif
endif
ifdef HAVE_XXHASH
PACKAGES += "libxxhash >= 0.8.0"
endif
MODULE_big = pgroonga
include makefiles/pgroonga-sources.mk
include makefiles/pgroonga-headers.mk
ifndef HAVE_XXHASH
SRCS += vendor/xxHash/xxhash.c
HEADERS += vendor/xxHash/xxhash.h
endif
OBJS = $(SRCS:.c=.o)
$(OBJS): $(HEADERS)
EXTENSION = pgroonga
SCRIPTS = \
tools/pgroonga-primary-maintainer.sh \
tools/systemd/pgroonga-generate-primary-maintainer-service.sh \
tools/systemd/pgroonga-generate-primary-maintainer-timer.sh
DATA = \
data/pgroonga--$(PGRN_VERSION).sql \
$(shell echo data/pgroonga--*--*.sql)
REGRESS = $(shell find sql -name '*.sql' | sed -E -e 's,(^sql/|\.sql$$),,g')
REGRESS_OPTS = --load-extension=pgroonga
ifdef HAVE_MSGPACK
PG_CPPFLAGS += -DPGRN_HAVE_MSGPACK
endif
ifndef HAVE_XXHASH
PG_CPPFLAGS += -Ivendor/xxHash
endif
include makefiles/pgrn-pgxs.mk
all: data/pgroonga--$(PGRN_VERSION).sql
data/pgroonga--$(PGRN_VERSION).sql: data/pgroonga.sql
@cp $< $@
RESULT_DIRS = $(shell find sql/* -type d | sed -E -e 's,^sql/,results/,')
EXPECTED_DIRS = $(shell find sql/* -type d | sed -E -e 's,^sql/,expected/,')
EXPECTED_FILES = \
$(shell find sql -name '*.sql' | \
sed -E -e 's,^sql/,expected/,' \
-E -e 's,sql$$,out,')
# installcheck: prepare-regress
installcheck: $(RESULT_DIRS)
installcheck: $(EXPECTED_DIRS)
installcheck: $(EXPECTED_FILES)
TMP_DIR = $(shell pwd)/tmp
SETUP_TMP_DIR = yes
prepare-regress:
@if [ $(SETUP_TMP_DIR) = "yes" ]; then \
rm -rf $(TMP_DIR)/space && \
mkdir -p $(TMP_DIR)/space; \
fi
@sed -e "s,@TMP_DIR@,$(TMP_DIR),g" \
sql/vacuum/tablespace.sql.in > \
sql/vacuum/tablespace.sql
@sed -e "s,@TMP_DIR@,$(TMP_DIR),g" \
expected/vacuum/tablespace.out.in > \
expected/vacuum/tablespace.out
@sed -e "s,@TMP_DIR@,$(TMP_DIR),g" \
sql/compatibility/schema/vacuum/tablespace.sql.in > \
sql/compatibility/schema/vacuum/tablespace.sql
@sed -e "s,@TMP_DIR@,$(TMP_DIR),g" \
expected/compatibility/schema/vacuum/tablespace.out.in > \
expected/compatibility/schema/vacuum/tablespace.out
$(RESULT_DIRS) $(EXPECTED_DIRS):
@mkdir -p $@
$(EXPECTED_FILES):
@touch $@