forked from powa-team/pg_qualstats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (18 loc) · 849 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
EXTENSION = pg_qualstats
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
MODULES = $(patsubst %.c,%,$(wildcard *.c))
PG_CONFIG ?= pg_config
all:
release-zip: all
git archive --format zip --prefix=pg_qualstats-$(EXTVERSION)/ --output ./pg_qualstats-$(EXTVERSION).zip HEAD
unzip ./pg_qualstats-$(EXTVERSION).zip
rm ./pg_qualstats-$(EXTVERSION).zip
sed -i -e "s/__VERSION__/$(EXTVERSION)/g" ./pg_qualstats-$(EXTVERSION)/META.json
zip -r ./pg_qualstats-$(EXTVERSION).zip ./pg_qualstats-$(EXTVERSION)/
rm ./pg_qualstats-$(EXTVERSION) -rf
DATA = $(wildcard *--*.sql)
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)