File: Makefile

package info (click to toggle)
postgresql-prioritize 1.0.4-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 120 kB
  • sloc: ansic: 88; makefile: 22; sql: 11; sh: 1
file content (26 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (4)
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)