[postgis-tickets] r17344 - Stop installing unneeded postgis files in contrib dir
Sandro Santilli
strk at kbt.io
Mon Mar 18 12:35:44 PDT 2019
Author: strk
Date: 2019-03-18 12:35:43 -0700 (Mon, 18 Mar 2019)
New Revision: 17344
Modified:
trunk/extensions/postgis/Makefile.in
trunk/postgis/Makefile.in
Log:
Stop installing unneeded postgis files in contrib dir
Also don't build extension-related things in non-extension
related folder
Modified: trunk/extensions/postgis/Makefile.in
===================================================================
--- trunk/extensions/postgis/Makefile.in 2019-03-14 18:49:42 UTC (rev 17343)
+++ trunk/extensions/postgis/Makefile.in 2019-03-18 19:35:43 UTC (rev 17344)
@@ -10,6 +10,9 @@
endif
GREP = @GREP@
+# SQL preprocessor
+SQLPP = @SQLPP@
+
MICRO_NUMBER = $(shell echo $(EXTVERSION) | \
$(PERL) -pe 's/\d.\d.(\d+)[a-zA-Z]*\d*/$1/'
@@ -35,7 +38,7 @@
# Scripts making up the extension file
# NOTE: order matters
EXTENSION_SCRIPTS = \
- ../../postgis/postgis_for_extension.sql \
+ sql/postgis_for_extension.sql \
../../doc/postgis_comments.sql \
sql/spatial_ref_sys_config_dump.sql \
sql/spatial_ref_sys.sql
@@ -116,7 +119,21 @@
sql/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl | sql
$(PERL) ../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
-sql/postgis_upgrade.sql: ../../postgis/postgis_upgrade_for_extension.sql | sql
+sql/postgis_upgrade_for_extension.sql: ../../postgis/postgis_drop_before.sql sql/postgis_upgrade_for_extension.sql.in ../../postgis/postgis_drop_after.sql | sql
+ #strip BEGIN/COMMIT since these are not allowed in extensions
+ # WARNING: we should make sure these are not internal to function bodies
+ cat $^ | $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' > $@
+
+sql/postgis_upgrade_for_extension.sql.in: sql/postgis_for_extension.sql ../../utils/postgis_proc_upgrade.pl | sql
+ $(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
+
+sql/postgis_for_extension.sql: ../../postgis/postgis.sql.in | sql
+ $(SQLPP) -I../../libpgcommon $< | grep -v '^#' | \
+ $(PERL) -lpe \
+ "s'MODULE_PATHNAME'\$(MODULEPATH)'g" \
+ | $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' > $@
+
+sql/postgis_upgrade.sql: sql/postgis_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\;/" $< > $@
Modified: trunk/postgis/Makefile.in
===================================================================
--- trunk/postgis/Makefile.in 2019-03-14 18:49:42 UTC (rev 17343)
+++ trunk/postgis/Makefile.in 2019-03-18 19:35:43 UTC (rev 17344)
@@ -33,11 +33,11 @@
endif
# Files to be copied to the contrib/ directory
-SQL_built=postgis.sql postgis_for_extension.sql uninstall_postgis.sql postgis_upgrade.sql postgis_upgrade_for_extension.sql postgis_proc_set_search_path.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql
+SQL_built=postgis.sql uninstall_postgis.sql postgis_upgrade.sql postgis_proc_set_search_path.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql
DATA=../spatial_ref_sys.sql
# SQL objects (files requiring pre-processing)
-SQL_objs=postgis.sql postgis_for_extension.sql legacy.sql legacy_minimal.sql
+SQL_objs=postgis.sql legacy.sql legacy_minimal.sql
GEOM_BACKEND_OBJ = lwgeom_geos.o
SFCGAL_BACKEND_OBJ = lwgeom_sfcgal.o
@@ -229,24 +229,15 @@
$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@
+#this is redundant but trying to fold in with extension just hangs
+postgis_upgrade.sql.in: postgis.sql ../utils/postgis_proc_upgrade.pl
+ $(PERL) ../utils/postgis_proc_upgrade.pl $< UNUSED > $@
+
postgis_upgrade_for_extension.sql: postgis_drop_before.sql postgis_upgrade_for_extension.sql.in postgis_drop_after.sql
#strip BEGIN/COMMIT since these are not allowed in extensions
# WARNING: we should make sure these are not internal to function bodies
cat $^ | $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' > $@
-postgis_for_extension.sql: postgis.sql.in
- $(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
- $(PERL) -lpe \
- "s'MODULE_PATHNAME'\$(MODULEPATH)'g" \
- | $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' > $@
-
-#this is redundant but trying to fold in with extension just hangs
-postgis_upgrade.sql.in: postgis.sql ../utils/postgis_proc_upgrade.pl
- $(PERL) ../utils/postgis_proc_upgrade.pl $< UNUSED > $@
-
-postgis_upgrade_for_extension.sql.in: postgis_for_extension.sql ../utils/postgis_proc_upgrade.pl
- $(PERL) ../utils/postgis_proc_upgrade.pl $< UNUSED > $@
-
postgis_proc_set_search_path.sql: postgis.sql ../utils/postgis_proc_set_search_path.pl
$(PERL) ../utils/postgis_proc_set_search_path.pl $< UNUSED > $@
More information about the postgis-tickets
mailing list