[postgis-tickets] r16052 - Only install symlinks for tiger_geocoder upgrade paths
Sandro Santilli
strk at kbt.io
Sun Oct 22 12:52:28 PDT 2017
Author: strk
Date: 2017-10-22 12:52:28 -0700 (Sun, 22 Oct 2017)
New Revision: 16052
Modified:
trunk/extensions/postgis_tiger_geocoder/Makefile.in
Log:
Only install symlinks for tiger_geocoder upgrade paths
Also only symlink the "next" hacks, and do all most of this at
`make install` time, not bothering at `make` time
Modified: trunk/extensions/postgis_tiger_geocoder/Makefile.in
===================================================================
--- trunk/extensions/postgis_tiger_geocoder/Makefile.in 2017-10-22 19:20:34 UTC (rev 16051)
+++ trunk/extensions/postgis_tiger_geocoder/Makefile.in 2017-10-22 19:52:28 UTC (rev 16052)
@@ -37,7 +37,7 @@
REGRESS_OPTS += --load-extension=address_standardizer
endif
-all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql sql/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql sql_minor_upgrade sql/test-normalize_address.sql sql/test-pagc_normalize_address.sql expected/test-normalize_address.out expected/test-pagc_normalize_address.out sql/test-upgrade.sql expected/test-upgrade.out sql/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql sql_minor_upgrade
+all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql sql/$(EXTENSION)--ANY--$(EXTVERSION).sql sql/test-normalize_address.sql sql/test-pagc_normalize_address.sql expected/test-normalize_address.out expected/test-pagc_normalize_address.out sql/test-upgrade.sql expected/test-upgrade.out
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
mkdir -p sql
@@ -72,8 +72,7 @@
mkdir -p sql
cat $^ > $@
-#this is a cludge to allow upgrading from same SVN to same SVN
-sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql
+sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql
mkdir -p sql
cat $^ > $@
echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@
@@ -212,9 +211,19 @@
-e 's/BEGIN;//g' -e 's/COMMIT;//g' \
$< > $@
-sql_minor_upgrade: sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql
+EXTDIR=$(DESTDIR)$(datadir)/$(datamoduledir)
+
+install: install-upgrade-paths
+
+# The "next" lines are a cludge to allow upgrading between different
+# revisions of the same version
+install-upgrade-paths: sql/$(EXTENSION)--ANY--$(EXTVERSION).sql
+ tpl='$(EXTENSION)--ANY--$(EXTVERSION).sql'; \
+ $(INSTALL_DATA) $^ "$(EXTDIR)/$${tpl}"; \
+ ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql; \
+ ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql; \
for OLD_VERSION in $(UPGRADEABLE_VERSIONS); do \
- cat $^ > sql/$(EXTENSION)--$$OLD_VERSION--$(EXTVERSION).sql; \
+ ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$$OLD_VERSION--$(EXTVERSION).sql; \
done
#only extension files
More information about the postgis-tickets
mailing list