From: Sandro Santilli Date: Thu, 21 Mar 2013 09:01:28 +0000 (+0000) Subject: Review comments above Makefile rule to generate .sql from .sql.in X-Git-Tag: 2.1.0beta2~156 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4b22dd15f9386ad384fec4a608006572ef387ac;p=postgis Review comments above Makefile rule to generate .sql from .sql.in git-svn-id: http://svn.osgeo.org/postgis/trunk@11192 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/Makefile.in b/postgis/Makefile.in index 8efabc1cb..b85f92b40 100644 --- a/postgis/Makefile.in +++ b/postgis/Makefile.in @@ -131,7 +131,8 @@ $(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postg ../libpgcommon/libpgcommon.a: make -C ../libpgcommon libpgcommon.a -# Borrow the $libdir substitution from PGXS but customise by adding the version number +# Borrow the $libdir substitution from PGXS but customise by running the preprocessor +# and adding the version number %.sql: %.sql.in $(SQLPP) -I../libpgcommon $< | grep -v '^#' | \ $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@ diff --git a/raster/rt_pg/Makefile.in b/raster/rt_pg/Makefile.in index b9e308672..d82883fc1 100644 --- a/raster/rt_pg/Makefile.in +++ b/raster/rt_pg/Makefile.in @@ -82,7 +82,8 @@ ifeq ($(REGRESS),1) datamoduledir=contrib/postgis endif -# Borrow the $libdir substitution from PGXS but customise by adding the version number +# Borrow the $libdir substitution from PGXS but customise by running the preprocessor +# and adding the version number %.sql: %.sql.in $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \ $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@ diff --git a/topology/Makefile.in b/topology/Makefile.in index 8eaab9414..6216ab701 100644 --- a/topology/Makefile.in +++ b/topology/Makefile.in @@ -73,16 +73,10 @@ endif -# Unfortunately we have to copy this from the PGXS Makefile as it only gets picked up -# if MODULE_big is defined +# Generate any .sql file from .sql.in.c files by running them through the SQL pre-processor %.sql: %.sql.in - $(SQLPP) $< | grep -v '^#' | \ - $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/$*'g" > $@ + $(SQLPP) $< | grep -v '^#' > $@ -# Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor -#%.in: %.in.c -# $(SQLPP) $< | grep -v '^#' > $@ - #Generate upgrade script by stripping things that can't be reinstalled #e.g. don't bother with tables, types, triggers, and domains topology_upgrade.sql: topology.sql