-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
105 lines (86 loc) · 3.56 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# **********************************************************************
# *
# * PostGIS - Spatial Types for PostgreSQL
# * http://postgis.net
# *
# * Copyright (C) 2018 Sandro Santilli <[email protected]>
# *
# * 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@
MINGWBUILD=@MINGWBUILD@
HAVE_SFCGAL=@HAVE_SFCGAL@
POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
topsrcdir = $(realpath ../)
# 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
# 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)
#
# Put path from pg_config into front of search path
#
PATH := $(PGSQL_BINDIR):$(PATH)
export PATH
all install uninstall:
check: check-regress
check-unit:
include core/tests.mk
include loader/tests.mk
include dumper/tests.mk
include runtest.mk
clean:
rm -rf $(REGRESS_INSTALLDIR)
rm -f postgis_garden_result.txt
distclean: clean
rm -f Makefile
rm -f core/Makefile
rm -f loader/Makefile
rm -f dumper/Makefile
staged-install-sfcgal:
@if test x"@SFCGAL@" != "x"; then \
$(MAKE) -C ../sfcgal REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
fi
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-core:
$(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
$(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
#$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
staged-install:
$(MAKE) staged-install-core
$(MAKE) staged-install-raster
$(MAKE) staged-install-topology
$(MAKE) staged-install-sfcgal
$(PERL) -pi -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
garden: staged-install
createdb postgis_garden
createlang plpgsql postgis_garden || true #tolerate an error here
psql --no-psqlrc --variable ON_ERROR_STOP=true -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/postgis.sql && \
psql --no-psqlrc --variable ON_ERROR_STOP=true -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/spatial_ref_sys.sql || true # tolerate an error here
psql --no-psqlrc --variable ON_ERROR_STOP=true -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/rtpostgis.sql || true #tolerate an error here
@echo '-------------------------------------------------'
@echo 'Regression tests in progress (it will take time)'
@echo 'Result output: ./regress/postgis_garden_result.txt'
@echo '-------------------------------------------------'
psql --no-psqlrc -ad postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1
tail postgis_garden_result.txt
psql --no-psqlrc -ad postgis_garden < ../doc/raster_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > raster_garden_result.txt 2>&1
tail raster_garden_result.txt
#dropdb postgis_garden