#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_$(PREV_big)_$(CURV_big).sql: ../../postgis/postgis_upgrade_$(PREV_big)_$(CURV_big).sql
+sql_bits/postgis_upgrade.sql: ../../postgis/postgis_upgrade.sql
sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
-e '/^\(DROP\|CREATE\) \(CAST\).*;/d' \
-e '/^\(DROP\|CREATE\) \(CAST\)/,/\;/d' \
#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_$(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
+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
cat $^ > $@
sql_minor_upgrade: sql_bits/postgis_raster_upgrade_minor.sql
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_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
-SQL_built=postgis.sql uninstall_postgis.sql postgis_upgrade_$(PREV_big)_$(CURV_big).sql postgis_upgrade_$(CURV_big)_minor.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql uninstall_sfcgal.sql
+SQL_built=postgis.sql uninstall_postgis.sql postgis_upgrade.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql uninstall_sfcgal.sql
DATA=../spatial_ref_sys.sql
# SQL objects (files requiring pre-processing)
uninstall_postgis.sql \
uninstall_legacy.sql \
uninstall_sfcgal.sql \
- postgis_upgrade_$(PREV_big)_$(CURV_big).sql.in \
- postgis_upgrade_$(PREV_big)_$(CURV_big).sql \
- postgis_upgrade_$(CURV_big)_minor.sql
+ postgis_upgrade.sql.in \
+ postgis_upgrade.sql
# PGXS information
PG_CONFIG = @PG_CONFIG@
$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@
-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 $< $(PREV_big_dot) > $@
-
-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) > $@
+postgis_upgrade.sql.in: postgis.sql ../utils/postgis_proc_upgrade.pl
+ $(PERL) ../utils/postgis_proc_upgrade.pl $< UNUSED > $@
-# 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../libpgcommon $< | grep -v '^#' > $@
+postgis_upgrade.sql: postgis_drop_before.sql postgis_upgrade.sql.in postgis_drop_after.sql
+ cat $^ > $@
# SQL objects are also dependent on postgis_config.h for PostgreSQL version
$(SQL_OBJS): ../postgis_config.h ../postgis_svn_revision.h