Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 66d1f035

History | View | Annotate | Download (24.6 kB)

1 e8230860 Michael Hanselmann
# Ganeti makefile
2 e8230860 Michael Hanselmann
# - Indent with tabs only.
3 e8230860 Michael Hanselmann
# - Keep files sorted; one line per file.
4 e8230860 Michael Hanselmann
# - Directories in lib/ must have their own *dir variable (see hypervisor).
5 e8230860 Michael Hanselmann
# - All directories must be listed DIRS.
6 0a7bed64 Michael Hanselmann
# - Use autogen.sh to generate Makefile.in and configure script.
7 e8230860 Michael Hanselmann
8 e8230860 Michael Hanselmann
# Automake doesn't export these variables before version 1.10.
9 e8230860 Michael Hanselmann
abs_top_builddir = @abs_top_builddir@
10 e8230860 Michael Hanselmann
abs_top_srcdir = @abs_top_srcdir@
11 e8230860 Michael Hanselmann
12 a01dd3c6 Iustin Pop
# Use bash in order to be able to use pipefail
13 a01dd3c6 Iustin Pop
SHELL=/bin/bash
14 a01dd3c6 Iustin Pop
15 6e06b36c Iustin Pop
ACLOCAL_AMFLAGS = -I autotools
16 4f3d5b76 Michael Hanselmann
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
17 b959138f Michael Hanselmann
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
18 eed5c5df Michael Hanselmann
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
19 a4f12da4 Michael Hanselmann
CHECK_MAN = $(top_srcdir)/autotools/check-man
20 96602be4 Michael Hanselmann
CHECK_VERSION = $(top_srcdir)/autotools/check-version
21 7385c51d Michael Hanselmann
CHECK_NEWS = $(top_srcdir)/autotools/check-news
22 e8230860 Michael Hanselmann
REPLACE_VARS_SED = autotools/replace_vars.sed
23 e8230860 Michael Hanselmann
24 2d48a3a2 Michael Hanselmann
clientdir = $(pkgpythondir)/client
25 e8230860 Michael Hanselmann
hypervisordir = $(pkgpythondir)/hypervisor
26 ff9efc03 Michael Hanselmann
httpdir = $(pkgpythondir)/http
27 dc101ecc Michael Hanselmann
masterddir = $(pkgpythondir)/masterd
28 12426ae1 Guido Trotter
confddir = $(pkgpythondir)/confd
29 8c229cc7 Oleksiy Mishchenko
rapidir = $(pkgpythondir)/rapi
30 899c4d2c Michael Hanselmann
serverdir = $(pkgpythondir)/server
31 9f4bb951 Michael Hanselmann
watcherdir = $(pkgpythondir)/watcher
32 bb44b1ae Michael Hanselmann
impexpddir = $(pkgpythondir)/impexpd
33 c047a981 Michael Hanselmann
utilsdir = $(pkgpythondir)/utils
34 e8230860 Michael Hanselmann
toolsdir = $(pkglibdir)/tools
35 e8230860 Michael Hanselmann
docdir = $(datadir)/doc/$(PACKAGE)
36 e8230860 Michael Hanselmann
37 a4f12da4 Michael Hanselmann
# Delete output file if an error occurred while building it
38 a4f12da4 Michael Hanselmann
.DELETE_ON_ERROR:
39 a4f12da4 Michael Hanselmann
40 e8230860 Michael Hanselmann
DIRS = \
41 e8230860 Michael Hanselmann
	autotools \
42 e8230860 Michael Hanselmann
	daemons \
43 e8230860 Michael Hanselmann
	devel \
44 e8230860 Michael Hanselmann
	doc \
45 e8230860 Michael Hanselmann
	doc/examples \
46 d6d9ce45 Guido Trotter
	doc/examples/hooks \
47 c51580b3 Guido Trotter
	doc/examples/gnt-debug \
48 e8230860 Michael Hanselmann
	lib \
49 2d48a3a2 Michael Hanselmann
	lib/client \
50 f9897b6d Michael Hanselmann
	lib/build \
51 2f16ea8f Michael Hanselmann
	lib/confd \
52 ff9efc03 Michael Hanselmann
	lib/http \
53 e8230860 Michael Hanselmann
	lib/hypervisor \
54 bb44b1ae Michael Hanselmann
	lib/impexpd \
55 dc101ecc Michael Hanselmann
	lib/masterd \
56 8c229cc7 Oleksiy Mishchenko
	lib/rapi \
57 899c4d2c Michael Hanselmann
	lib/server \
58 c047a981 Michael Hanselmann
	lib/utils \
59 9f4bb951 Michael Hanselmann
	lib/watcher \
60 e8230860 Michael Hanselmann
	man \
61 e8230860 Michael Hanselmann
	qa \
62 e8230860 Michael Hanselmann
	test \
63 e8230860 Michael Hanselmann
	test/data \
64 e8230860 Michael Hanselmann
	tools
65 e8230860 Michael Hanselmann
66 2750b299 Michael Hanselmann
BUILDTIME_DIR_AUTOCREATE = \
67 c964d962 Michael Hanselmann
	scripts \
68 6b997854 Michael Hanselmann
	doc/api \
69 2750b299 Michael Hanselmann
	doc/coverage
70 2750b299 Michael Hanselmann
71 2750b299 Michael Hanselmann
BUILDTIME_DIRS = \
72 2750b299 Michael Hanselmann
	$(BUILDTIME_DIR_AUTOCREATE) \
73 6b997854 Michael Hanselmann
	doc/html
74 6b997854 Michael Hanselmann
75 6b997854 Michael Hanselmann
DIRCHECK_EXCLUDE = \
76 6b997854 Michael Hanselmann
	$(BUILDTIME_DIRS) \
77 6b997854 Michael Hanselmann
	ganeti-[0-9]*.[0-9]*.[0-9]* \
78 6b997854 Michael Hanselmann
	doc/html/_*
79 6b997854 Michael Hanselmann
80 2750b299 Michael Hanselmann
all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
81 c964d962 Michael Hanselmann
82 2ab2b9f5 Iustin Pop
MAINTAINERCLEANFILES = \
83 d17e74b4 Iustin Pop
	$(docpng) \
84 b76aac08 Michael Hanselmann
	$(maninput) \
85 cbf3d64b Michael Hanselmann
	doc/install-quick.rst \
86 84a12e40 Iustin Pop
	doc/news.rst \
87 7a03d293 Michael Hanselmann
	doc/upgrade.rst \
88 84a12e40 Iustin Pop
	vcs-version
89 2ab2b9f5 Iustin Pop
90 d17e74b4 Iustin Pop
maintainer-clean-local:
91 6b997854 Michael Hanselmann
	rm -rf $(BUILDTIME_DIRS)
92 d17e74b4 Iustin Pop
93 e8230860 Michael Hanselmann
CLEANFILES = \
94 2f16ea8f Michael Hanselmann
	$(addsuffix /*.py[co],$(DIRS)) \
95 c964d962 Michael Hanselmann
	$(all_dirfiles) \
96 2d48a3a2 Michael Hanselmann
	$(PYTHON_BOOTSTRAP) \
97 f774bd03 Michael Hanselmann
	epydoc.conf \
98 e8230860 Michael Hanselmann
	autotools/replace_vars.sed \
99 f154a7a3 Michael Hanselmann
	daemons/daemon-util \
100 46a8da3b René Nussbaumer
	daemons/ensure-dirs \
101 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner \
102 e8230860 Michael Hanselmann
	devel/upload \
103 f72f8622 Iustin Pop
	doc/examples/bash_completion \
104 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd \
105 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd \
106 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron \
107 679008e7 Iustin Pop
	doc/examples/gnt-config-backup \
108 a2442bf9 Luca Bigliardi
	doc/examples/hooks/ipsec \
109 2ab2b9f5 Iustin Pop
	$(man_MANS) \
110 2ab2b9f5 Iustin Pop
	$(manhtml) \
111 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup \
112 dd1dfd9a Michael Hanselmann
	stamp-srclinks \
113 e8230860 Michael Hanselmann
	$(nodist_pkgpython_PYTHON)
114 e8230860 Michael Hanselmann
115 c964d962 Michael Hanselmann
# BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
116 c964d962 Michael Hanselmann
# it'll cause the target to rebuild every time.
117 dc7d2c49 Michael Hanselmann
BUILT_SOURCES = \
118 dc7d2c49 Michael Hanselmann
	ganeti \
119 dd1dfd9a Michael Hanselmann
	stamp-srclinks \
120 2d1f248e Michael Hanselmann
	lib/_autoconf.py \
121 c964d962 Michael Hanselmann
	$(all_dirfiles) \
122 2d1f248e Michael Hanselmann
	$(PYTHON_BOOTSTRAP)
123 2d1f248e Michael Hanselmann
124 e8230860 Michael Hanselmann
nodist_pkgpython_PYTHON = \
125 e8230860 Michael Hanselmann
	lib/_autoconf.py
126 e8230860 Michael Hanselmann
127 f9897b6d Michael Hanselmann
noinst_PYTHON = \
128 5f43f393 Michael Hanselmann
	lib/build/__init__.py \
129 5f43f393 Michael Hanselmann
	lib/build/sphinx_ext.py
130 f9897b6d Michael Hanselmann
131 e8230860 Michael Hanselmann
pkgpython_PYTHON = \
132 e8230860 Michael Hanselmann
	lib/__init__.py \
133 a8a76bc2 Guido Trotter
	lib/asyncnotifier.py \
134 e8230860 Michael Hanselmann
	lib/backend.py \
135 e8230860 Michael Hanselmann
	lib/bdev.py \
136 e8230860 Michael Hanselmann
	lib/bootstrap.py \
137 e8230860 Michael Hanselmann
	lib/cli.py \
138 e8230860 Michael Hanselmann
	lib/cmdlib.py \
139 cea881e5 Michael Hanselmann
	lib/compat.py \
140 e8230860 Michael Hanselmann
	lib/config.py \
141 e8230860 Michael Hanselmann
	lib/constants.py \
142 821d9e43 Michael Hanselmann
	lib/daemon.py \
143 e8230860 Michael Hanselmann
	lib/errors.py \
144 62e0e880 Iustin Pop
	lib/ht.py \
145 e8230860 Michael Hanselmann
	lib/jqueue.py \
146 8b537bb0 Michael Hanselmann
	lib/jstore.py \
147 e8230860 Michael Hanselmann
	lib/locking.py \
148 e8230860 Michael Hanselmann
	lib/luxi.py \
149 e8230860 Michael Hanselmann
	lib/mcpu.py \
150 a744b676 Manuel Franceschini
	lib/netutils.py \
151 e8230860 Michael Hanselmann
	lib/objects.py \
152 e8230860 Michael Hanselmann
	lib/opcodes.py \
153 a123dc19 Michael Hanselmann
	lib/qlang.py \
154 4ca96421 Michael Hanselmann
	lib/query.py \
155 e8230860 Michael Hanselmann
	lib/rpc.py \
156 f12e1736 René Nussbaumer
	lib/runtime.py \
157 e8230860 Michael Hanselmann
	lib/serializer.py \
158 e8230860 Michael Hanselmann
	lib/ssconf.py \
159 e8230860 Michael Hanselmann
	lib/ssh.py \
160 ac2d0fe4 Michael Hanselmann
	lib/storage.py \
161 1338f2b4 Balazs Lecz
	lib/uidpool.py \
162 76094e37 Michael Hanselmann
	lib/workerpool.py
163 e8230860 Michael Hanselmann
164 2d48a3a2 Michael Hanselmann
client_PYTHON = \
165 c2855a12 Michael Hanselmann
	lib/client/__init__.py \
166 02266fe0 Michael Hanselmann
	lib/client/gnt_backup.py \
167 7b3e7d41 Michael Hanselmann
	lib/client/gnt_cluster.py \
168 6d50f5f9 Michael Hanselmann
	lib/client/gnt_debug.py \
169 667dbd6b Adeodato Simo
	lib/client/gnt_group.py \
170 e792102d Michael Hanselmann
	lib/client/gnt_instance.py \
171 a09b9e3d Michael Hanselmann
	lib/client/gnt_job.py \
172 37494fa4 Michael Hanselmann
	lib/client/gnt_node.py \
173 6d50f5f9 Michael Hanselmann
	lib/client/gnt_os.py
174 2d48a3a2 Michael Hanselmann
175 e8230860 Michael Hanselmann
hypervisor_PYTHON = \
176 e8230860 Michael Hanselmann
	lib/hypervisor/__init__.py \
177 e8230860 Michael Hanselmann
	lib/hypervisor/hv_base.py \
178 48297fa2 Iustin Pop
	lib/hypervisor/hv_chroot.py \
179 e8230860 Michael Hanselmann
	lib/hypervisor/hv_fake.py \
180 eb58f9b1 Guido Trotter
	lib/hypervisor/hv_kvm.py \
181 4b5e40a5 Iustin Pop
	lib/hypervisor/hv_lxc.py \
182 e8230860 Michael Hanselmann
	lib/hypervisor/hv_xen.py
183 e8230860 Michael Hanselmann
184 8c229cc7 Oleksiy Mishchenko
rapi_PYTHON = \
185 8c229cc7 Oleksiy Mishchenko
	lib/rapi/__init__.py \
186 10b207d4 Oleksiy Mishchenko
	lib/rapi/baserlib.py \
187 95ab4de9 David Knowles
	lib/rapi/client.py \
188 20b509de Michael Hanselmann
	lib/rapi/client_utils.py \
189 10b207d4 Oleksiy Mishchenko
	lib/rapi/connector.py \
190 10b207d4 Oleksiy Mishchenko
	lib/rapi/rlib2.py
191 8c229cc7 Oleksiy Mishchenko
192 ff9efc03 Michael Hanselmann
http_PYTHON = \
193 02cab3e7 Michael Hanselmann
	lib/http/__init__.py \
194 be500c29 Michael Hanselmann
	lib/http/auth.py \
195 02cab3e7 Michael Hanselmann
	lib/http/client.py \
196 02cab3e7 Michael Hanselmann
	lib/http/server.py
197 ff9efc03 Michael Hanselmann
198 12426ae1 Guido Trotter
confd_PYTHON = \
199 71f27d19 Guido Trotter
	lib/confd/__init__.py \
200 e4ccf6cd Guido Trotter
	lib/confd/client.py \
201 2f16ea8f Michael Hanselmann
	lib/confd/querylib.py \
202 2f16ea8f Michael Hanselmann
	lib/confd/server.py
203 8c229cc7 Oleksiy Mishchenko
204 dc101ecc Michael Hanselmann
masterd_PYTHON = \
205 033a1d00 Michael Hanselmann
	lib/masterd/__init__.py \
206 033a1d00 Michael Hanselmann
	lib/masterd/instance.py
207 dc101ecc Michael Hanselmann
208 bb44b1ae Michael Hanselmann
impexpd_PYTHON = \
209 bb44b1ae Michael Hanselmann
	lib/impexpd/__init__.py
210 bb44b1ae Michael Hanselmann
211 9f4bb951 Michael Hanselmann
watcher_PYTHON = \
212 9f4bb951 Michael Hanselmann
	lib/watcher/__init__.py
213 9f4bb951 Michael Hanselmann
214 899c4d2c Michael Hanselmann
server_PYTHON = \
215 29d91329 Michael Hanselmann
	lib/server/__init__.py \
216 5c9c0e0e Michael Hanselmann
	lib/server/confd.py \
217 5119f2ec Michael Hanselmann
	lib/server/masterd.py \
218 d9c82a4e Michael Hanselmann
	lib/server/noded.py \
219 d9c82a4e Michael Hanselmann
	lib/server/rapi.py
220 899c4d2c Michael Hanselmann
221 c047a981 Michael Hanselmann
utils_PYTHON = \
222 4fd029cf Michael Hanselmann
	lib/utils/__init__.py \
223 79d22269 Michael Hanselmann
	lib/utils/algo.py \
224 9d1b963f Michael Hanselmann
	lib/utils/filelock.py \
225 f21bb4b7 Michael Hanselmann
	lib/utils/hash.py \
226 3865ca48 Michael Hanselmann
	lib/utils/io.py \
227 1ae4c5a1 Michael Hanselmann
	lib/utils/log.py \
228 36a4acd4 Michael Hanselmann
	lib/utils/mlock.py \
229 17b97ab3 Michael Hanselmann
	lib/utils/nodesetup.py \
230 a4ccecf6 Michael Hanselmann
	lib/utils/process.py \
231 7fcffe27 Michael Hanselmann
	lib/utils/retry.py \
232 7831fc5f Michael Hanselmann
	lib/utils/text.py \
233 c50645c0 Michael Hanselmann
	lib/utils/wrapper.py \
234 c50645c0 Michael Hanselmann
	lib/utils/x509.py
235 c047a981 Michael Hanselmann
236 f05c99f3 Michael Hanselmann
docrst = \
237 ffa6869f Iustin Pop
	doc/admin.rst \
238 5c0c1eeb Iustin Pop
	doc/design-2.0.rst \
239 4f366caf Michael Hanselmann
	doc/design-2.1.rst \
240 e56bb0e8 Guido Trotter
	doc/design-2.2.rst \
241 1eb85930 Guido Trotter
	doc/design-2.3.rst \
242 78b40c5e Michael Hanselmann
	doc/design-2.4.rst \
243 c95c0f71 Michael Hanselmann
	doc/design-draft.rst \
244 1e86ee97 Marc Schmitt
	doc/design-oob.rst \
245 e5a246df Michael Hanselmann
	doc/design-query2.rst \
246 d9bdffc3 René Nussbaumer
	doc/cluster-merge.rst \
247 62947ebb Michael Hanselmann
	doc/devnotes.rst \
248 e2078d28 Iustin Pop
	doc/glossary.rst \
249 4d6443f4 Iustin Pop
	doc/hooks.rst \
250 876860a3 Iustin Pop
	doc/iallocator.rst \
251 d17e74b4 Iustin Pop
	doc/index.rst \
252 cbf3d64b Michael Hanselmann
	doc/install-quick.rst \
253 28e15341 Iustin Pop
	doc/install.rst \
254 9725b53d Michael Hanselmann
	doc/locking.rst \
255 6bf273d5 Michael Hanselmann
	doc/move-instance.rst \
256 c71a1a3d Iustin Pop
	doc/news.rst \
257 6d81475c Iustin Pop
	doc/rapi.rst \
258 b76aac08 Michael Hanselmann
	doc/security.rst \
259 35dd762d Michael Hanselmann
	doc/upgrade.rst \
260 c71a1a3d Iustin Pop
	doc/walkthrough.rst
261 f05c99f3 Michael Hanselmann
262 c964d962 Michael Hanselmann
$(RUN_IN_TEMPDIR): | $(all_dirfiles)
263 c964d962 Michael Hanselmann
264 a2d917f3 Iustin Pop
# Note: we use here an order-only prerequisite, as the contents of
265 a2d917f3 Iustin Pop
# _autoconf.py are not actually influencing the html build output: it
266 a2d917f3 Iustin Pop
# has to exist in order for the sphinx module to be loaded
267 a2d917f3 Iustin Pop
# successfully, but we certainly don't want the docs to be rebuilt if
268 a2d917f3 Iustin Pop
# it changes
269 c964d962 Michael Hanselmann
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
270 a2d917f3 Iustin Pop
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
271 a2d917f3 Iustin Pop
	| lib/_autoconf.py
272 d17e74b4 Iustin Pop
	@test -n "$(SPHINX)" || \
273 d17e74b4 Iustin Pop
	    { echo 'sphinx-build' not found during configure; exit 1; }
274 2750b299 Michael Hanselmann
	@mkdir_p@ $(dir $@)
275 e7f6524c Michael Hanselmann
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
276 13de7d59 Michael Hanselmann
	    -d . \
277 d17e74b4 Iustin Pop
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
278 d17e74b4 Iustin Pop
	    -D release="$(PACKAGE_VERSION)" \
279 13de7d59 Michael Hanselmann
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
280 13de7d59 Michael Hanselmann
	rm -f doc/html/.buildinfo doc/html/objects.inv
281 13de7d59 Michael Hanselmann
	touch $@
282 13de7d59 Michael Hanselmann
283 c964d962 Michael Hanselmann
doc/html: doc/html/index.html
284 2ab2b9f5 Iustin Pop
285 cbf3d64b Michael Hanselmann
doc/install-quick.rst: INSTALL
286 b76aac08 Michael Hanselmann
doc/news.rst: NEWS
287 7a03d293 Michael Hanselmann
doc/upgrade.rst: UPGRADE
288 b76aac08 Michael Hanselmann
289 e8deef56 Michael Hanselmann
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
290 cbf3d64b Michael Hanselmann
	set -e; \
291 cbf3d64b Michael Hanselmann
	{ echo '.. This file is automatically updated at build time from $<.'; \
292 cbf3d64b Michael Hanselmann
	  echo '.. Do not edit.'; \
293 cbf3d64b Michael Hanselmann
	  echo; \
294 cbf3d64b Michael Hanselmann
	  cat $<; \
295 cbf3d64b Michael Hanselmann
	} > $@
296 cbf3d64b Michael Hanselmann
297 b8195800 Iustin Pop
docdot = \
298 ca9ccea8 Michael Hanselmann
	doc/arch-2.0.dot \
299 ca9ccea8 Michael Hanselmann
	doc/design-2.1-lock-acquire.dot \
300 ca9ccea8 Michael Hanselmann
	doc/design-2.1-lock-release.dot
301 b8195800 Iustin Pop
302 d17e74b4 Iustin Pop
docpng = $(patsubst %.dot,%.png,$(docdot))
303 e8230860 Michael Hanselmann
304 7e1ccbe0 Michael Hanselmann
# Things to build but not to install (add it to EXTRA_DIST if it should be
305 7e1ccbe0 Michael Hanselmann
# distributed)
306 7e1ccbe0 Michael Hanselmann
noinst_DATA = \
307 7e1ccbe0 Michael Hanselmann
	devel/upload \
308 7e1ccbe0 Michael Hanselmann
	doc/html \
309 7e1ccbe0 Michael Hanselmann
	doc/examples/bash_completion \
310 7e1ccbe0 Michael Hanselmann
	doc/examples/ganeti.cron \
311 7e1ccbe0 Michael Hanselmann
	doc/examples/ganeti.initd \
312 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd \
313 679008e7 Iustin Pop
	doc/examples/gnt-config-backup \
314 7e1ccbe0 Michael Hanselmann
	doc/examples/hooks/ipsec \
315 7e1ccbe0 Michael Hanselmann
	$(manhtml)
316 f29266b4 Iustin Pop
317 4f3d5b76 Michael Hanselmann
gnt_scripts = \
318 e8230860 Michael Hanselmann
	scripts/gnt-backup \
319 e8230860 Michael Hanselmann
	scripts/gnt-cluster \
320 e8230860 Michael Hanselmann
	scripts/gnt-debug \
321 667dbd6b Adeodato Simo
	scripts/gnt-group \
322 e8230860 Michael Hanselmann
	scripts/gnt-instance \
323 e8230860 Michael Hanselmann
	scripts/gnt-job \
324 e8230860 Michael Hanselmann
	scripts/gnt-node \
325 e8230860 Michael Hanselmann
	scripts/gnt-os
326 e8230860 Michael Hanselmann
327 c2855a12 Michael Hanselmann
PYTHON_BOOTSTRAP = \
328 5c9c0e0e Michael Hanselmann
	daemons/ganeti-confd \
329 29d91329 Michael Hanselmann
	daemons/ganeti-masterd \
330 5119f2ec Michael Hanselmann
	daemons/ganeti-noded \
331 9f4bb951 Michael Hanselmann
	daemons/ganeti-watcher \
332 d9c82a4e Michael Hanselmann
	daemons/ganeti-rapi \
333 02266fe0 Michael Hanselmann
	scripts/gnt-backup \
334 7b3e7d41 Michael Hanselmann
	scripts/gnt-cluster \
335 6d50f5f9 Michael Hanselmann
	scripts/gnt-debug \
336 667dbd6b Adeodato Simo
	scripts/gnt-group \
337 e792102d Michael Hanselmann
	scripts/gnt-instance \
338 a09b9e3d Michael Hanselmann
	scripts/gnt-job \
339 37494fa4 Michael Hanselmann
	scripts/gnt-node \
340 6d50f5f9 Michael Hanselmann
	scripts/gnt-os
341 2d48a3a2 Michael Hanselmann
342 a8c68e44 Michael Hanselmann
qa_scripts = \
343 a8c68e44 Michael Hanselmann
	qa/ganeti-qa.py \
344 a8c68e44 Michael Hanselmann
	qa/qa_cluster.py \
345 a8c68e44 Michael Hanselmann
	qa/qa_config.py \
346 a8c68e44 Michael Hanselmann
	qa/qa_daemon.py \
347 a8c68e44 Michael Hanselmann
	qa/qa_env.py \
348 a8c68e44 Michael Hanselmann
	qa/qa_error.py \
349 a8c68e44 Michael Hanselmann
	qa/qa_instance.py \
350 a8c68e44 Michael Hanselmann
	qa/qa_node.py \
351 a8c68e44 Michael Hanselmann
	qa/qa_os.py \
352 a8c68e44 Michael Hanselmann
	qa/qa_rapi.py \
353 a8c68e44 Michael Hanselmann
	qa/qa_tags.py \
354 a8c68e44 Michael Hanselmann
	qa/qa_utils.py
355 a8c68e44 Michael Hanselmann
356 da7e44ee Michael Hanselmann
dist_sbin_SCRIPTS = \
357 da7e44ee Michael Hanselmann
	tools/ganeti-listrunner
358 4f3d5b76 Michael Hanselmann
359 fc3fd894 Michael Hanselmann
nodist_sbin_SCRIPTS = \
360 2d48a3a2 Michael Hanselmann
	$(PYTHON_BOOTSTRAP) \
361 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner
362 fc3fd894 Michael Hanselmann
363 e8230860 Michael Hanselmann
dist_tools_SCRIPTS = \
364 e8230860 Michael Hanselmann
	tools/burnin \
365 e8230860 Michael Hanselmann
	tools/cfgshell \
366 e8230860 Michael Hanselmann
	tools/cfgupgrade \
367 b5672ea0 Iustin Pop
	tools/cfgupgrade12 \
368 1f7d3f7d René Nussbaumer
	tools/cluster-merge \
369 ea5fd476 Iustin Pop
	tools/lvmstrap \
370 6bf273d5 Michael Hanselmann
	tools/move-instance \
371 05cd934d René Nussbaumer
	tools/setup-ssh \
372 ea5fd476 Iustin Pop
	tools/sanitize-config
373 e8230860 Michael Hanselmann
374 2d76b580 Michael Hanselmann
pkglib_python_scripts = \
375 c6ccba7e Michael Hanselmann
	daemons/import-export \
376 c6ccba7e Michael Hanselmann
	tools/check-cert-expired
377 2d76b580 Michael Hanselmann
378 f154a7a3 Michael Hanselmann
pkglib_SCRIPTS = \
379 2d76b580 Michael Hanselmann
	daemons/daemon-util \
380 46a8da3b René Nussbaumer
	daemons/ensure-dirs \
381 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup \
382 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts)
383 f154a7a3 Michael Hanselmann
384 e8230860 Michael Hanselmann
EXTRA_DIST = \
385 e8230860 Michael Hanselmann
	NEWS \
386 7a03d293 Michael Hanselmann
	UPGRADE \
387 f774bd03 Michael Hanselmann
	epydoc.conf.in \
388 70c771f6 Michael Hanselmann
	pylintrc \
389 bb46a96c Michael Hanselmann
	autotools/build-bash-completion \
390 eed5c5df Michael Hanselmann
	autotools/check-python-code \
391 a4f12da4 Michael Hanselmann
	autotools/check-man \
392 c81ed2b2 Michael Hanselmann
	autotools/check-news \
393 e627fe09 Michael Hanselmann
	autotools/check-tar \
394 96602be4 Michael Hanselmann
	autotools/check-version \
395 27e336af Michael Hanselmann
	autotools/gen-coverage \
396 e8c8cf1a Michael Hanselmann
	autotools/testrunner \
397 f3313af5 Guido Trotter
	$(RUN_IN_TEMPDIR) \
398 f154a7a3 Michael Hanselmann
	daemons/daemon-util.in \
399 46a8da3b René Nussbaumer
	daemons/ensure-dirs.in \
400 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner.in \
401 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
402 e8230860 Michael Hanselmann
	devel/upload.in \
403 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup.in \
404 b8195800 Iustin Pop
	$(docdot) \
405 f727d134 Michael Hanselmann
	$(docpng) \
406 d17e74b4 Iustin Pop
	$(docrst) \
407 d17e74b4 Iustin Pop
	doc/conf.py \
408 d17e74b4 Iustin Pop
	doc/html \
409 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd.in \
410 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd.in \
411 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron.in \
412 679008e7 Iustin Pop
	doc/examples/gnt-config-backup.in \
413 752a8ca8 Michael Hanselmann
	doc/examples/ganeti.default \
414 752a8ca8 Michael Hanselmann
	doc/examples/ganeti.default-debug \
415 d6d9ce45 Guido Trotter
	doc/examples/hooks/ethers \
416 a2442bf9 Luca Bigliardi
	doc/examples/hooks/ipsec.in \
417 89c04c2d Guido Trotter
	doc/examples/gnt-debug/README \
418 89c04c2d Guido Trotter
	doc/examples/gnt-debug/delay0.json \
419 89c04c2d Guido Trotter
	doc/examples/gnt-debug/delay50.json \
420 e8230860 Michael Hanselmann
	test/testutils.py \
421 e8230860 Michael Hanselmann
	test/mocks.py \
422 e8230860 Michael Hanselmann
	$(dist_TESTS) \
423 e8230860 Michael Hanselmann
	$(TEST_FILES) \
424 6be8e2bf Iustin Pop
	man/footer.rst \
425 6be8e2bf Iustin Pop
	$(manrst) \
426 f727d134 Michael Hanselmann
	$(maninput) \
427 39e0d19e Michael Hanselmann
	qa/qa-sample.json \
428 a8c68e44 Michael Hanselmann
	$(qa_scripts)
429 e8230860 Michael Hanselmann
430 e8230860 Michael Hanselmann
man_MANS = \
431 e8230860 Michael Hanselmann
	man/ganeti.7 \
432 bae7e531 Michael Hanselmann
	man/ganeti-cleaner.8 \
433 b7b7cda6 Guido Trotter
	man/ganeti-confd.8 \
434 da7e44ee Michael Hanselmann
	man/ganeti-listrunner.8 \
435 320d986d Iustin Pop
	man/ganeti-masterd.8 \
436 e8230860 Michael Hanselmann
	man/ganeti-noded.8 \
437 e8230860 Michael Hanselmann
	man/ganeti-os-interface.7 \
438 320d986d Iustin Pop
	man/ganeti-rapi.8 \
439 e8230860 Michael Hanselmann
	man/ganeti-watcher.8 \
440 e8230860 Michael Hanselmann
	man/gnt-backup.8 \
441 e8230860 Michael Hanselmann
	man/gnt-cluster.8 \
442 d3b4cf9f Iustin Pop
	man/gnt-debug.8 \
443 667dbd6b Adeodato Simo
	man/gnt-group.8 \
444 e8230860 Michael Hanselmann
	man/gnt-instance.8 \
445 d3b4cf9f Iustin Pop
	man/gnt-job.8 \
446 e8230860 Michael Hanselmann
	man/gnt-node.8 \
447 e8230860 Michael Hanselmann
	man/gnt-os.8
448 e8230860 Michael Hanselmann
449 6be8e2bf Iustin Pop
manrst = $(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS)))
450 6be8e2bf Iustin Pop
manhtml = $(patsubst %.rst,%.html,$(manrst))
451 25c92bc5 Michael Hanselmann
maninput = \
452 25c92bc5 Michael Hanselmann
	$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
453 de8eea3e Iustin Pop
	$(patsubst %.html,%.html.in,$(manhtml)) \
454 6be8e2bf Iustin Pop
	man/footer.man man/footer.html
455 e8230860 Michael Hanselmann
456 e8230860 Michael Hanselmann
TEST_FILES = \
457 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-8.0.txt \
458 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-8.3.txt \
459 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-disk.txt \
460 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-net-ip4.txt \
461 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-net-ip6.txt \
462 27e46076 Michael Hanselmann
	test/data/cert1.pem \
463 d816408a Iustin Pop
	test/data/proc_drbd8.txt \
464 a6ac80db Iustin Pop
	test/data/proc_drbd80-emptyline.txt \
465 2d76b580 Michael Hanselmann
	test/data/proc_drbd83.txt \
466 549071a0 Luca Bigliardi
	test/data/sys_drbd_usermode_helper.txt \
467 2d76b580 Michael Hanselmann
	test/import-export_unittest-helper
468 e8230860 Michael Hanselmann
469 e8c8cf1a Michael Hanselmann
python_tests = \
470 17496050 Guido Trotter
	test/ganeti.asyncnotifier_unittest.py \
471 f942a838 Michael Hanselmann
	test/ganeti.backend_unittest.py \
472 6de7c41d Iustin Pop
	test/ganeti.bdev_unittest.py \
473 6de7c41d Iustin Pop
	test/ganeti.cli_unittest.py \
474 66d1f035 René Nussbaumer
	test/ganeti.client.gnt_cluster_unittest.py \
475 25ce3ec4 Michael Hanselmann
	test/ganeti.client.gnt_instance_unittest.py \
476 1118ec44 Guido Trotter
	test/ganeti.daemon_unittest.py \
477 6de7c41d Iustin Pop
	test/ganeti.cmdlib_unittest.py \
478 cea881e5 Michael Hanselmann
	test/ganeti.compat_unittest.py \
479 edf7d66e Iustin Pop
	test/ganeti.confd.client_unittest.py \
480 e8230860 Michael Hanselmann
	test/ganeti.config_unittest.py \
481 6de7c41d Iustin Pop
	test/ganeti.constants_unittest.py \
482 3bd19c66 Michael Hanselmann
	test/ganeti.errors_unittest.py \
483 e8230860 Michael Hanselmann
	test/ganeti.hooks_unittest.py \
484 ecdf0398 Michael Hanselmann
	test/ganeti.ht_unittest.py \
485 6de7c41d Iustin Pop
	test/ganeti.http_unittest.py \
486 b7d82e40 Iustin Pop
	test/ganeti.hypervisor_unittest.py \
487 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_chroot_unittest.py \
488 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_fake_unittest.py \
489 748e4b5a Michael Hanselmann
	test/ganeti.hypervisor.hv_kvm_unittest.py \
490 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_lxc_unittest.py \
491 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_xen_unittest.py \
492 bb44b1ae Michael Hanselmann
	test/ganeti.impexpd_unittest.py \
493 989a8bee Michael Hanselmann
	test/ganeti.jqueue_unittest.py \
494 e8230860 Michael Hanselmann
	test/ganeti.locking_unittest.py \
495 231db3a5 Michael Hanselmann
	test/ganeti.luxi_unittest.py \
496 033a1d00 Michael Hanselmann
	test/ganeti.masterd.instance_unittest.py \
497 407339d0 Michael Hanselmann
	test/ganeti.mcpu_unittest.py \
498 a744b676 Manuel Franceschini
	test/ganeti.netutils_unittest.py \
499 4c14965f Guido Trotter
	test/ganeti.objects_unittest.py \
500 c32b908e Michael Hanselmann
	test/ganeti.opcodes_unittest.py \
501 a123dc19 Michael Hanselmann
	test/ganeti.qlang_unittest.py \
502 4ca96421 Michael Hanselmann
	test/ganeti.query_unittest.py \
503 cfaeaaf7 Michael Hanselmann
	test/ganeti.rapi.baserlib_unittest.py \
504 95ab4de9 David Knowles
	test/ganeti.rapi.client_unittest.py \
505 4cbd4462 Oleksiy Mishchenko
	test/ganeti.rapi.resources_unittest.py \
506 6395cebb Michael Hanselmann
	test/ganeti.rapi.rlib2_unittest.py \
507 33231500 Michael Hanselmann
	test/ganeti.rpc_unittest.py \
508 f12e1736 René Nussbaumer
	test/ganeti.runtime_unittest.py \
509 6de7c41d Iustin Pop
	test/ganeti.serializer_unittest.py \
510 6de7c41d Iustin Pop
	test/ganeti.ssh_unittest.py \
511 93be53da Balazs Lecz
	test/ganeti.uidpool_unittest.py \
512 4fd029cf Michael Hanselmann
	test/ganeti.utils.algo_unittest.py \
513 9d1b963f Michael Hanselmann
	test/ganeti.utils.filelock_unittest.py \
514 f21bb4b7 Michael Hanselmann
	test/ganeti.utils.hash_unittest.py \
515 3865ca48 Michael Hanselmann
	test/ganeti.utils.io_unittest.py \
516 b6fa9a44 Michael Hanselmann
	test/ganeti.utils.log_unittest.py \
517 36a4acd4 Michael Hanselmann
	test/ganeti.utils.mlock_unittest.py \
518 17b97ab3 Michael Hanselmann
	test/ganeti.utils.nodesetup_unittest.py \
519 a4ccecf6 Michael Hanselmann
	test/ganeti.utils.process_unittest.py \
520 79d22269 Michael Hanselmann
	test/ganeti.utils.retry_unittest.py \
521 7fcffe27 Michael Hanselmann
	test/ganeti.utils.text_unittest.py \
522 7831fc5f Michael Hanselmann
	test/ganeti.utils.wrapper_unittest.py \
523 c50645c0 Michael Hanselmann
	test/ganeti.utils.x509_unittest.py \
524 4fd029cf Michael Hanselmann
	test/ganeti.utils_unittest.py \
525 3f991867 Michael Hanselmann
	test/ganeti.workerpool_unittest.py \
526 aefbe369 Michael Hanselmann
	test/cfgupgrade_unittest.py \
527 055f822b Michael Hanselmann
	test/docs_unittest.py \
528 055f822b Michael Hanselmann
	test/tempfile_fork_unittest.py
529 e8230860 Michael Hanselmann
530 e8c8cf1a Michael Hanselmann
dist_TESTS = \
531 7172f605 Michael Hanselmann
	test/check-cert-expired_unittest.bash \
532 571b34f8 Michael Hanselmann
	test/daemon-util_unittest.bash \
533 7172f605 Michael Hanselmann
	test/ganeti-cleaner_unittest.bash \
534 2d76b580 Michael Hanselmann
	test/import-export_unittest.bash \
535 e8c8cf1a Michael Hanselmann
	$(python_tests)
536 e8c8cf1a Michael Hanselmann
537 e8230860 Michael Hanselmann
nodist_TESTS =
538 e8230860 Michael Hanselmann
539 e8230860 Michael Hanselmann
TESTS = $(dist_TESTS) $(nodist_TESTS)
540 e8230860 Michael Hanselmann
541 27e336af Michael Hanselmann
# Environment for all tests
542 27e336af Michael Hanselmann
PLAIN_TESTS_ENVIRONMENT = \
543 27e336af Michael Hanselmann
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
544 27e336af Michael Hanselmann
545 27e336af Michael Hanselmann
# Environment for tests run by automake
546 f848ac00 Michael Hanselmann
TESTS_ENVIRONMENT = \
547 e8c8cf1a Michael Hanselmann
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
548 6e06b36c Iustin Pop
549 eed5c5df Michael Hanselmann
all_python_code = \
550 01a3a718 Michael Hanselmann
	$(dist_sbin_SCRIPTS) \
551 01a3a718 Michael Hanselmann
	$(dist_tools_SCRIPTS) \
552 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
553 e8c8cf1a Michael Hanselmann
	$(python_tests) \
554 01a3a718 Michael Hanselmann
	$(pkgpython_PYTHON) \
555 2d48a3a2 Michael Hanselmann
	$(client_PYTHON) \
556 01a3a718 Michael Hanselmann
	$(hypervisor_PYTHON) \
557 01a3a718 Michael Hanselmann
	$(rapi_PYTHON) \
558 899c4d2c Michael Hanselmann
	$(server_PYTHON) \
559 01a3a718 Michael Hanselmann
	$(http_PYTHON) \
560 01a3a718 Michael Hanselmann
	$(confd_PYTHON) \
561 dc101ecc Michael Hanselmann
	$(masterd_PYTHON) \
562 bb44b1ae Michael Hanselmann
	$(impexpd_PYTHON) \
563 c047a981 Michael Hanselmann
	$(utils_PYTHON) \
564 9f4bb951 Michael Hanselmann
	$(watcher_PYTHON) \
565 a8c68e44 Michael Hanselmann
	$(noinst_PYTHON) \
566 a8c68e44 Michael Hanselmann
	$(qa_scripts)
567 01a3a718 Michael Hanselmann
568 eed5c5df Michael Hanselmann
srclink_files = \
569 6be8e2bf Iustin Pop
	man/footer.rst \
570 7172f605 Michael Hanselmann
	test/check-cert-expired_unittest.bash \
571 571b34f8 Michael Hanselmann
	test/daemon-util_unittest.bash \
572 7172f605 Michael Hanselmann
	test/ganeti-cleaner_unittest.bash \
573 2d76b580 Michael Hanselmann
	test/import-export_unittest.bash \
574 eed5c5df Michael Hanselmann
	$(all_python_code)
575 eed5c5df Michael Hanselmann
576 eed5c5df Michael Hanselmann
check_python_code = \
577 e4e7c7df Michael Hanselmann
	$(BUILD_BASH_COMPLETION) \
578 eed5c5df Michael Hanselmann
	$(all_python_code)
579 eed5c5df Michael Hanselmann
580 e4e7c7df Michael Hanselmann
lint_python_code = \
581 f60d352e Michael Hanselmann
	ganeti \
582 f1763373 Iustin Pop
	ganeti/http/server.py \
583 f60d352e Michael Hanselmann
	$(dist_sbin_SCRIPTS) \
584 f60d352e Michael Hanselmann
	$(dist_tools_SCRIPTS) \
585 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
586 2cc8bdd0 Michael Hanselmann
	$(BUILD_BASH_COMPLETION) \
587 2cc8bdd0 Michael Hanselmann
	$(PYTHON_BOOTSTRAP)
588 eed5c5df Michael Hanselmann
589 571b34f8 Michael Hanselmann
test/daemon-util_unittest.bash: daemons/daemon-util
590 571b34f8 Michael Hanselmann
591 7172f605 Michael Hanselmann
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
592 7172f605 Michael Hanselmann
593 26916aad Apollon Oikonomopoulos
tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
594 26916aad Apollon Oikonomopoulos
	sed -f $(REPLACE_VARS_SED) < $< > $@
595 26916aad Apollon Oikonomopoulos
	chmod +x $@
596 26916aad Apollon Oikonomopoulos
597 dbefcc7e Michael Hanselmann
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
598 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
599 e8230860 Michael Hanselmann
	chmod u+x $@
600 e8230860 Michael Hanselmann
601 c964d962 Michael Hanselmann
daemons/%: daemons/%.in $(REPLACE_VARS_SED)
602 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
603 5c566e17 Michael Hanselmann
	chmod +x $@
604 e8230860 Michael Hanselmann
605 c964d962 Michael Hanselmann
doc/examples/%: doc/examples/%.in $(REPLACE_VARS_SED)
606 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
607 e8230860 Michael Hanselmann
608 c964d962 Michael Hanselmann
doc/examples/hooks/%: doc/examples/hooks/%.in $(REPLACE_VARS_SED)
609 a2442bf9 Luca Bigliardi
	sed -f $(REPLACE_VARS_SED) < $< > $@
610 a2442bf9 Luca Bigliardi
611 b959138f Michael Hanselmann
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
612 88a6ca6f Michael Hanselmann
	lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin
613 b959138f Michael Hanselmann
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
614 4f3d5b76 Michael Hanselmann
615 f86e82ef Iustin Pop
doc/%.png: doc/%.dot
616 2ab2b9f5 Iustin Pop
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
617 f86e82ef Iustin Pop
	$(DOT) -Tpng -o $@ $<
618 f86e82ef Iustin Pop
619 de8eea3e Iustin Pop
man/footer.man: man/footer.rst
620 de8eea3e Iustin Pop
	@test -n "$(PANDOC)" || \
621 de8eea3e Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
622 de8eea3e Iustin Pop
	$(PANDOC) -f rst -t man -o $@ $<
623 de8eea3e Iustin Pop
624 6be8e2bf Iustin Pop
man/footer.html: man/footer.rst
625 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
626 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
627 6be8e2bf Iustin Pop
	$(PANDOC) -f rst -t html -o $@ $<
628 6be8e2bf Iustin Pop
629 6be8e2bf Iustin Pop
man/%.7.in man/%.8.in: man/%.rst man/footer.man
630 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
631 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
632 a01dd3c6 Iustin Pop
	set -o pipefail ; \
633 6be8e2bf Iustin Pop
	$(PANDOC) -s -f rst -t man -A man/footer.man $< | \
634 6be8e2bf Iustin Pop
	  sed -e 's/\\@/@/g' > $@
635 5f55173b Iustin Pop
	if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
636 2ab2b9f5 Iustin Pop
637 6be8e2bf Iustin Pop
man/%.html.in: man/%.rst man/footer.html
638 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
639 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
640 a01dd3c6 Iustin Pop
	set -o pipefail ; \
641 6be8e2bf Iustin Pop
	$(PANDOC) -s -f rst -t html -A man/footer.html $< | \
642 6be8e2bf Iustin Pop
	  sed -e 's/\\@/@/g' > $@
643 6be8e2bf Iustin Pop
644 dbefcc7e Michael Hanselmann
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
645 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
646 e8230860 Michael Hanselmann
647 dbefcc7e Michael Hanselmann
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
648 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
649 e8230860 Michael Hanselmann
650 dbefcc7e Michael Hanselmann
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
651 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
652 f29266b4 Iustin Pop
653 75f76703 Michael Hanselmann
epydoc.conf: epydoc.conf.in Makefile
654 75f76703 Michael Hanselmann
	sed -e 's#@MODULES@#$(strip $(lint_python_code))#g' < $< > $@
655 f774bd03 Michael Hanselmann
656 84a12e40 Iustin Pop
vcs-version:
657 84a12e40 Iustin Pop
	if test -d .git; then \
658 84a12e40 Iustin Pop
	  git describe > $@; \
659 84a12e40 Iustin Pop
	elif test ! -f $@ ; then \
660 84a12e40 Iustin Pop
	  echo "Cannot auto-generate $@ file"; exit 1; \
661 84a12e40 Iustin Pop
	fi
662 84a12e40 Iustin Pop
663 84a12e40 Iustin Pop
.PHONY: regen-vcs-version
664 84a12e40 Iustin Pop
regen-vcs-version:
665 e8230860 Michael Hanselmann
	set -e; \
666 84a12e40 Iustin Pop
	cd $(srcdir); \
667 84a12e40 Iustin Pop
	if test -d .git; then \
668 84a12e40 Iustin Pop
	  rm -f vcs-version; \
669 84a12e40 Iustin Pop
	  $(MAKE) vcs-version; \
670 84a12e40 Iustin Pop
	fi
671 84a12e40 Iustin Pop
672 c964d962 Michael Hanselmann
lib/_autoconf.py: Makefile vcs-version | lib/.dir
673 84a12e40 Iustin Pop
	set -e; \
674 84a12e40 Iustin Pop
	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
675 e8230860 Michael Hanselmann
	{ echo '# This file is automatically generated, do not edit!'; \
676 e8230860 Michael Hanselmann
	  echo '#'; \
677 67047322 Iustin Pop
	  echo ''; \
678 67047322 Iustin Pop
	  echo '"""Build-time configuration for Ganeti.'; \
679 67047322 Iustin Pop
	  echo '';\
680 67047322 Iustin Pop
	  echo 'This file is autogenerated by the build process.'; \
681 67047322 Iustin Pop
	  echo 'For any changes you need to re-run ./configure (and'; \
682 67047322 Iustin Pop
	  echo 'not edit by hand).'; \
683 67047322 Iustin Pop
	  echo ''; \
684 67047322 Iustin Pop
	  echo '"""'; \
685 67047322 Iustin Pop
	  echo ''; \
686 0a4e7f24 Iustin Pop
	  echo '# pylint: disable-msg=C0301,C0324'; \
687 0a4e7f24 Iustin Pop
	  echo '# because this is autogenerated, we do not want'; \
688 0a4e7f24 Iustin Pop
	  echo '# style warnings' ; \
689 0a4e7f24 Iustin Pop
	  echo ''; \
690 e8230860 Michael Hanselmann
	  echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
691 e8230860 Michael Hanselmann
	  echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
692 e8230860 Michael Hanselmann
	  echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
693 e8230860 Michael Hanselmann
	  echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
694 e8230860 Michael Hanselmann
	  echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
695 e8230860 Michael Hanselmann
	  echo "VERSION_FULL = '$(VERSION_FULL)'"; \
696 e8230860 Michael Hanselmann
	  echo "LOCALSTATEDIR = '$(localstatedir)'"; \
697 e8230860 Michael Hanselmann
	  echo "SYSCONFDIR = '$(sysconfdir)'"; \
698 553bd93f Vitaly Kuznetsov
	  echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
699 e8230860 Michael Hanselmann
	  echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
700 e8230860 Michael Hanselmann
	  echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
701 2f2dbb4b Jun Futagawa
	  echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
702 e8230860 Michael Hanselmann
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
703 e8230860 Michael Hanselmann
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
704 e8230860 Michael Hanselmann
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
705 cb7c0198 Iustin Pop
	  echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
706 e8230860 Michael Hanselmann
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
707 7e2c5b9e Guido Trotter
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
708 fe5b0c42 Michael Hanselmann
	  echo "SOCAT_PATH = '$(SOCAT)'"; \
709 fe5b0c42 Michael Hanselmann
	  echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
710 e90739d6 Michael Hanselmann
	  echo "SOCAT_USE_COMPRESS = $(SOCAT_USE_COMPRESS)"; \
711 bea60381 Michael Hanselmann
	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
712 bea60381 Michael Hanselmann
	  echo "TOOLSDIR = '$(toolsdir)'"; \
713 4f3d5b76 Michael Hanselmann
	  echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
714 f154a7a3 Michael Hanselmann
	  echo "PKGLIBDIR = '$(pkglibdir)'"; \
715 89b70f39 Iustin Pop
	  echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \
716 551b6283 Iustin Pop
	  echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
717 8b72b05c René Nussbaumer
	  echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
718 f12e1736 René Nussbaumer
	  echo "ADMIN_GROUP = '$(ADMIN_GROUP)'"; \
719 8b72b05c René Nussbaumer
	  echo "MASTERD_USER = '$(MASTERD_USER)'"; \
720 f12e1736 René Nussbaumer
	  echo "MASTERD_GROUP = '$(MASTERD_GROUP)'"; \
721 8b72b05c René Nussbaumer
	  echo "RAPI_USER = '$(RAPI_USER)'"; \
722 f12e1736 René Nussbaumer
	  echo "RAPI_GROUP = '$(RAPI_GROUP)'"; \
723 f12e1736 René Nussbaumer
	  echo "CONFD_USER = '$(CONFD_USER)'"; \
724 f12e1736 René Nussbaumer
	  echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
725 f12e1736 René Nussbaumer
	  echo "NODED_USER = '$(NODED_USER)'"; \
726 84a12e40 Iustin Pop
	  echo "VCS_VERSION = '$$VCSVER'"; \
727 3536c792 Iustin Pop
	  echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
728 e8230860 Michael Hanselmann
	} > $@
729 e8230860 Michael Hanselmann
730 dbefcc7e Michael Hanselmann
$(REPLACE_VARS_SED): Makefile
731 e8230860 Michael Hanselmann
	set -e; \
732 e8230860 Michael Hanselmann
	{ echo 's#@PREFIX@#$(prefix)#g'; \
733 e8230860 Michael Hanselmann
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
734 e8230860 Michael Hanselmann
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
735 7a2ba406 Luca Bigliardi
	  echo 's#@BINDIR@#$(bindir)#g'; \
736 e8230860 Michael Hanselmann
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
737 e8230860 Michael Hanselmann
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
738 2f2dbb4b Jun Futagawa
	  echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
739 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
740 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
741 56956bcb Iustin Pop
	  echo 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \
742 56956bcb Iustin Pop
	  echo 's#@CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \
743 d3b4cf9f Iustin Pop
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
744 7e1fac25 Michael Hanselmann
	  echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
745 c5159571 Iustin Pop
	  echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
746 0d150c50 René Nussbaumer
	  echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \
747 0d150c50 René Nussbaumer
	  echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \
748 0d150c50 René Nussbaumer
	  echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \
749 0d150c50 René Nussbaumer
	  echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \
750 0d150c50 René Nussbaumer
	  echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
751 0d150c50 René Nussbaumer
	  echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
752 0d150c50 René Nussbaumer
	  echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
753 0d150c50 René Nussbaumer
	  echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
754 46a8da3b René Nussbaumer
	  echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
755 e8230860 Michael Hanselmann
	} > $@
756 e8230860 Michael Hanselmann
757 67313146 Michael Hanselmann
# Using deferred evaluation
758 899c4d2c Michael Hanselmann
daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
759 9f4bb951 Michael Hanselmann
daemons/ganeti-watcher: MODULE = ganeti.watcher
760 67313146 Michael Hanselmann
scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
761 67313146 Michael Hanselmann
762 c964d962 Michael Hanselmann
$(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
763 67313146 Michael Hanselmann
	test -n "$(MODULE)" || { echo Missing module; exit 1; }
764 2d48a3a2 Michael Hanselmann
	set -e; \
765 d75e738e Michael Hanselmann
	{ echo '#!/usr/bin/python'; \
766 2d48a3a2 Michael Hanselmann
	  echo '# This file is automatically generated, do not edit!'; \
767 67313146 Michael Hanselmann
	  echo "# Edit $(MODULE) instead."; \
768 2d48a3a2 Michael Hanselmann
	  echo; \
769 67313146 Michael Hanselmann
	  echo '"""Bootstrap script for L{$(MODULE)}"""'; \
770 2d48a3a2 Michael Hanselmann
	  echo; \
771 2d48a3a2 Michael Hanselmann
	  echo '# pylint: disable-msg=C0103'; \
772 2d48a3a2 Michael Hanselmann
	  echo '# C0103: Invalid name'; \
773 2d48a3a2 Michael Hanselmann
	  echo; \
774 2d48a3a2 Michael Hanselmann
	  echo 'import sys'; \
775 67313146 Michael Hanselmann
	  echo 'import $(MODULE) as main'; \
776 2d48a3a2 Michael Hanselmann
	  echo; \
777 2d48a3a2 Michael Hanselmann
	  echo '# Temporarily alias commands until bash completion'; \
778 2d48a3a2 Michael Hanselmann
	  echo '# generator is changed'; \
779 67313146 Michael Hanselmann
	  echo 'if hasattr(main, "commands"):'; \
780 2cc8bdd0 Michael Hanselmann
		echo '  commands = main.commands # pylint: disable-msg=E1101'; \
781 2d48a3a2 Michael Hanselmann
	  echo; \
782 2d48a3a2 Michael Hanselmann
	  echo 'if __name__ == "__main__":'; \
783 67313146 Michael Hanselmann
	  echo '  sys.exit(main.Main())'; \
784 2d48a3a2 Michael Hanselmann
	} > $@
785 2d48a3a2 Michael Hanselmann
	chmod u+x $@
786 2d48a3a2 Michael Hanselmann
787 e8230860 Michael Hanselmann
# We need to create symlinks because "make distcheck" will not install Python
788 e8230860 Michael Hanselmann
# files when building.
789 c964d962 Michael Hanselmann
stamp-srclinks: Makefile | $(all_dirfiles)
790 e8230860 Michael Hanselmann
	set -e; \
791 01a3a718 Michael Hanselmann
	for i in $(srclink_files); do \
792 e8230860 Michael Hanselmann
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
793 e8230860 Michael Hanselmann
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
794 e8230860 Michael Hanselmann
		fi; \
795 e8230860 Michael Hanselmann
	done
796 dd1dfd9a Michael Hanselmann
	touch $@
797 97a37b3f Michael Hanselmann
798 9ff7e35c Michael Hanselmann
.PHONY: ganeti
799 9ff7e35c Michael Hanselmann
ganeti:
800 01f3e7b1 Iustin Pop
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
801 9ff7e35c Michael Hanselmann
802 6b997854 Michael Hanselmann
.PHONY: check-dirs
803 6b997854 Michael Hanselmann
check-dirs: $(BUILT_SOURCES)
804 0c1103d6 Iustin Pop
	@set -e; \
805 6b997854 Michael Hanselmann
	find . -type d \( \( -name . \) -o \( \
806 6b997854 Michael Hanselmann
		-name .git -o \
807 6b997854 Michael Hanselmann
		-name autom4te.cache \
808 6b997854 Michael Hanselmann
		\) -prune -o -print \) | { \
809 6b997854 Michael Hanselmann
		error=; \
810 6b997854 Michael Hanselmann
		while read dir; do \
811 6b997854 Michael Hanselmann
			case "$$dir" in \
812 6b997854 Michael Hanselmann
				$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
813 6b997854 Michael Hanselmann
				*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
814 6b997854 Michael Hanselmann
			esac; \
815 6b997854 Michael Hanselmann
		done; \
816 6b997854 Michael Hanselmann
		for dir in $(DIRS); do \
817 6b997854 Michael Hanselmann
			if ! test -d "$$dir"; then \
818 6b997854 Michael Hanselmann
				echo "Directory $$dir listed in DIRS does not exist" >&2; \
819 6b997854 Michael Hanselmann
				error=1; \
820 6b997854 Michael Hanselmann
			fi \
821 6b997854 Michael Hanselmann
		done; \
822 6b997854 Michael Hanselmann
		if test -n "$$error"; then exit 1; else exit 0; fi; \
823 6b997854 Michael Hanselmann
	}
824 6b997854 Michael Hanselmann
825 6b997854 Michael Hanselmann
check-local: check-dirs
826 eed5c5df Michael Hanselmann
	$(CHECK_PYTHON_CODE) $(check_python_code)
827 35576615 Michael Hanselmann
	$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
828 7385c51d Michael Hanselmann
	$(CHECK_NEWS) < $(top_srcdir)/NEWS
829 eed5c5df Michael Hanselmann
830 e0098923 Iustin Pop
.PHONY: lint
831 c964d962 Michael Hanselmann
lint: $(BUILT_SOURCES)
832 6d7cc5ff Michael Hanselmann
	@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
833 6d7cc5ff Michael Hanselmann
	$(PYLINT) $(LINT_OPTS) $(lint_python_code)
834 3582eef6 Iustin Pop
	cd $(top_srcdir)/qa && \
835 3582eef6 Iustin Pop
	  PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
836 3582eef6 Iustin Pop
	  --rcfile  ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
837 e0098923 Iustin Pop
838 84a12e40 Iustin Pop
# a dist hook rule for updating the vcs-version file; this is
839 84a12e40 Iustin Pop
# hardcoded due to where it needs to build the file...
840 84a12e40 Iustin Pop
dist-hook:
841 84a12e40 Iustin Pop
	$(MAKE) regen-vcs-version && \
842 84a12e40 Iustin Pop
	rm -f $(top_distdir)/vcs-version && \
843 84a12e40 Iustin Pop
	cp -p $(srcdir)/vcs-version $(top_distdir)
844 84a12e40 Iustin Pop
845 84a12e40 Iustin Pop
# a distcheck hook rule for catching revision control directories
846 b6f2e47f Iustin Pop
distcheck-hook:
847 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name .svn -or -name .git | grep .; then \
848 c6aa0c42 Michael Hanselmann
		echo "Found revision control files in final archive." 1>&2; \
849 c6aa0c42 Michael Hanselmann
		exit 1; \
850 c6aa0c42 Michael Hanselmann
	fi
851 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name '*.py[co]' | grep .; then \
852 c6aa0c42 Michael Hanselmann
		echo "Found Python byte code in final archive." 1>&2; \
853 c6aa0c42 Michael Hanselmann
		exit 1; \
854 c6aa0c42 Michael Hanselmann
	fi
855 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name '*~' | grep .; then \
856 c6aa0c42 Michael Hanselmann
		echo "Found backup files in final archive." 1>&2; \
857 b6f2e47f Iustin Pop
		exit 1; \
858 b6f2e47f Iustin Pop
	fi
859 bf0b21da Michael Hanselmann
# Empty files or directories should not be distributed. They can cause
860 bf0b21da Michael Hanselmann
# unnecessary warnings for packagers. Directories used by automake during
861 bf0b21da Michael Hanselmann
# distcheck must be excluded.
862 bf0b21da Michael Hanselmann
	if find $(top_distdir) -empty -and -not \( \
863 bf0b21da Michael Hanselmann
			-path $(top_distdir)/_build -or \
864 bf0b21da Michael Hanselmann
			-path $(top_distdir)/_inst \) | grep .; then \
865 bf0b21da Michael Hanselmann
		echo "Found empty files or directories in final archive." 1>&2; \
866 bf0b21da Michael Hanselmann
		exit 1; \
867 bf0b21da Michael Hanselmann
	fi
868 c7b86f6c Michael Hanselmann
	if test -n "$(BUILD_RELEASE)" && \
869 c7b86f6c Michael Hanselmann
	   grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
870 c7b86f6c Michael Hanselmann
		echo "Found unreleased version in NEWS." >&2; \
871 c7b86f6c Michael Hanselmann
		exit 1; \
872 c7b86f6c Michael Hanselmann
	fi
873 c7b86f6c Michael Hanselmann
874 c7b86f6c Michael Hanselmann
# When building a release, stricter checks should be used
875 e627fe09 Michael Hanselmann
distcheck-release dist-release: export BUILD_RELEASE = 1
876 c7b86f6c Michael Hanselmann
distcheck-release: distcheck
877 b6f2e47f Iustin Pop
878 e627fe09 Michael Hanselmann
dist-release: dist
879 e627fe09 Michael Hanselmann
	set -e; \
880 e627fe09 Michael Hanselmann
	for i in $(DIST_ARCHIVES); do \
881 e627fe09 Michael Hanselmann
		echo -n "Checking $$i ... "; \
882 e627fe09 Michael Hanselmann
		autotools/check-tar < $$i; \
883 e627fe09 Michael Hanselmann
		echo OK; \
884 e627fe09 Michael Hanselmann
	done
885 e627fe09 Michael Hanselmann
886 8925faaa Iustin Pop
install-exec-local:
887 0d93b082 Michael Hanselmann
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
888 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
889 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/run/ganeti"
890 e8230860 Michael Hanselmann
891 c964d962 Michael Hanselmann
# To avoid conflicts between directory names and other targets, a file inside
892 c964d962 Michael Hanselmann
# the directory is used to ensure its existence.
893 c964d962 Michael Hanselmann
%.dir:
894 c964d962 Michael Hanselmann
	@mkdir_p@ $* && touch $@
895 e8230860 Michael Hanselmann
896 d128fdb6 Iustin Pop
.PHONY: apidoc
897 eb732fb5 Michael Hanselmann
apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
898 b959138f Michael Hanselmann
	$(RUN_IN_TEMPDIR) epydoc -v \
899 b959138f Michael Hanselmann
		--conf $(CURDIR)/epydoc.conf \
900 b959138f Michael Hanselmann
		--output $(CURDIR)/doc/api
901 d128fdb6 Iustin Pop
902 13e720f1 Iustin Pop
.PHONY: TAGS
903 eb732fb5 Michael Hanselmann
TAGS: $(BUILT_SOURCES)
904 13e720f1 Iustin Pop
	rm -f TAGS
905 74fa8200 Iustin Pop
	find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
906 74fa8200 Iustin Pop
	  -path './daemons/ganeti-*' -o -path './tools/*' -o \
907 74fa8200 Iustin Pop
	  -path './qa/*.py' | \
908 3bb5c580 Iustin Pop
	  etags -l python -
909 13e720f1 Iustin Pop
910 27e336af Michael Hanselmann
.PHONY: coverage
911 e8c8cf1a Michael Hanselmann
coverage: $(BUILT_SOURCES) $(python_tests)
912 27e336af Michael Hanselmann
	set -e; \
913 27e336af Michael Hanselmann
	COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
914 27e336af Michael Hanselmann
	TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
915 27e336af Michael Hanselmann
	HTML_COVERAGE=$(CURDIR)/doc/coverage \
916 e8c8cf1a Michael Hanselmann
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
917 e8c8cf1a Michael Hanselmann
	$(python_tests)
918 27e336af Michael Hanselmann
919 b341b9ca Guido Trotter
commit-check: distcheck lint apidoc
920 b341b9ca Guido Trotter
921 3baa809c Michael Hanselmann
-include ./Makefile.local
922 3baa809c Michael Hanselmann
923 e8230860 Michael Hanselmann
# vim: set noet :