-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
29 lines (22 loc) · 792 Bytes
/
Makefile
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
EXTENSION = external_file
EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
PGFILEDESC = "external_file - Propose Oracle BFILE compatibility for PostgreSQL"
PG_CONFIG = pg_config
PG91 = $(shell $(PG_CONFIG) --version | egrep " 8\.| 9\.0" > /dev/null && echo no || echo yes)
ifeq ($(PG91),yes)
DATA = $(wildcard updates/*--*.sql) $(EXTENSION)--$(EXTVERSION).sql
DOCS = README.external_file
SCRIPTS =
MODULES =
else
$(error Minimum version of PostgreSQL required is 9.1.0)
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
all: prepare_readme
prepare_readme: README.md
@echo "Prepare README.external_file"
cp README.md README.external_file
clean:
rm -f README.external_file