From 481dbdfe3ed9e2f1622f5855e0b326fb6108ddb2 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Mon, 26 Mar 2018 13:24:34 +0200 Subject: [PATCH] Some more changes in the Make file - Dont destroy upgrade/downgrade files - Only remove the current version file which could be regenerated - Added PHONY tags --- geocoder/extension/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geocoder/extension/Makefile b/geocoder/extension/Makefile index ff51d20..c5bc866 100644 --- a/geocoder/extension/Makefile +++ b/geocoder/extension/Makefile @@ -4,8 +4,7 @@ EXTENSION = cdb_geocoder EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") NEW_EXTENSION_ARTIFACT = $(EXTENSION)--$(EXTVERSION).sql -DATA = $(NEW_EXTENSION_ARTIFACT) \ - $(EXTENSION)--*--*.sql +DATA = $(NEW_EXTENSION_ARTIFACT) REGRESS = $(notdir $(basename $(sort $(wildcard test/sql/*test.sql)))) TEST_DIR = test/ @@ -16,15 +15,16 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) - SOURCES_DATA = $(wildcard sql/*.sql) $(NEW_EXTENSION_ARTIFACT): $(SOURCES_DATA) - find . -type f -regex '.*$(EXTENSION)--[0-9]\.[0-9]\.[0-9]\.sql' | xargs rm + rm -f $@ cat $(SOURCES_DATA) >> $@ +.PHONY: all all: $(DATA) # Only meant for development time, do not use once a version is released +.PHONY: devclean devclean: rm -f $(DATA)