# 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
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
# 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
# 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) > $@