]> granicus.if.org Git - postgis/commitdiff
Avoid installing unneeded raster scripts in contrib dir
authorSandro Santilli <strk@kbt.io>
Mon, 18 Mar 2019 19:45:51 +0000 (19:45 +0000)
committerSandro Santilli <strk@kbt.io>
Mon, 18 Mar 2019 19:45:51 +0000 (19:45 +0000)
Also stop building extension in non-extension things

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

.gitignore
extensions/postgis_raster/Makefile.in
raster/rt_pg/Makefile.in

index 116308c584d1c4be40c639d5b3f0b14f364269f5..d9393ef7edaab463b6639b8671ebaeb2f811a70d 100644 (file)
@@ -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
index 410948992fcbfabac3160b7104cbca0650cf7a69..ed50c172feb1d357741ecf023a09119a424beb7f 100644 (file)
@@ -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
 
index 1cbb7718ff865cca47e116f033c81ddd798dbea3..e96480a2c64f44768cba83cda9b49ab4d65cb263 100644 (file)
@@ -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) > $@