Commit 8eb93beb authored by Sandro Santilli's avatar Sandro Santilli

Avoid installing unneeded raster scripts in contrib dir

Also stop building extension in non-extension things

git-svn-id: http://svn.osgeo.org/postgis/trunk@17345 b70326c6-7e19-0410-871a-916f4a2858ee
parent ece8bcaa
Pipeline #52441722 passed with stage
in 31 minutes and 58 seconds
......@@ -109,9 +109,6 @@ postgis/legacy_minimal.sql
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
......@@ -130,8 +127,6 @@ raster/rt_pg/rtpostgis_drop.sql
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
......
......@@ -10,6 +10,9 @@ MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION)
endif
GREP = @GREP@
# SQL preprocessor
SQLPP = @SQLPP@
MICRO_NUMBER = $(shell echo $(EXTVERSION) | \
$(PERL) -pe 's/\d.\d.(\d+)[a-zA-Z]*\d*/$1/'
......@@ -86,12 +89,27 @@ unpackaged_check.sql: unpackaged_check.sql.in Makefile
> $@
#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
......
......@@ -29,7 +29,7 @@ MODULE_big=rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
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
......@@ -77,7 +77,7 @@ PG_CPPFLAGS+= $(LIBLWGEOM_CFLAGS) @CPPFLAGS@ @CFLAGS@ $(LIBGDAL_CFLAGS) $(LIBPGC
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@
......@@ -114,10 +114,6 @@ endif
$(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
......@@ -139,9 +135,6 @@ $(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h
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 > $@
......@@ -150,12 +143,6 @@ rtpostgis_upgrade.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_upgrade.sql.in rt
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) > $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment