Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 5a19bd35

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