Continue with the tweaking

This commit is contained in:
Raúl Marín 2019-12-19 17:41:40 +01:00
parent bc365acc01
commit 30ac9af1f9

View File

@ -14,8 +14,7 @@ DATA = \
$(EXTENSION)--dev.sql \
$(EXTENSION)--current--dev.sql \
$(EXTENSION)--dev--current.sql \
$(EXTENSION)--$(RELEASE_VERSION)--dev.sql \
$(EXTENSION).control
$(EXTENSION)--$(RELEASE_VERSION)--dev.sql
SOURCES_DATA_DIR = sql
SOURCES_DATA = $(wildcard $(SOURCES_DATA_DIR)/*.sql)
@ -25,6 +24,12 @@ ifneq ($(PYTHON3), true)
REPLACEMENTS = -e 's/@@VERSION@@/$(EXTVERSION)/g' -e 's/plpython3u/plpythonu/g'
endif
.PHONY: $(EXTENSION).control
$(EXTENSION).control:
$(eval TMPFILE := $(shell mktemp /tmp/$@.XXXXXXXXXX))
$(SED) $(REPLACEMENTS) $@ > $(TMPFILE)
mv $(TMPFILE) $@
$(DATA): $(SOURCES_DATA)
$(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > $@
ifneq ($(PG_PARALLEL), true)
@ -46,13 +51,14 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
# This seems to be needed at least for PG 9.3.11
all: $(DATA)
all: $(DATA) $(EXTENSION).control
test: export PGUSER=postgres
test: installcheck
# Release tasks
.PHONY ../../release/$(EXTENSION).control: $(EXTENSION).control
.PHONY: ../../release/$(EXTENSION).control
../../release/$(EXTENSION).control: $(EXTENSION).control
cp $< $@
# Prepare new release from the currently installed development version,