File: Makefile

package info (click to toggle)
powa-archivist 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,184 kB
  • sloc: sql: 18,289; ansic: 435; makefile: 34; sh: 4
file content (33 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (2)
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    = powa
EXTVERSION   = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
TESTS        = $(wildcard sql/*.sql)
REGRESS      = $(patsubst sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test

PG_CONFIG ?= pg_config

MODULES = powa

all:

release-zip: all
	git archive --format zip --prefix=powa-${EXTVERSION}/ --output ./powa-${EXTVERSION}.zip HEAD
	unzip ./powa-$(EXTVERSION).zip
	rm ./powa-$(EXTVERSION).zip
	rm ./powa-$(EXTVERSION)/.gitignore
	rm ./powa-$(EXTVERSION)/reindent.sh
	sed -i -e "s/__VERSION__/$(EXTVERSION)/g"  ./powa-$(EXTVERSION)/META.json
	zip -r ./powa-$(EXTVERSION).zip ./powa-$(EXTVERSION)/
	rm ./powa-$(EXTVERSION) -rf

DATA = $(wildcard *--*.sql)

ifdef NO_PGXS
subdir = contrib/$(MODULE)
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
else
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
endif