]> granicus.if.org Git - postgis/blob - GNUmakefile.in
Generate ChangeLog from git (not svn)
[postgis] / GNUmakefile.in
1 #-----------------------------------------------------
2 #
3 # Configuration directives are in postgis_config.h
4 #
5 #-----------------------------------------------------
6
7 SUBDIRS = liblwgeom
8 ifeq (@LIBLWGEOM_ONLY@,no)
9 SUBDIRS += libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils doc @EXTENSIONS@ @DEPS_SUBDIR@
10 endif
11
12 POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
13 POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
14 POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
15
16 PERL = @PERL@
17
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; \
23         done;
24         @if test x"$@" = xall; then \
25                 echo "PostGIS was built successfully. Ready to install."; \
26         fi
27
28 all: postgis_svn_revision.h
29
30 ifeq (@LIBLWGEOM_ONLY@,no)
31 install: all comments-install
32 uninstall: docs-uninstall comments-uninstall
33 endif
34
35 clean: docs-clean clean-local
36
37 clean-local:
38
39 # TODO: drop 'test' target..
40 test: check
41
42 check: check-no-trailing-blanks check-unit check-regress docs-check
43
44 check-unit check-regress docs-check: all
45
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 | \
50                 grep -v lookup3 | \
51                 grep -v vector_tile.pb-c | \
52                 grep -v postgis/sqldefines.h | \
53                 xargs grep -n '[[:space:]]$$'
54
55 installcheck: installcheck-base installcheck-upgrade
56
57 installcheck-base:
58         RUNTESTFLAGS="$(RUNTESTFLAGS) --extension" $(MAKE) check-regress
59
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; \
66         fi
67
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; \
74         fi
75
76 distclean: distclean-local
77
78 distclean-local: clean-local
79         rm -Rf autom4te.cache
80         rm -f GNUmakefile
81         rm -f config.log config.cache config.status
82         rm -f postgis_config.h
83
84 maintainer-clean-local: distclean-local
85         rm -f configure
86         rm -Rf build-aux
87
88 maintainer-clean:
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
97
98 garden:
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
107
108 templategis:
109         $(MAKE) -C extras/template_gis
110
111 templategis-clean:
112         $(MAKE) -C extras/template_gis clean
113
114 templategis-install:
115         $(MAKE) -C extras/template_gis install
116
117 templategis-uninstall:
118         $(MAKE) -C extras/template_gis uninstall
119
120 docs:
121         $(MAKE) -C doc html
122
123 docs-clean:
124         $(MAKE) -C doc clean
125
126 docs-check:
127         $(MAKE) -C doc check
128
129 comments:
130         $(MAKE) -C doc comments
131
132 cheatsheets:
133         $(MAKE) -C doc cheatsheets
134
135 comments-install:
136         $(MAKE) -C doc comments-install
137
138 comments-uninstall:
139         $(MAKE) -C doc comments-uninstall
140
141 docs-install:
142         $(MAKE) -C doc install
143
144 docs-uninstall:
145         $(MAKE) -C doc uninstall
146
147 #utils:
148 #       $(MAKE) -C utils
149
150 configure: configure.in
151         ./autogen.sh
152
153 config.status: configure
154         ./configure
155
156 ChangeLog:
157         git log --pretty --numstat --summary | git2cl > ChangeLog
158
159 raster-post-install-check:
160         $(MAKE) -C raster post-install-check
161
162 raster-sql:
163         $(MAKE) -C raster rtpostgis.sql
164
165 .PHONY: fmt
166 fmt:
167         ./astyle.sh
168
169 commit:
170         $(MAKE) fmt && $(MAKE) clean && $(MAKE) check && svn commit
171
172 authors.git: authors.svn
173         sed -e 's/:/ = /' authors.svn > authors.git
174
175 svnrebase: authors.git
176         git svn rebase --authors-file authors.git
177
178 postgis_svn_revision.h:
179         $(PERL) utils/svn_repo_revision.pl
180
181 .PHONY: utils liblwgeom ChangeLog raster postgis_svn_revision.h