]> granicus.if.org Git - postgis/commitdiff
Output single upgrade script for rtpostgis: rtpostgis_upgrade.sql
authorSandro Santilli <strk@keybit.net>
Mon, 24 Feb 2014 19:24:35 +0000 (19:24 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 24 Feb 2014 19:24:35 +0000 (19:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12276 b70326c6-7e19-0410-871a-916f4a2858ee

.gitignore
extensions/postgis/Makefile.in
raster/rt_pg/Makefile.in
regress/run_test.pl

index d7c48e4327e877434c09b4b0602284b664e3a435..a0e06108725c37517a7f36ea2533e811404205cd 100644 (file)
@@ -84,8 +84,7 @@ raster/rt_pg/Makefile
 raster/rt_pg/rtpostgis.sql
 raster/rt_pg/rtpostgis_drop.sql
 raster/rt_pg/rtpostgis_legacy.sql
-raster/rt_pg/rtpostgis_upgrade_??_??.sql.in
-raster/rt_pg/rtpostgis_upgrade_??_minor.sql.in
+raster/rt_pg/rtpostgis_upgrade.sql.in
 raster/rt_pg/rtpostgis_upgrade*.sql
 raster/rt_pg/uninstall_rtpostgis.sql
 raster/scripts/Makefile
index 4f84ddfec1c6f38ed71b0f90b70cd339e8607494..0e3cc312b6f872ba02f99b8bfe1605796d780068 100644 (file)
@@ -76,7 +76,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_$(PREV_big)_$(CURV_big).sql: ../../raster/rt_pg/rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql
+sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade.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' \
@@ -102,7 +102,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/postgis_upgrade.sql sql_bits/rtpostgis_upgrade_$(PREV_big)_$(CURV_big).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/postgis_upgrade.sql sql_bits/rtpostgis_upgrade.sql ../../doc/raster_comments.sql ../../doc/postgis_comments.sql ../postgis_extension_helper_uninstall.sql
        cat $^ > $@
 
 sql_minor_upgrade: sql_bits/postgis_raster_upgrade_minor.sql
index d5f642a5b7b72075cf5ee136cdf96f3a0ec72fec..af0663c2c32e7f82c2c75795c38328769409a17c 100644 (file)
@@ -24,15 +24,8 @@ 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_dot=2.1
-PREV_big=21
-CURV_big_dot=@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
-CURV_big=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@
-
 # Files to be copied to the contrib/ directory
-DATA_built=rtpostgis.sql rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql rtpostgis_upgrade_$(CURV_big)_minor.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
+DATA_built=rtpostgis.sql rtpostgis_upgrade.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
 DATA=
 
 # SQL preprocessor
@@ -77,7 +70,7 @@ PG_CPPFLAGS+=@CPPFLAGS@ $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) $(LIBPGCOMMON_CFLA
 SHLIB_LINK_F = ../rt_core/librtcore.a $(LIBLWGEOM_LDFLAGS) $(LIBPGCOMMON_LDFLAGS) $(LIBGDAL_LDFLAGS) @SHLIB_LINK@ 
 
 # Extra files to remove during 'make clean'
-EXTRA_CLEAN=$(SQL_OBJS) $(DATA_built) rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql.in rtpostgis_upgrade_$(CURV_big)_minor.sql.in
+EXTRA_CLEAN=$(SQL_OBJS) $(DATA_built) rtpostgis_upgrade.sql.in
 
 # PGXS information
 PG_CONFIG = @PG_CONFIG@ 
@@ -126,16 +119,11 @@ $(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../../libpgcommon/libpgcommon.a ../..
 # SQL objects deps here
 $(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h
 
-rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql.in: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis.sql 
-       cat $^ > $@
-rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql: rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql.in ../../utils/postgis_proc_upgrade.pl 
-       $(PERL) ../../utils/postgis_proc_upgrade.pl $< $(PREV_big_dot) > $@
+rtpostgis_upgrade.sql.in: rtpostgis.sql ../../utils/postgis_proc_upgrade.pl
+       $(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
 
-rtpostgis_upgrade_$(CURV_big)_minor.sql.in: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis.sql 
+rtpostgis_upgrade.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql.in 
        cat $^ > $@
-rtpostgis_upgrade_$(CURV_big)_minor.sql: rtpostgis_upgrade_$(CURV_big)_minor.sql.in ../../utils/postgis_proc_upgrade.pl
-       $(PERL) ../../utils/postgis_proc_upgrade.pl $< $(CURV_big_dot) > $@
-
 
 uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl 
        $(PERL) ../../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@
index 6af8b08afc3773b981b24ab112cd7249fed16d80..8e39d956e16375d22a0c07b347209952405a6a1d 100755 (executable)
@@ -1192,7 +1192,7 @@ sub upgrade_spatial
     
     if ( $OPT_WITH_RASTER ) 
     {
-        my $script = `ls ${STAGED_SCRIPTS_DIR}/rtpostgis_upgrade_*_minor.sql`;
+        my $script = `ls ${STAGED_SCRIPTS_DIR}/rtpostgis_upgrade.sql`;
         chomp($script);
         if ( -e $script )
         {