EXTENSION = pgmemento EXTVERSION = $(shell grep default_version $(EXTENSION).control | \ sed -e "s/default_version[[:space:]]*=[[:space:]]*'\\([^']*\\)'/\\1/") TESTS = $(wildcard test/sql/*.sql) REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS)) REGRESS_OPTS = --inputdir=test --load-language=plpgsql DOCS = doc/README.pgmemento PG_CONFIG = pg_config PG96 = $(shell $(PG_CONFIG) --version | grep -qE " 8\\.| 9\\.0|9\\.1|9\\.2|9\\.3|9\\.4|9\\.5" && echo no || echo yes) ifeq ($(PG96),yes) all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql cp $< $@ DATA = $(wildcard sql/*--*.sql) EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql endif PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS)