]> granicus.if.org Git - postgis/commitdiff
More hard-coded version numbers reduction
authorSandro Santilli <strk@keybit.net>
Tue, 15 Oct 2013 14:31:02 +0000 (14:31 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 15 Oct 2013 14:31:02 +0000 (14:31 +0000)
This commit fixes raster and postgis/raster extension.
I noticed that the extension files have what looks like being
an attempt to compute the "previous" version in another way,
but haven't tried to use those variables. Also, I think it would
be worth moving all the version strings into the Version.config
file in top-level. Not done by this commit, but comments left

git-svn-id: http://svn.osgeo.org/postgis/trunk@12036 b70326c6-7e19-0410-871a-916f4a2858ee

extensions/postgis/Makefile.in
postgis/Makefile.in
raster/rt_pg/Makefile.in

index 1da246005279f103264c6c203b3ce2aa21b9b563..948348f364c8c4be1b1be29290a3fac0c6f93662 100644 (file)
@@ -27,6 +27,10 @@ PG91         = $(shell $(PG_CONFIG) --version | $(GREP) -qE " 8\.| 9\.0" && echo
 SQL_BITS     = $(wildcard sql_bits/*.sql)
 EXTRA_CLEAN += ${SQL_BITS} sql/*.sql
 
+# Update PREV_big manually on branching
+# TODO: move this definition in ../../Version.config
+PREV_big=21
+CURV_big=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@
 
 ifeq ($(PG91),yes)
 sql/$(EXTENSION).sql: sql_bits/postgis.sql sql_bits/postgis_comments.sql sql_bits/rtpostgis.sql sql_bits/mark_editable_objects.sql.in sql_bits/raster_comments.sql sql_bits/spatial_ref_sys.sql
@@ -71,7 +75,7 @@ sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis.sql
 # for casts that are being dropped we need to drop them 
 # from extension only if they are in the existension so we use our postgis_extension_drop..
 # so that it will silently fail if cast is not in extension
-sql_bits/rtpostgis_upgrade_20_21.sql: ../../raster/rt_pg/rtpostgis_upgrade_20_21.sql
+sql_bits/rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql: ../../raster/rt_pg/rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql
        sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
                -e 's/DROP FUNCTION _rename_raster_tables();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _rename_raster_tables();DROP FUNCTION _rename_raster_tables();/g' \
                -e 's/DROP FUNCTION _drop_st_samealignment();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _drop_st_samealignment();DROP FUNCTION _drop_st_samealignment();/g' \
@@ -80,7 +84,7 @@ sql_bits/rtpostgis_upgrade_20_21.sql: ../../raster/rt_pg/rtpostgis_upgrade_20_21
 
 #don't drop casts just yet since we don't have provision to remove from extension yet
 #need to also drop temporary functions from extenions since it gets auto-added
-sql_bits/postgis_upgrade_20_21.sql: ../../postgis/postgis_upgrade_20_21.sql 
+sql_bits/postgis_upgrade_$(PREV_big)_$(CURV_big).sql: ../../postgis/postgis_upgrade_$(PREV_big)_$(CURV_big).sql 
                 sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
                 -e '/^\(DROP\|CREATE\) \(CAST\).*;/d' \
                 -e '/^\(DROP\|CREATE\) \(CAST\)/,/\;/d' \
@@ -97,7 +101,7 @@ sql_bits/raster_comments.sql: ../../doc/raster_comments.sql
 #postgis_raster_upgrade_minor.sql is the one that contains both postgis AND raster
 #TODO: come up with a better name
 #TODO: what about postgis_drop_after.sql ? where does it fit ??
-sql_bits/postgis_raster_upgrade_minor.sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql_bits/postgis_upgrade_20_21.sql sql_bits/rtpostgis_upgrade_20_21.sql ../../doc/raster_comments.sql ../../doc/postgis_comments.sql ../postgis_extension_helper_uninstall.sql
+sql_bits/postgis_raster_upgrade_minor.sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql_bits/postgis_upgrade_$(PREV_big)_$(CURV_big).sql sql_bits/rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql ../../doc/raster_comments.sql ../../doc/postgis_comments.sql ../postgis_extension_helper_uninstall.sql
        cat $^ > $@
 
 # sql_bits/rtpostgis--unpackaged.sql:  ../../raster/rt_pg/rtpostgis.sql         
index 456e7ebf01fef6210d7ef9e5219cc244ecc09b43..7f7b75ba7f7f541ea0f3223ed3e1fd7c8dcc929b 100644 (file)
@@ -15,6 +15,7 @@ MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
 MODULEDIR=contrib/$(MODULE_big)
 
 # Update PREV_big manually on branching
+# TODO: move this definition in ../../Version.config
 PREV_big=21
 CURV_big=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@
 
index 4c6291fe2c01373dc1b689f72bf89c542f6c2deb..342a6194070b061b253e8b085e36ed78a5b200d6 100644 (file)
@@ -1,4 +1,4 @@
-#############################################################################
+############################################################################
 # $Id$
 #
 # Copyright (c) 2009-2011 Sandro Santilli <strk@keybit.net>
@@ -13,8 +13,13 @@ POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
 MODULE_big=rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
 MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
 
+# Update PREV_big manually on branching
+# TODO: move this definition in ../../Version.config
+PREV_big=21
+CURV_big=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@
+
 # Files to be copied to the contrib/ directory
-DATA_built=rtpostgis.sql rtpostgis_upgrade_20_21.sql rtpostgis_upgrade_21_minor.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
+DATA_built=rtpostgis.sql rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql rtpostgis_upgrade_$(CURV_big)_minor.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
 DATA=
 
 # SQL preprocessor
@@ -116,11 +121,11 @@ $(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h
 rtpostgis_upgrade.sql: rtpostgis.sql
        $(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@
 
-rtpostgis_upgrade_20_21.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql 
+rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql 
        cat $^ > $@
 
-# same as 20_21 until 2.1.0 is released
-rtpostgis_upgrade_21_minor.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql 
+# same as $(PREV_big)_$(CURV_big) until next .0 is released
+rtpostgis_upgrade_$(CURV_big)_minor.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql 
        cat $^ > $@
 
 uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl