]> granicus.if.org Git - postgis/commitdiff
Drop the .c suffix of sql files to preprocess
authorSandro Santilli <strk@keybit.net>
Mon, 18 Mar 2013 17:20:18 +0000 (17:20 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 18 Mar 2013 17:20:18 +0000 (17:20 +0000)
The suffix was added to make compilers happy about preprocessing,
but invoking cpp directly should be just fine (SQLPP macro)

This is an experimental change under postgis/, if everyone is happy
the same thing will be done for raster/ and topology/

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

.gitignore
postgis/Makefile.in
postgis/geography.sql.in [moved from postgis/geography.sql.in.c with 100% similarity]
postgis/legacy.sql.in [moved from postgis/legacy.sql.in.c with 99% similarity]
postgis/legacy_minimal.sql.in [moved from postgis/legacy_minimal.sql.in.c with 100% similarity]
postgis/long_xact.sql.in [moved from postgis/long_xact.sql.in.c with 100% similarity]
postgis/postgis.sql.in [moved from postgis/postgis.sql.in.c with 99% similarity]
postgis/uninstall_geography.sql.in [moved from postgis/uninstall_geography.sql.in.c with 100% similarity]
postgis/uninstall_legacy.sql.in [moved from postgis/uninstall_legacy.sql.in.c with 100% similarity]
postgis/uninstall_long_xact.sql.in [moved from postgis/uninstall_long_xact.sql.in.c with 100% similarity]
postgis/uninstall_sqlmm.sql.in [moved from postgis/uninstall_sqlmm.sql.in.c with 100% similarity]

index e3a9a01aabae856aa00c526fcad675d95e69b16b..efda711d7438011bbac27bad9a799620c321f388 100644 (file)
@@ -69,22 +69,11 @@ postgis_config.h
 postgis/Makefile
 postgis/legacy_gist.sql
 postgis/legacy_minimal.sql
-postgis/legacy_minimal.sql.in
 postgis/legacy.sql
-postgis/legacy.sql.in
 postgis/postgis.sql
-postgis/postgis.sql.in
-postgis/postgis_upgrade_13_to_15.sql
-postgis/postgis_upgrade_14_to_15.sql
-postgis/postgis_upgrade_15_minor.sql
-postgis/postgis_upgrade_20_minor.sql
-postgis/postgis_upgrade_20_minor.sql.in
-postgis/postgis_upgrade_20_21.sql
-postgis/postgis_upgrade_20_21.sql.in
-postgis/postgis_upgrade_21_minor.sql
+postgis/postgis_upgrade_*.sql*
 postgis/sqldefines.h
 postgis/uninstall_legacy.sql
-postgis/uninstall_legacy.sql.in
 postgis/uninstall_postgis.sql
 raster/loader/Makefile
 raster/loader/raster2pgsql
index 017350542b4e0f7c3064941b2f3fce2954df4720..8efabc1cb27ec1f6abedca288cd89a25d26f7086 100644 (file)
@@ -22,7 +22,7 @@ DATA=../spatial_ref_sys.sql
 SQLPP = @SQLPP@
 
 # SQL objects (files requiring pre-processing)
-SQL_OBJS=postgis.sql.in legacy.sql.in legacy_minimal.sql.in 
+SQL_OBJS=postgis.sql legacy.sql legacy_minimal.sql
 
 # PostgreSQL objects
 PG_OBJS= \
@@ -133,7 +133,8 @@ $(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postg
 
 # Borrow the $libdir substitution from PGXS but customise by adding the version number
 %.sql: %.sql.in
-       $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" $< > $@
+       $(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
+       $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@
 
 postgis_upgrade_20_21.sql.in: postgis_drop_before.sql postgis.sql postgis_drop_after.sql
        cat $^ > $@
@@ -145,15 +146,14 @@ postgis_upgrade_21_minor.sql: postgis_upgrade_20_21.sql
        cp $< $@
 
 # Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor 
-$(SQL_OBJS): %.in: %.in.c
-       $(SQLPP) -I../libpgcommon $< | grep -v '^#' > $@
+#$(SQL_OBJS): %.in: %.in.c
+# $(SQLPP) -I../libpgcommon $< | grep -v '^#' > $@
 
 # SQL objects are also dependent on postgis_config.h for PostgreSQL version
 $(SQL_OBJS): ../postgis_config.h ../postgis_svn_revision.h
 
-postgis.sql.in: sqldefines.h long_xact.sql.in.c geography.sql.in.c 
+#postgis.sql.in: sqldefines.h long_xact.sql.in.c geography.sql.in.c 
 
-#uninstall_postgis.sql.in: sqldefines.h uninstall_sqlmm.sql.in.c uninstall_long_xact.sql.in.c uninstall_geography.sql.in.c
 uninstall_postgis.sql: postgis.sql ../utils/create_undef.pl 
        $(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@
 
similarity index 99%
rename from postgis/legacy.sql.in.c
rename to postgis/legacy.sql.in
index f472b469f26174c9f4e467179b75a3229d564e8b..c2742c5fb524d764698a612ebe72972ffa6ff9b8 100644 (file)
@@ -2,7 +2,7 @@
 -- Legacy functions without chip functions --
 -- This is the full list including the legacy_minimal.sql (minimal)
 -- so no need to install both legacy and the minimal 
-#include "legacy_minimal.sql.in.c"
+#include "legacy_minimal.sql.in"
 --- start functions that in theory should never have been used or internal like stuff deprecated
 
 -- these were superceded by PostGIS_AddBBOX , PostGIS_DropBBOX, PostGIS_HasBBOX in 1.5 --
similarity index 99%
rename from postgis/postgis.sql.in.c
rename to postgis/postgis.sql.in
index 5b7beb4ac30b1cf37aa98bc253f1eda3243aa03c..ad3e5f1ffa36026e948544b4ef4ad0507982b3ce 100644 (file)
@@ -4371,8 +4371,9 @@ END;
 $$
 LANGUAGE 'plpgsql' IMMUTABLE STRICT;
 
-#include "long_xact.sql.in.c"
-#include "geography.sql.in.c"
+/* Should we include the .sql directly here ? */
+#include "long_xact.sql.in"
+#include "geography.sql.in"