[postgis-tickets] r15922 - Generate postgis.control at make time, not configure time
Sandro Santilli
strk at kbt.io
Fri Oct 6 06:29:02 PDT 2017
Author: strk
Date: 2017-10-06 06:29:01 -0700 (Fri, 06 Oct 2017)
New Revision: 15922
Modified:
trunk/configure.ac
trunk/extensions/postgis/Makefile.in
trunk/extensions/postgis/postgis.control.in
Log:
Generate postgis.control at make time, not configure time
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2017-10-06 13:21:38 UTC (rev 15921)
+++ trunk/configure.ac 2017-10-06 13:29:01 UTC (rev 15922)
@@ -1432,7 +1432,6 @@
AC_OUTPUT([GNUmakefile
extensions/Makefile
extensions/postgis/Makefile
- extensions/postgis/postgis.control
extensions/postgis_sfcgal/Makefile
extensions/postgis_sfcgal/postgis_sfcgal.control
extensions/postgis_topology/Makefile
Modified: trunk/extensions/postgis/Makefile.in
===================================================================
--- trunk/extensions/postgis/Makefile.in 2017-10-06 13:21:38 UTC (rev 15921)
+++ trunk/extensions/postgis/Makefile.in 2017-10-06 13:29:01 UTC (rev 15922)
@@ -3,6 +3,7 @@
EXTENSION = postgis
EXTVERSION = @POSTGIS_LIB_VERSION@
MINORVERSION = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
+MODULEPATH = $$libdir/$(EXTENSION)-$(MINORVERSION)
GREP = @GREP@
PERL = @PERL@
@@ -23,6 +24,7 @@
$(PERL) -pe 's/(\d+[a-zA-Z]+)\d*/\1/'
DATA_built = \
+ $(EXTENSION).control \
sql/$(EXTENSION)--$(EXTVERSION).sql \
sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql \
$(NULL)
@@ -44,6 +46,13 @@
printf '\\echo Use "CREATE EXTENSION $(EXTENSION)" to load this file. \\quit\n' > $@
cat $^ >> $@
+$(EXTENSION).control: $(EXTENSION).control.in Makefile
+ cat $< \
+ | sed -e 's|@EXTVERSION@|$(EXTVERSION)|g' \
+ | sed -e 's|@EXTENSION@|$(EXTENSION)|g' \
+ | sed -e 's|@MODULEPATH@|$(MODULEPATH)|g' \
+ > $@
+
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
mkdir -p sql
cp $< $@
Modified: trunk/extensions/postgis/postgis.control.in
===================================================================
--- trunk/extensions/postgis/postgis.control.in 2017-10-06 13:21:38 UTC (rev 15921)
+++ trunk/extensions/postgis/postgis.control.in 2017-10-06 13:29:01 UTC (rev 15922)
@@ -1,5 +1,5 @@
# postgis extension
comment = 'PostGIS geometry, geography, and raster spatial types and functions'
-default_version = '@POSTGIS_LIB_VERSION@'
-module_pathname = '$libdir/postgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@'
+default_version = '@EXTVERSION@'
+module_pathname = '@MODULEPATH@'
relocatable = false
More information about the postgis-tickets
mailing list