-# Configuration Directives
-include ../Makefile.config
-include ../Version.config
+#
+# PostGIS PGXS build system
+#
-#---------------------------------------------------------------
-# Postgis version and build date
-#---------------------------------------------------------------
+# Files to be copied to the contrib/ directory
+DATA_built=topology.sql
-all: topology.sql
+# SQL objects (files requiring C pre-processing)
+SQL_OBJS=topology.sql.in
-topology.sql: topology.sql.in
- cpp -P -traditional-cpp -DUSE_VERSION=$(USE_VERSION) $< | grep -v '^#' > $@
+# Extra files to remove during 'make clean'
+EXTRA_CLEAN=$(SQL_OBJS)
-install: all install-topology-scripts
+# PGXS information
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
-uninstall: uninstall-topology-scripts
-install-topology-scripts:
- @mkdir -p $(DESTDIR)$(datadir)
- $(INSTALL_DATA) topology.sql $(DESTDIR)$(datadir)/topology.sql
+# Unfortunately we have to copy this from the PGXS Makefile as it only gets picked up
+# if MODULE_big is defined
+%.sql: %.sql.in
+ sed 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@
-uninstall-topology-scripts:
- rm -f $(DESTDIR)$(datadir)/postgis/topology.sql
-
-clean distclean:
- rm -f topology.sql
+# Generate any .sql.in files from .sql.in.c files by running them through the C pre-processor
+$(SQL_OBJS): %.in: %.in.c
+ $(CPP) -traditional-cpp $< | grep -v '^#' > $@
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
--- $Id$
+-- $Id: topology.sql.in 2469 2006-09-06 11:16:59Z strk $
--
-- PostGIS - Spatial Types for PostgreSQL
-- http://postgis.refractions.net
--
--
-
-#define CREATEFUNCTION CREATE OR REPLACE FUNCTION
-
-#if USE_VERSION > 72
-# define _IMMUTABLE_STRICT IMMUTABLE STRICT
-# define _IMMUTABLE IMMUTABLE
-# define _STABLE_STRICT STABLE STRICT
-# define _STABLE STABLE
-# define _VOLATILE_STRICT VOLATILE STRICT
-# define _VOLATILE VOLATILE
-# define _STRICT STRICT
-#else
-# define _IMMUTABLE_STRICT with(iscachable,isstrict)
-# define _IMMUTABLE with(iscachable)
-# define _STABLE_STRICT with(isstrict)
-# define _STABLE
-# define _VOLATILE_STRICT with(isstrict)
-# define _VOLATILE
-# define _STRICT with(isstrict)
-#endif
+#include "../lwgeom/sqldefines.h"
DROP SCHEMA topology CASCADE;
|| '')''
LOOP
RAISE EXCEPTION
- ''SQL/MM Spatial exception edge crosses node.'';
+ ''SQL/MM Spatial exception - edge crosses node.'';
END LOOP;
|| '')''
LOOP
RAISE EXCEPTION
- ''SQL/MM Spatial exception edge crosses node.'';
+ ''SQL/MM Spatial exception - edge crosses node.'';
END LOOP;
--
--
IF ! within(acurve, face) THEN
RAISE EXCEPTION
- ''SQL/MM Spatial exception geometry not within face.'';
+ ''SQL/MM Spatial exception - geometry not within face.'';
END IF;
END IF;
IF x(snodegeom) != x(StartPoint(acurve)) OR
y(snodegeom) != y(StartPoint(acurve)) THEN
RAISE EXCEPTION
- ''SQL/MM Spatial exception start node not geometry start point.'';
+ ''SQL/MM Spatial exception - start node not geometry start point.'';
END IF;
--
IF x(enodegeom) != x(EndPoint(acurve)) OR
y(enodegeom) != y(EndPoint(acurve)) THEN
RAISE EXCEPTION
- ''SQL/MM Spatial exception end node not geometry end point.'';
+ ''SQL/MM Spatial exception - end node not geometry end point.'';
END IF;
--