1 #-----------------------------------------------------
3 # Configuration directives are in postgis_config.h
5 #-----------------------------------------------------
8 ifeq (@LIBLWGEOM_ONLY@,no)
9 SUBDIRS += libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils doc @EXTENSIONS@ @DEPS_SUBDIR@
12 POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
13 POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
14 POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
18 # todo: add more rules here, like uninstall, clean...
19 all install uninstall noop clean distclean check-unit check-regress:
20 for s in $(SUBDIRS); do \
21 echo "---- Making $@ in $${s}"; \
22 $(MAKE) -C $${s} $@ || exit 1; \
24 @if test x"$@" = xall; then \
25 echo "PostGIS was built successfully. Ready to install."; \
28 all: postgis_svn_revision.h
30 ifeq (@LIBLWGEOM_ONLY@,no)
31 install: all comments-install
32 uninstall: docs-uninstall comments-uninstall
35 clean: docs-clean clean-local
39 # TODO: drop 'test' target..
42 check: check-no-trailing-blanks check-unit check-regress docs-check
44 check-unit check-regress docs-check: all
46 check-no-trailing-blanks:
47 ! find . -name '*.c' -o -name '*.h' -o -name '*.proto' | \
48 grep -v lwin_wkt_lex.c | \
49 grep -v lwin_wkt_parse | \
51 grep -v vector_tile.pb-c | \
52 grep -v postgis/sqldefines.h | \
53 xargs grep -n '[[:space:]]$$'
55 installcheck: installcheck-base installcheck-upgrade
58 RUNTESTFLAGS="$(RUNTESTFLAGS) --extension" $(MAKE) check-regress
60 # only run upgrade test if RUNTESTFLAGS was not already doing that
61 installcheck-upgrade: installcheck-upgrade-byfunc
62 if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
63 RUNTESTFLAGS="$(RUNTESTFLAGS) --extension \
64 --upgrade-path unpackaged--$(POSTGIS_MAJOR_VERSION).$(POSTGIS_MINOR_VERSION).$(POSTGIS_MICRO_VERSION)" \
65 $(MAKE) check-regress; \
68 # only run upgrade test if RUNTESTFLAGS was not already doing that
69 installcheck-upgrade-byfunc:
70 if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
71 RUNTESTFLAGS="$(RUNTESTFLAGS) --extension \
72 --upgrade-path unpackaged--$(POSTGIS_MAJOR_VERSION).$(POSTGIS_MINOR_VERSION).$(POSTGIS_MICRO_VERSION)!" \
73 $(MAKE) check-regress; \
76 distclean: distclean-local
78 distclean-local: clean-local
81 rm -f config.log config.cache config.status
82 rm -f postgis_config.h
84 maintainer-clean-local: distclean-local
89 @echo '------------------------------------------------------'
90 @echo 'This command is intended for maintainers to use; it'
91 @echo 'deletes files that may need special tools to rebuild.'
92 @echo '------------------------------------------------------'
93 $(MAKE) -C doc maintainer-clean
94 $(MAKE) -C postgis maintainer-clean
95 $(MAKE) -C liblwgeom maintainer-clean
96 $(MAKE) maintainer-clean-local
99 @echo '------------------------------------------------------'
100 @echo 'Generating SQL file from Documentation'
101 @echo '------------------------------------------------------'
102 $(MAKE) -C doc garden
103 @echo '------------------------------------------------------'
104 @echo 'Launch regression Test'
105 @echo '------------------------------------------------------'
106 $(MAKE) -C regress garden
109 $(MAKE) -C extras/template_gis
112 $(MAKE) -C extras/template_gis clean
115 $(MAKE) -C extras/template_gis install
117 templategis-uninstall:
118 $(MAKE) -C extras/template_gis uninstall
130 $(MAKE) -C doc comments
133 $(MAKE) -C doc cheatsheets
136 $(MAKE) -C doc comments-install
139 $(MAKE) -C doc comments-uninstall
142 $(MAKE) -C doc install
145 $(MAKE) -C doc uninstall
150 configure: configure.in
153 config.status: configure
157 git log --pretty --numstat --summary | git2cl > ChangeLog
159 raster-post-install-check:
160 $(MAKE) -C raster post-install-check
163 $(MAKE) -C raster rtpostgis.sql
170 $(MAKE) fmt && $(MAKE) clean && $(MAKE) check && svn commit
172 authors.git: authors.svn
173 sed -e 's/:/ = /' authors.svn > authors.git
175 svnrebase: authors.git
176 git svn rebase --authors-file authors.git
178 postgis_svn_revision.h:
179 $(PERL) utils/svn_repo_revision.pl
181 .PHONY: utils liblwgeom ChangeLog raster postgis_svn_revision.h