-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 879 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 879 Bytes
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
EXTENSION = pgrst_schema_cache
EXTVERSION = 1.0.0
DATA = $(wildcard sql/*--*.sql)
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --use-existing --inputdir=test
PG_CONFIG = pg_config
build: $(BUILD_DIR)/.gitignore
$(BUILD_DIR)/.gitignore: sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
mkdir -p $(BUILD_DIR)/extension
cp $(EXTENSION).control $(BUILD_DIR)/extension
cp sql/$(EXTENSION)--$(EXTVERSION).sql $(BUILD_DIR)/extension
echo "*" > $(BUILD_DIR)/.gitignore
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
$(EXTENSION).control: $(EXTENSION).control.in
sed "s/@EXTVERSION@/$(EXTVERSION)/g" $(EXTENSION).control.in > $@
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
.PHONY: test
test:
make installcheck