mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 01:22:47 +00:00
bf2901b473
git-svn-id: http://svn.osgeo.org/postgis/trunk@12198 b70326c6-7e19-0410-871a-916f4a2858ee
228 lines
5.2 KiB
Makefile
228 lines
5.2 KiB
Makefile
# **********************************************************************
|
|
# *
|
|
# * PostGIS - Spatial Types for PostgreSQL
|
|
# * http://postgis.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@
|
|
TMPDIR?=/tmp
|
|
|
|
POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
|
|
POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@
|
|
POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@
|
|
HAVE_JSON=@HAVE_JSON@
|
|
HAVE_SFCGAL=@HAVE_SFCGAL@
|
|
MINGWBUILD=@MINGWBUILD@
|
|
|
|
# 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.
|
|
PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
|
|
|
|
# Where we put our regression installation
|
|
ifeq ($(MINGWBUILD),1)
|
|
srcdir=$(shell bash -c "pwd -W")
|
|
else
|
|
srcdir=$(shell pwd)
|
|
endif
|
|
REGRESS_INSTALLDIR=$(srcdir)/00-regress-install
|
|
|
|
#
|
|
# Put path from pg_config into front of search path
|
|
#
|
|
PATH := $(PGSQL_BINDIR):$(PATH)
|
|
export PATH
|
|
|
|
|
|
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 \
|
|
loader/TSTPolygon \
|
|
loader/TSIPolygon \
|
|
loader/TSTIPolygon \
|
|
loader/PointWithSchema \
|
|
loader/NoTransPoint \
|
|
loader/NotReallyMultiPoint \
|
|
loader/MultiToSinglePoint \
|
|
loader/ReprojectPts \
|
|
loader/ReprojectPtsGeog \
|
|
loader/Latin1 \
|
|
loader/Latin1-implicit \
|
|
dumper/literalsrid \
|
|
dumper/realtable \
|
|
binary \
|
|
regress \
|
|
regress_index \
|
|
regress_index_nulls \
|
|
regress_selectivity \
|
|
lwgeom_regress \
|
|
regress_lrs \
|
|
removepoint \
|
|
setpoint \
|
|
simplify \
|
|
snaptogrid \
|
|
summary \
|
|
affine \
|
|
empty \
|
|
forcecurve \
|
|
measures \
|
|
legacy \
|
|
long_xact \
|
|
ctors \
|
|
sql-mm-serialize \
|
|
sql-mm-circularstring \
|
|
sql-mm-compoundcurve \
|
|
sql-mm-curvepoly \
|
|
sql-mm-general \
|
|
sql-mm-multicurve \
|
|
sql-mm-multisurface \
|
|
polyhedralsurface \
|
|
polygonize \
|
|
postgis_type_name \
|
|
geography \
|
|
out_geometry \
|
|
out_geography \
|
|
in_geohash \
|
|
in_gml \
|
|
in_kml \
|
|
iscollection \
|
|
regress_ogc \
|
|
regress_ogc_cover \
|
|
regress_ogc_prep \
|
|
regress_bdpoly \
|
|
regress_proj \
|
|
regress_management \
|
|
dump \
|
|
dumppoints \
|
|
boundary \
|
|
wmsservers \
|
|
wkt \
|
|
wkb \
|
|
tickets \
|
|
typmod \
|
|
remove_repeated_points \
|
|
split \
|
|
relate \
|
|
bestsrid \
|
|
concave_hull
|
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
|
|
# GEOS-3.3 adds:
|
|
# ST_HausdorffDistance, ST_Buffer(params)
|
|
TESTS += \
|
|
hausdorff \
|
|
regress_buffer_params
|
|
endif
|
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1)
|
|
# GEOS-3.3 adds:
|
|
# ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
|
|
# ST_Snap, ST_UnaryUnion, ST_MakeClean
|
|
TESTS += \
|
|
offsetcurve \
|
|
relatematch \
|
|
isvaliddetail \
|
|
sharedpaths \
|
|
snap \
|
|
node \
|
|
unaryunion \
|
|
clean \
|
|
relate_bnr
|
|
endif
|
|
|
|
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
|
|
# GEOS-3.4 adds:
|
|
# ST_DelaunayTriangles
|
|
TESTS += \
|
|
delaunaytriangles
|
|
endif
|
|
|
|
ifeq ($(HAVE_JSON),yes)
|
|
# JSON-C adds:
|
|
# ST_GeomFromGeoJSON()
|
|
TESTS += \
|
|
in_geojson
|
|
endif
|
|
|
|
ifeq ($(HAVE_SFCGAL),yes)
|
|
# SFCGAL additionnal backend
|
|
TESTS += \
|
|
regress_sfcgal \
|
|
sfcgal/empty.sql \
|
|
sfcgal/geography.sql \
|
|
sfcgal/legacy.sql \
|
|
sfcgal/measures.sql \
|
|
sfcgal/regress_ogc_prep.sql \
|
|
sfcgal/regress_ogc.sql \
|
|
sfcgal/regress.sql \
|
|
sfcgal/tickets.sql \
|
|
sfcgal/concave_hull.sql \
|
|
sfcgal/wmsservers.sql
|
|
|
|
RUNTESTFLAGS = --sfcgal
|
|
endif
|
|
|
|
|
|
all install uninstall:
|
|
|
|
distclean: clean
|
|
rm Makefile
|
|
|
|
staged-install-topology:
|
|
@if test x"@TOPOLOGY@" != "x"; then \
|
|
$(MAKE) -C ../topology REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
|
|
fi
|
|
|
|
staged-install-raster:
|
|
@if test x"@RASTER@" != "x"; then \
|
|
$(MAKE) -C ../raster/rt_pg REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
|
|
fi
|
|
|
|
staged-install: staged-install-raster staged-install-topology
|
|
$(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
|
|
$(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
|
|
$(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
|
|
#$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
|
|
|
|
test check: staged-install
|
|
$(PERL) run_test.pl $(RUNTESTFLAGS) $(TESTS) && \
|
|
$(PERL) run_test.pl --upgrade $(RUNTESTFLAGS) $(TESTS)
|
|
|
|
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 '-------------------------------------------------'
|
|
psql -d postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1
|
|
#dropdb postgis_garden
|
|
|
|
cleanup:
|
|
@sleep 1
|
|
@dropdb postgis_reg > /dev/null
|
|
|
|
clean:
|
|
rm -rf $(REGRESS_INSTALLDIR)
|