../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" > $@
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" > $@
-# 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