postgis/legacy.sql
postgis/postgis.sql
postgis/postgis_proc_set_search_path.sql
-postgis/postgis_for_extension.sql
-postgis/postgis_upgrade_for_extension.sql
-postgis/postgis_upgrade_for_extension.sql.in
postgis/postgis_upgrade.sql*
postgis/sfcgal_upgrade.sql*
postgis/sqldefines.h
raster/rt_pg/rtpostgis_legacy.sql
raster/rt_pg/rtpostgis_proc_set_search_path.sql
raster/rt_pg/rtpostgis_upgrade.sql.in
-raster/rt_pg/rtpostgis_for_extension.sql
-raster/rt_pg/rtpostgis_upgrade_for_extension.sql.in
raster/rt_pg/rtpostgis_upgrade*.sql
raster/rt_pg/uninstall_rtpostgis.sql
raster/scripts/Makefile
endif
GREP = @GREP@
+# SQL preprocessor
+SQLPP = @SQLPP@
+
MICRO_NUMBER = $(shell echo $(EXTVERSION) | \
$(PERL) -pe 's/\d.\d.(\d+)[a-zA-Z]*\d*/$1/'
> $@
#strip BEGIN/COMMIT since these are not allowed in extensions
-sql/rtpostgis.sql: ../../raster/rt_pg/rtpostgis_for_extension.sql | sql
+sql/rtpostgis.sql: sql/rtpostgis_for_extension.sql | sql
$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
-sql/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade_for_extension.sql | sql
+sql/rtpostgis_for_extension.sql: ../../raster/rt_pg/rtpostgis.sql.in | sql
+ $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \
+ $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g" > $@
+
+sql/rtpostgis_upgrade.sql: sql/rtpostgis_upgrade_for_extension.sql | sql
$(PERL) -pe "s/BEGIN\;//g ; s/COMMIT\;//g; s/^(DROP .*)\;/SELECT postgis_extension_drop_if_exists('$(EXTENSION)', '\1');\n\1\;/" $< > $@
+#this keeps the @extschema@. in place since extension machinery will replace during install
+sql/rtpostgis_upgrade_for_extension.sql: ../../raster/rt_pg/rtpostgis_upgrade_cleanup.sql sql/rtpostgis_upgrade_for_extension.sql.in ../../raster/rt_pg/rtpostgis_drop.sql | sql
+ echo 'BEGIN;' > $@
+ cat $^ | sed -e 's/^BEGIN;$$//' -e 's/^COMMIT;$$//' >> $@
+ echo 'COMMIT;' >> $@
+
+
+sql/rtpostgis_upgrade_for_extension.sql.in: sql/rtpostgis_for_extension.sql ../../utils/postgis_proc_upgrade.pl | sql
+ $(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
+
+
../../doc/raster_comments.sql:
$(MAKE) -C ../../doc comments
endif
# Files to be copied to the contrib/ directory
-DATA_built=rtpostgis.sql rtpostgis_for_extension.sql rtpostgis_upgrade_for_extension.sql rtpostgis_upgrade.sql rtpostgis_proc_set_search_path.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
+DATA_built=rtpostgis.sql rtpostgis_upgrade.sql rtpostgis_proc_set_search_path.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql
DATA=
# SQL preprocessor
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.sql.in rtpostgis_upgrade_for_extension.sql.in
+EXTRA_CLEAN=$(SQL_OBJS) $(DATA_built) rtpostgis_upgrade.sql.in
# PGXS information
PG_CONFIG := @PG_CONFIG@
$(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@
-rtpostgis_for_extension.sql: rtpostgis.sql.in
- $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \
- $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g" > $@
-
../../liblwgeom/.libs/liblwgeom.a:
$(MAKE) -C ../../liblwgeom
rtpostgis_upgrade.sql.in: rtpostgis.sql ../../utils/postgis_proc_upgrade.pl
$(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
-rtpostgis_upgrade_for_extension.sql.in: rtpostgis_for_extension.sql ../../utils/postgis_proc_upgrade.pl
- $(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
-
rtpostgis_proc_set_search_path.sql: rtpostgis.sql ../../utils/postgis_proc_set_search_path.pl
$(PERL) ../../utils/postgis_proc_set_search_path.pl $< UNUSED > $@
cat $^ | sed -e 's/^BEGIN;$$//' -e 's/^COMMIT;$$//' >> $@
echo 'COMMIT;' >> $@
-#this keeps the @extschema@. in place since extension machinery will replace during install
-rtpostgis_upgrade_for_extension.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_upgrade_for_extension.sql.in rtpostgis_drop.sql
- echo 'BEGIN;' > $@
- cat $^ | sed -e 's/^BEGIN;$$//' -e 's/^COMMIT;$$//' >> $@
- echo 'COMMIT;' >> $@
-
uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl
$(PERL) ../../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@