2012-01-17 17:13:32 +00:00
|
|
|
# **********************************************************************
|
|
|
|
# *
|
|
|
|
# * PostGIS - Spatial Types for PostgreSQL
|
|
|
|
# * http://postgis.refractions.net
|
|
|
|
# *
|
|
|
|
# * Copyright (C) 2011-2012 Sandro Santilli <strk@keybit.net>
|
|
|
|
# * Copyright (C) 2009-2011 Paul Ramsey <pramsey@cleverelephant.ca>
|
|
|
|
# * Copyright (C) 2008-2009 Mark Cave-Ayland
|
|
|
|
# *
|
|
|
|
# * This is free software; you can redistribute and/or modify it under
|
|
|
|
# * the terms of the GNU General Public Licence. See the COPYING file.
|
|
|
|
# *
|
|
|
|
# **********************************************************************
|
|
|
|
|
|
|
|
PERL=@PERL@
|
2005-03-04 14:13:23 +00:00
|
|
|
TMPDIR?=/tmp
|
|
|
|
|
2008-05-14 17:10:19 +00:00
|
|
|
POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
|
|
|
|
POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@
|
|
|
|
POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@
|
2011-11-18 00:17:56 +00:00
|
|
|
HAVE_JSON=@HAVE_JSON@
|
2012-03-07 20:47:38 +00:00
|
|
|
MINGWBUILD=@MINGWBUILD@
|
2009-07-18 19:01:31 +00:00
|
|
|
|
|
|
|
# MingW hack: rather than use PGSQL_BINDIR directly, we change
|
|
|
|
# to the directory and then use "pwd" to return the path. This
|
|
|
|
# ensures that the returned path is in MSYS format, otherwise
|
|
|
|
# colons in drive letters will break PATH.
|
2010-08-08 22:20:01 +00:00
|
|
|
PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
|
2005-12-02 15:11:51 +00:00
|
|
|
|
2009-11-17 14:00:09 +00:00
|
|
|
# Where we put our regression installation
|
2012-03-07 20:47:38 +00:00
|
|
|
ifeq ($(MINGWBUILD),1)
|
|
|
|
srcdir=$(shell bash -c "pwd -W")
|
|
|
|
else
|
|
|
|
srcdir=$(shell pwd)
|
|
|
|
endif
|
2009-11-17 14:00:09 +00:00
|
|
|
REGRESS_INSTALLDIR=$(srcdir)/00-regress-install
|
2009-07-08 16:03:36 +00:00
|
|
|
|
2009-06-04 14:17:07 +00:00
|
|
|
#
|
|
|
|
# Put path from pg_config into front of search path
|
|
|
|
#
|
2009-07-30 16:03:55 +00:00
|
|
|
PATH := $(PGSQL_BINDIR):$(PATH)
|
2009-06-04 14:17:07 +00:00
|
|
|
export PATH
|
|
|
|
|
|
|
|
|
2006-06-17 11:44:12 +00:00
|
|
|
TESTS = \
|
|
|
|
loader/Point \
|
|
|
|
loader/PointM \
|
|
|
|
loader/PointZ \
|
|
|
|
loader/MultiPoint \
|
|
|
|
loader/MultiPointM \
|
|
|
|
loader/MultiPointZ \
|
|
|
|
loader/Arc \
|
|
|
|
loader/ArcM \
|
|
|
|
loader/ArcZ \
|
|
|
|
loader/Polygon \
|
|
|
|
loader/PolygonM \
|
|
|
|
loader/PolygonZ \
|
2011-03-16 17:16:47 +00:00
|
|
|
loader/TSTPolygon \
|
|
|
|
loader/TSIPolygon \
|
|
|
|
loader/TSTIPolygon \
|
2011-03-18 17:36:01 +00:00
|
|
|
loader/PointWithSchema \
|
2011-03-16 17:16:47 +00:00
|
|
|
loader/NoTransPoint \
|
2011-03-18 15:40:31 +00:00
|
|
|
loader/NotReallyMultiPoint \
|
|
|
|
loader/MultiToSinglePoint \
|
|
|
|
loader/ReprojectPts \
|
|
|
|
loader/ReprojectPtsGeog \
|
2011-03-18 19:13:26 +00:00
|
|
|
loader/Latin1 \
|
2012-01-17 19:15:48 +00:00
|
|
|
binary \
|
2006-06-17 11:44:12 +00:00
|
|
|
regress \
|
|
|
|
regress_index \
|
2006-12-20 18:44:55 +00:00
|
|
|
regress_index_nulls \
|
2012-12-04 19:54:29 +00:00
|
|
|
regress_selectivity \
|
2006-06-17 11:44:12 +00:00
|
|
|
lwgeom_regress \
|
|
|
|
regress_lrs \
|
|
|
|
removepoint \
|
|
|
|
setpoint \
|
|
|
|
simplify \
|
|
|
|
snaptogrid \
|
2011-11-02 16:53:09 +00:00
|
|
|
summary \
|
2006-06-17 11:44:12 +00:00
|
|
|
affine \
|
2011-12-14 14:37:18 +00:00
|
|
|
empty \
|
2006-06-25 23:59:33 +00:00
|
|
|
measures \
|
2012-02-27 17:36:45 +00:00
|
|
|
legacy \
|
2006-07-25 20:16:00 +00:00
|
|
|
long_xact \
|
2006-12-01 22:16:44 +00:00
|
|
|
ctors \
|
2007-05-28 15:34:04 +00:00
|
|
|
sql-mm-serialize \
|
|
|
|
sql-mm-circularstring \
|
|
|
|
sql-mm-compoundcurve \
|
|
|
|
sql-mm-curvepoly \
|
|
|
|
sql-mm-general \
|
|
|
|
sql-mm-multicurve \
|
2008-04-24 01:04:52 +00:00
|
|
|
sql-mm-multisurface \
|
2010-08-08 20:41:17 +00:00
|
|
|
polyhedralsurface \
|
2011-03-21 16:33:14 +00:00
|
|
|
polygonize \
|
2011-07-04 11:24:46 +00:00
|
|
|
postgis_type_name \
|
2012-07-11 18:15:50 +00:00
|
|
|
geography \
|
2010-02-23 14:52:28 +00:00
|
|
|
out_geometry \
|
|
|
|
out_geography \
|
2013-05-03 04:04:22 +00:00
|
|
|
in_geohash \
|
2009-12-18 19:08:20 +00:00
|
|
|
in_gml \
|
|
|
|
in_kml \
|
2010-07-01 13:20:43 +00:00
|
|
|
iscollection \
|
2008-05-14 17:10:19 +00:00
|
|
|
regress_ogc \
|
2010-01-15 17:54:52 +00:00
|
|
|
regress_ogc_cover \
|
|
|
|
regress_ogc_prep \
|
2008-05-14 17:10:19 +00:00
|
|
|
regress_bdpoly \
|
2009-11-16 19:47:33 +00:00
|
|
|
regress_proj \
|
2011-03-15 14:04:45 +00:00
|
|
|
regress_management \
|
2010-12-01 14:41:30 +00:00
|
|
|
dump \
|
2009-11-16 21:13:44 +00:00
|
|
|
dumppoints \
|
2013-05-05 16:24:09 +00:00
|
|
|
boundary \
|
2012-01-26 20:25:29 +00:00
|
|
|
wmsservers \
|
2012-01-11 11:17:10 +00:00
|
|
|
wkt \
|
|
|
|
wkb \
|
2010-02-14 22:59:57 +00:00
|
|
|
tickets \
|
2012-01-13 17:33:26 +00:00
|
|
|
typmod \
|
2010-03-10 15:33:33 +00:00
|
|
|
remove_repeated_points \
|
2011-03-08 08:16:16 +00:00
|
|
|
split \
|
2011-04-05 22:26:45 +00:00
|
|
|
relate \
|
2012-01-16 17:00:50 +00:00
|
|
|
bestsrid \
|
2011-04-05 22:26:45 +00:00
|
|
|
concave_hull
|
2007-05-28 15:34:04 +00:00
|
|
|
|
2009-06-26 09:35:43 +00:00
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
|
2011-02-16 09:12:50 +00:00
|
|
|
# GEOS-3.3 adds:
|
|
|
|
# ST_HausdorffDistance, ST_Buffer(params)
|
|
|
|
TESTS += \
|
|
|
|
hausdorff \
|
|
|
|
regress_buffer_params
|
2010-12-02 18:12:39 +00:00
|
|
|
endif
|
|
|
|
|
2011-02-14 17:26:38 +00:00
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1)
|
2011-02-16 09:12:50 +00:00
|
|
|
# GEOS-3.3 adds:
|
|
|
|
# ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
|
|
|
|
# ST_Snap, ST_UnaryUnion, ST_MakeClean
|
|
|
|
TESTS += \
|
2011-07-01 10:36:22 +00:00
|
|
|
offsetcurve \
|
2011-02-16 09:12:50 +00:00
|
|
|
relatematch \
|
|
|
|
isvaliddetail \
|
|
|
|
sharedpaths \
|
|
|
|
snap \
|
2011-11-04 18:24:54 +00:00
|
|
|
node \
|
2011-02-16 09:12:50 +00:00
|
|
|
unaryunion \
|
2011-03-08 10:23:42 +00:00
|
|
|
clean \
|
|
|
|
relate_bnr
|
2011-02-14 17:26:38 +00:00
|
|
|
endif
|
|
|
|
|
2012-06-27 15:53:53 +00:00
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
|
|
|
|
# GEOS-3.4 adds:
|
|
|
|
# ST_DelaunayTriangles
|
|
|
|
TESTS += \
|
|
|
|
delaunaytriangles
|
|
|
|
endif
|
|
|
|
|
2012-03-07 11:39:46 +00:00
|
|
|
ifeq ($(HAVE_JSON),yes)
|
2011-11-18 00:17:56 +00:00
|
|
|
# JSON-C adds:
|
|
|
|
# ST_GeomFromGeoJSON()
|
|
|
|
TESTS += \
|
|
|
|
in_geojson
|
|
|
|
endif
|
|
|
|
|
2012-03-21 20:32:29 +00:00
|
|
|
all install uninstall:
|
|
|
|
|
|
|
|
distclean: clean
|
2012-03-21 21:36:59 +00:00
|
|
|
rm Makefile
|
2010-12-16 17:30:39 +00:00
|
|
|
|
2012-01-17 17:13:32 +00:00
|
|
|
staged-install-topology:
|
|
|
|
@if test x"@TOPOLOGY@" != "x"; then \
|
|
|
|
$(MAKE) -C ../topology REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
|
|
|
|
fi
|
2010-03-12 15:14:01 +00:00
|
|
|
|
2012-01-17 17:13:32 +00:00
|
|
|
staged-install-raster:
|
|
|
|
@if test x"@RASTER@" != "x"; then \
|
|
|
|
$(MAKE) -C ../raster/rt_pg REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
|
|
|
|
fi
|
2011-12-21 17:09:45 +00:00
|
|
|
|
2012-01-17 17:13:32 +00:00
|
|
|
staged-install: staged-install-raster staged-install-topology
|
2009-11-17 14:00:09 +00:00
|
|
|
$(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
|
2012-02-13 10:58:28 +00:00
|
|
|
$(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
|
2012-02-10 17:05:25 +00:00
|
|
|
$(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
|
2011-08-31 07:06:57 +00:00
|
|
|
#$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
|
2010-05-03 16:02:19 +00:00
|
|
|
|
2011-12-21 17:09:45 +00:00
|
|
|
test check: staged-install
|
2012-05-31 22:49:56 +00:00
|
|
|
$(PERL) run_test.pl $(RUNTESTFLAGS) $(TESTS) && \
|
|
|
|
$(PERL) run_test.pl --upgrade $(RUNTESTFLAGS) $(TESTS)
|
2009-06-03 23:07:48 +00:00
|
|
|
|
2010-02-26 15:05:55 +00:00
|
|
|
garden:
|
|
|
|
createdb postgis_garden
|
|
|
|
createlang plpgsql postgis_garden
|
|
|
|
psql -d postgis_garden < ../postgis/postgis.sql
|
|
|
|
psql -d postgis_garden < ../spatial_ref_sys.sql
|
|
|
|
@echo '-------------------------------------------------'
|
|
|
|
@echo 'Regression tests in progress (it will take time)'
|
|
|
|
@echo 'Result output: ./regress/garden_result.txt'
|
|
|
|
@echo '-------------------------------------------------'
|
2011-06-27 01:53:51 +00:00
|
|
|
psql -d postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1
|
|
|
|
#dropdb postgis_garden
|
2010-02-26 15:05:55 +00:00
|
|
|
|
2005-12-01 15:53:02 +00:00
|
|
|
cleanup:
|
2006-01-29 13:54:38 +00:00
|
|
|
@sleep 1
|
|
|
|
@dropdb postgis_reg > /dev/null
|
2005-12-01 15:53:02 +00:00
|
|
|
|
|
|
|
clean:
|
2009-11-17 14:00:09 +00:00
|
|
|
rm -rf $(REGRESS_INSTALLDIR)
|