crankshaft/Makefile.global

24 lines
827 B
Makefile
Raw Permalink Normal View History

SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
EXTENSION = crankshaft
PACKAGE = crankshaft
EXTVERSION = $(shell grep default_version $(SELF_DIR)/src/pg/$(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
RELEASE_VERSION ?= $(EXTVERSION)
2019-12-19 22:22:44 +08:00
SED = sed
AWK = awk
2019-12-19 22:22:44 +08:00
PG_CONFIG = pg_config
2019-12-19 22:22:44 +08:00
PG_VERSION_1000 := $(shell $(PG_CONFIG) --version | $(AWK) '{$$2*=1000; print $$2}')
PG_PARALLEL := $(shell [ $(PG_VERSION_1000) -ge 9600 ] && echo true)
PG_12plus := $(shell [ $(PG_VERSION_1000) -ge 12000 ] && echo true)
PYTHON3 ?= $(PG_12plus)
ifeq ($(PYTHON3), true)
PIP := python3 -m pip
2019-12-19 23:58:35 +08:00
NOSETESTS = nosetests3
2019-12-19 22:22:44 +08:00
else
PIP := python2 -m pip
2019-12-19 23:58:35 +08:00
NOSETESTS = nosetests
2019-12-19 22:22:44 +08:00
endif