File: Makefile

package info (click to toggle)
postgresql-prioritize 1.0.4-1.3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 112 kB
  • ctags: 31
  • sloc: ansic: 88; makefile: 29; sql: 11; sh: 1
file content (26 lines) | stat: -rw-r--r-- 526 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
MODULES = prioritize
EXTENSION = $(MODULES)
EXTVERSION = 1.0
EXTSQL = $(MODULES)--$(EXTVERSION).sql

DATA_built = $(MODULES).sql
DATA = uninstall_$(MODULES).sql
DOCS = README.md
REGRESS = $(MODULES)

SQL_IN = $(MODULES).sql.in

USE_EXTENSION = $(shell pg_config --version | grep -qE " 8\.|9\.0" && echo no || echo yes)

ifeq ($(USE_EXTENSION),yes)
all: $(EXTSQL)

$(EXTSQL): $(EXTENSION).sql
	cp $< $@
DATA = $(EXTSQL)
EXTRA_CLEAN += $(EXTSQL)
endif

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)