Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ fcdb582d

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