File: Makefile.in

package info (click to toggle)
postgis 3.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,052 kB
  • sloc: ansic: 162,204; sql: 93,950; xml: 53,121; cpp: 12,646; perl: 5,658; sh: 5,369; makefile: 3,434; python: 1,205; yacc: 447; lex: 151; pascal: 58
file content (196 lines) | stat: -rw-r--r-- 6,044 bytes parent folder | download
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# **********************************************************************
# *
# * PostGIS - Spatial Types for PostgreSQL
# * http://postgis.net
# *
# * Copyright (C) 2010-2022 Sandro Santilli <strk@kbt.io>
# * Copyright (C) 2008 Mark Cave-Ayland
# * Copyright (C) 2005 Refractions Research Inc.
# *
# * This is free software; you can redistribute and/or modify it under
# * the terms of the GNU General Public Licence. See the COPYING file.
# *
# **********************************************************************

#
# PostGIS PGXS build system
#

POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@

MODULE_big=postgis_topology-@POSTGIS_MAJOR_VERSION@
MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
MODULEPATH=$$libdir/postgis_topology-@POSTGIS_MAJOR_VERSION@

ifeq (@LIBINCLUDEMINORVERSION@,yes)
MODULEPATH=$$libdir/postgis_topology-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
MODULE_big=postgis_topology-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
endif

# Files to be copied to the contrib/ directory
DATA_built=topology.sql topology_upgrade.sql uninstall_topology.sql


# SQL preprocessor
SQLPP = @SQLPP@

# SQL objects (files requiring pre-processing)
SQL_OBJS = \
  topology.sql \
  topology_upgrade.sql \
  topology_before_upgrade.sql \
  topology_after_upgrade.sql

# Objects to build using PGXS

OBJS = postgis_topology.o

# Libraries to link into the module (proj, geos)
#
# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using
# -L... -l options to prevent issues with some platforms trying to link
# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
# older version of PostGIS, rather than with the static liblwgeom.a
# supplied with newer versions of PostGIS
PG_CPPFLAGS += -I@top_builddir@/liblwgeom -I@top_srcdir@/liblwgeom -I@top_srcdir@/libpgcommon @CFLAGS@ @CPPFLAGS@ @PICFLAGS@
SHLIB_LINK_F = @top_builddir@/libpgcommon/libpgcommon.a @top_builddir@/liblwgeom/.libs/liblwgeom.a @SHLIB_LINK@

# Add SFCGAL Flags if defined
ifeq (@SFCGAL@,sfcgal)
PG_CPPFLAGS += @SFCGAL_CPPFLAGS@
SHLIB_LINK_F += @SFCGAL_LDFLAGS@
endif


# Extra files to remove during 'make clean'
EXTRA_CLEAN=$(SQL_OBJS) topology_upgrade.sql.in

# PGXS information
PG_CONFIG := @PG_CONFIG@
PGXS := @PGXS@
# NO_TEMP_INSTALL is a workaround for a 9.5dev bug. See:
# http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com
NO_TEMP_INSTALL=yes


top_builddir = @top_builddir@
VPATH := @srcdir@
INSTALL = @INSTALL@
LIBTOOL := @LIBTOOL@

include $(PGXS)

# Set prefix variables _after_ the include of PGXS
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@

# Set PERL _after_ the include of PGXS
PERL=@PERL@

# This is to workaround a bug in PGXS 8.4 win32 link line,
# see http://trac.osgeo.org/postgis/ticket/1158#comment:57
SHLIB_LINK := $(SHLIB_LINK_F) $(SHLIB_LINK)

$(OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postgis_config.h


# If REGRESS=1 passed as a parameter, change the default install paths
# so that no prefix is included. This allows us to relocate to a temporary
# directory for regression testing.
ifeq ($(REGRESS),1)
        bindir=/bin
        pkglibdir=/lib
        datadir=/share
        datamoduledir=contrib/postgis
endif



# Generate any .sql file from .sql.in files by running them through the SQL pre-processor
%.sql: %.sql.in
	$(SQLPP) -I@top_builddir@/postgis -I@top_srcdir@ $< > $@.tmp
	grep -v '^#' $@.tmp | \
	$(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g" > $@
	rm -f $@.tmp

topology_upgrade.sql.in:  topology.sql ../utils/create_upgrade.pl
	$(PERL) @top_srcdir@/utils/create_upgrade.pl $< > $@
	#$(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@

topology_upgrade.sql: ../postgis/common_before_upgrade.sql topology_before_upgrade.sql topology_upgrade.sql.in topology_after_upgrade.sql ../postgis/common_after_upgrade.sql
	echo "BEGIN;" > $@
	cat $^ > $@
	echo "COMMIT;" >> $@

topology.sql: \
	sql/cleanup/RemoveUnusedPrimitives.sql.in \
	sql/sqlmm.sql.in \
	sql/populate.sql.in \
	sql/polygonize.sql.in \
	sql/export/gml.sql.in \
	sql/export/TopoJSON.sql.in \
	sql/query/getnodebypoint.sql.in \
	sql/query/getedgebypoint.sql.in \
	sql/query/getfacebypoint.sql.in \
	sql/query/GetRingEdges.sql.in \
	sql/query/GetNodeEdges.sql.in \
	sql/query/GetFaceContainingPoint.sql.in \
	sql/manage/AddTopoGeometryColumn.sql.in \
	sql/manage/CopyTopology.sql.in \
	sql/manage/CreateTopology.sql.in \
	sql/manage/FindLayer.sql.in \
	sql/manage/FindTopology.sql.in \
	sql/manage/ManageHelper.sql.in \
	sql/manage/populate_topology_layer.sql.in \
	sql/manage/RenameTopology.sql.in \
	sql/manage/TopologySummary.sql.in \
	sql/manage/ValidateTopologyRelation.sql.in \
	sql/manage/ValidateTopology.sql.in \
	sql/topoelement/topoelement_agg.sql.in \
	sql/topogeometry/type.sql.in \
	sql/topogeometry/totopogeom.sql.in \
	sql/topogeometry/cleartopogeom.sql.in \
	sql/topogeometry/topogeom_edit.sql.in \
	sql/topogeometry/simplify.sql.in \
	sql/predicates.sql.in \
	../libpgcommon/sql/AddToSearchPath.sql.inc \
	../postgis/sqldefines.h \
	../postgis_revision.h

uninstall_topology.sql: topology.sql ../utils/create_uninstall.pl
	$(PERL) @top_srcdir@/utils/create_uninstall.pl $< $(POSTGIS_PGSQL_VERSION) > $@

check-unit:

check-regress: topology.sql
	$(MAKE) -C test $@

check: check-regress

clean: clean-subdirs

clean-subdirs:
	$(MAKE) -C test clean

distclean: clean
	rm -f Makefile test/Makefile

installdir:
	mkdir -p $(DESTDIR)$(bindir)

install: install-importer install-exporter

install-importer: loader/pgtopo_import | installdir
	$(LIBTOOL) --mode=install $(INSTALL) $^ "$(DESTDIR)$(bindir)/pgtopo_import"

install-exporter: loader/pgtopo_export | installdir
	$(LIBTOOL) --mode=install $(INSTALL) $^ "$(DESTDIR)$(bindir)/pgtopo_export"

uninstall: uninstall-importer uninstall-exporter

uninstall-importer:
	rm -f '$(DESTDIR)$(bindir)/pgtopo_import'

uninstall-exporter:
	rm -f '$(DESTDIR)$(bindir)/pgtopo_export'