forked from postgis/postgis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
80 lines (66 loc) · 2.33 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
# **********************************************************************
# *
# * PostGIS - Spatial Types for PostgreSQL
# * http://postgis.net
# *
# * Copyright 2008 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.
# *
# **********************************************************************
# Separate PGXS-enabled Makefile for documentation installation (it is
# not possible to merge into the main Makefile as has been done for
# the shapefile loader)
MODULE_doc=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
MODULEDIR=contrib/$(MODULE_doc)
# Files to be copied to the contrib/ directory
DATA_built=postgis_restore.pl
# PGXS information
PG_CONFIG = @PG_CONFIG@
PGXS := @PGXS@
include $(PGXS)
SHELL = @SHELL@
INSTALL = $(SHELL) ../build-aux/install-sh
SCRIPTS_built = postgis_restore.pl
SCRIPTS = \
create_undef.pl \
svn_repo_revision.pl \
postgis_proc_upgrade.pl \
profile_intersects.pl \
test_estimation.pl \
test_joinestimation.pl
SRID_MAXIMUM = @SRID_MAX@
SRID_USER_MAXIMUM = @SRID_USR_MAX@
all: postgis_restore.pl
chmod +x $(SCRIPTS)
DROP_FILES = \
../raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in \
../raster/rt_pg/rtpostgis_drop.sql.in \
../postgis/postgis_drop_after.sql \
../postgis/postgis_drop_before.sql
update-restore:
tac postgis_restore.pl.in | sed '/^__END__/q' | grep -v '^__END__' \
> postgis_restore_data
grep '^DROP FUNCTION IF EXISTS' $(DROP_FILES) | \
cut -d: -f2 | sed 's/^DROP FUNCTION IF EXISTS //' | \
sed 's/ *, */,/g' | \
sed 's/ *( */(/g' | \
sed 's/ *) */)/g' | \
tr '[A-Z]' '[a-z]' | \
sed 's/varchar/character varying/g' | \
sed 's/float8/double precision/g' | \
sed 's/\<int\>/integer/g' | \
sed 's/\<int4\>/integer/g' | \
sed 's/\<int8\>/bigint/g' | \
sed 's/\(.*\); *\(--.*\)\?/FUNCTION \1/' >> postgis_restore_data
cat postgis_restore.pl.in | sed '/^__END__/q' > postgis_restore.pl.in.new
cat postgis_restore_data | sort -u >> postgis_restore.pl.in.new
mv postgis_restore.pl.in.new postgis_restore.pl.in
rm -f postgis_restore_data
postgis_restore.pl: postgis_restore.pl.in
sed 's,@SRID_MAXIMUM@,$(SRID_MAXIMUM),g;s,@SRID_USER_MAXIMUM@,$(SRID_USER_MAXIMUM),' $< >$@
distclean: clean
rm -f Makefile
# And there's nothing to check
check: