]> granicus.if.org Git - postgis/commitdiff
Stop copying upgrade minor from upgrade_prev
authorSandro Santilli <strk@keybit.net>
Sat, 22 Feb 2014 20:10:54 +0000 (20:10 +0000)
committerSandro Santilli <strk@keybit.net>
Sat, 22 Feb 2014 20:10:54 +0000 (20:10 +0000)
postgis_proc_upgrade should do the right thing

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

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

index 8fe57e7b2f88bf754347a9365ee2fe22aba2d27e..95fd6384bdd6e7990d34a1ed198ea67381df77b4 100644 (file)
@@ -16,7 +16,9 @@ MODULEDIR=contrib/$(MODULE_big)
 
 # 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
@@ -172,11 +174,12 @@ $(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postg
 postgis_upgrade_$(PREV_big)_$(CURV_big).sql.in: postgis_drop_before.sql postgis.sql postgis_drop_after.sql
        cat $^ > $@
 postgis_upgrade_$(PREV_big)_$(CURV_big).sql: postgis_upgrade_$(PREV_big)_$(CURV_big).sql.in ../utils/postgis_proc_upgrade.pl 
-       $(PERL) ../utils/postgis_proc_upgrade.pl $< 2.0 > $@
+       $(PERL) ../utils/postgis_proc_upgrade.pl $< $(PREV_big_dot) > $@
        
-#this is same as $(PREV_big)_$(CURV_big) until we release a 2.1.0      
-postgis_upgrade_$(CURV_big)_minor.sql: postgis_upgrade_$(PREV_big)_$(CURV_big).sql
-       cp $< $@
+postgis_upgrade_$(CURV_big)_minor.sql.in: postgis_drop_before.sql postgis.sql postgis_drop_after.sql
+       cat $^ > $@
+postgis_upgrade_$(CURV_big)_minor.sql: postgis_upgrade_$(CURV_big)_minor.sql.in ../utils/postgis_proc_upgrade.pl
+       $(PERL) ../utils/postgis_proc_upgrade.pl $< $(CURV_big_dot) > $@
 
 # Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor 
 #$(SQL_OBJS): %.in: %.in.c
index f542213f776b5df78cc6c348e5029f50b7f816c0..923d008f2f2a38de9ef4758782eeef5ff6e203ab 100644 (file)
@@ -26,7 +26,9 @@ 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
@@ -121,24 +123,19 @@ endif
 # Objects dependencies
 $(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_svn_revision.h
 
-# Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor 
-#$(SQL_OBJS): %.in: %.in.c
-#      $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' > $@
-
 # SQL objects deps here
 $(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h
 
-#remove all create object types since these can't be done cleanly in an upgrade
-rtpostgis_upgrade.sql: rtpostgis.sql ../../utils/postgis_proc_upgrade.pl
-       $(PERL) ../../utils/postgis_proc_upgrade.pl $< 2.0 > $@
-       #$(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@
+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_$(PREV_big)_$(CURV_big).sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql 
+rtpostgis_upgrade_$(CURV_big)_minor.sql.in: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis.sql 
        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) > $@
 
-# same as $(PREV_big)_$(CURV_big) until next .0 is released
-rtpostgis_upgrade_$(CURV_big)_minor.sql: rtpostgis_upgrade_$(PREV_big)_$(CURV_big).sql
-       cp $< $@
 
 uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl 
        $(PERL) ../../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@