Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 896a03f6

History | View | Annotate | Download (33.6 kB)

1 e8230860 Michael Hanselmann
# Ganeti makefile
2 e8230860 Michael Hanselmann
# - Indent with tabs only.
3 e8230860 Michael Hanselmann
# - Keep files sorted; one line per file.
4 e8230860 Michael Hanselmann
# - Directories in lib/ must have their own *dir variable (see hypervisor).
5 e8230860 Michael Hanselmann
# - All directories must be listed DIRS.
6 0a7bed64 Michael Hanselmann
# - Use autogen.sh to generate Makefile.in and configure script.
7 e8230860 Michael Hanselmann
8 e8230860 Michael Hanselmann
# Automake doesn't export these variables before version 1.10.
9 e8230860 Michael Hanselmann
abs_top_builddir = @abs_top_builddir@
10 e8230860 Michael Hanselmann
abs_top_srcdir = @abs_top_srcdir@
11 e8230860 Michael Hanselmann
12 a01dd3c6 Iustin Pop
# Use bash in order to be able to use pipefail
13 a01dd3c6 Iustin Pop
SHELL=/bin/bash
14 a01dd3c6 Iustin Pop
15 6e06b36c Iustin Pop
ACLOCAL_AMFLAGS = -I autotools
16 4f3d5b76 Michael Hanselmann
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
17 b959138f Michael Hanselmann
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
18 eed5c5df Michael Hanselmann
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
19 a4f12da4 Michael Hanselmann
CHECK_MAN = $(top_srcdir)/autotools/check-man
20 96602be4 Michael Hanselmann
CHECK_VERSION = $(top_srcdir)/autotools/check-version
21 7385c51d Michael Hanselmann
CHECK_NEWS = $(top_srcdir)/autotools/check-news
22 95eb4188 Michael Hanselmann
DOCPP = $(top_srcdir)/autotools/docpp
23 e8230860 Michael Hanselmann
REPLACE_VARS_SED = autotools/replace_vars.sed
24 d99d1e36 Iustin Pop
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
25 e8230860 Michael Hanselmann
26 22c5390d Iustin Pop
# Note: these are automake-specific variables, and must be named after
27 22c5390d Iustin Pop
# the directory + 'dir' suffix
28 2d48a3a2 Michael Hanselmann
clientdir = $(pkgpythondir)/client
29 e8230860 Michael Hanselmann
hypervisordir = $(pkgpythondir)/hypervisor
30 ff9efc03 Michael Hanselmann
httpdir = $(pkgpythondir)/http
31 dc101ecc Michael Hanselmann
masterddir = $(pkgpythondir)/masterd
32 12426ae1 Guido Trotter
confddir = $(pkgpythondir)/confd
33 8c229cc7 Oleksiy Mishchenko
rapidir = $(pkgpythondir)/rapi
34 899c4d2c Michael Hanselmann
serverdir = $(pkgpythondir)/server
35 9f4bb951 Michael Hanselmann
watcherdir = $(pkgpythondir)/watcher
36 bb44b1ae Michael Hanselmann
impexpddir = $(pkgpythondir)/impexpd
37 c047a981 Michael Hanselmann
utilsdir = $(pkgpythondir)/utils
38 e8230860 Michael Hanselmann
toolsdir = $(pkglibdir)/tools
39 7617fd6b Iustin Pop
iallocatorsdir = $(pkglibdir)/iallocators
40 0d2bf835 René Nussbaumer
pytoolsdir = $(pkgpythondir)/tools
41 e8230860 Michael Hanselmann
docdir = $(datadir)/doc/$(PACKAGE)
42 e8230860 Michael Hanselmann
43 a4f12da4 Michael Hanselmann
# Delete output file if an error occurred while building it
44 a4f12da4 Michael Hanselmann
.DELETE_ON_ERROR:
45 a4f12da4 Michael Hanselmann
46 d5506465 Iustin Pop
HTOOLS_DIRS = \
47 d5506465 Iustin Pop
	htools \
48 d5506465 Iustin Pop
	htools/Ganeti \
49 458a286a Iustin Pop
	htools/Ganeti/HTools \
50 458a286a Iustin Pop
	htools/Ganeti/HTools/Program
51 d5506465 Iustin Pop
52 e8230860 Michael Hanselmann
DIRS = \
53 e8230860 Michael Hanselmann
	autotools \
54 e8230860 Michael Hanselmann
	daemons \
55 e8230860 Michael Hanselmann
	devel \
56 e8230860 Michael Hanselmann
	doc \
57 e8230860 Michael Hanselmann
	doc/examples \
58 d6d9ce45 Guido Trotter
	doc/examples/hooks \
59 c51580b3 Guido Trotter
	doc/examples/gnt-debug \
60 d5506465 Iustin Pop
	$(HTOOLS_DIRS) \
61 e8230860 Michael Hanselmann
	lib \
62 2d48a3a2 Michael Hanselmann
	lib/client \
63 f9897b6d Michael Hanselmann
	lib/build \
64 2f16ea8f Michael Hanselmann
	lib/confd \
65 ff9efc03 Michael Hanselmann
	lib/http \
66 e8230860 Michael Hanselmann
	lib/hypervisor \
67 bb44b1ae Michael Hanselmann
	lib/impexpd \
68 dc101ecc Michael Hanselmann
	lib/masterd \
69 8c229cc7 Oleksiy Mishchenko
	lib/rapi \
70 899c4d2c Michael Hanselmann
	lib/server \
71 0d2bf835 René Nussbaumer
	lib/tools \
72 c047a981 Michael Hanselmann
	lib/utils \
73 9f4bb951 Michael Hanselmann
	lib/watcher \
74 e8230860 Michael Hanselmann
	man \
75 e8230860 Michael Hanselmann
	qa \
76 e8230860 Michael Hanselmann
	test \
77 e8230860 Michael Hanselmann
	test/data \
78 e8230860 Michael Hanselmann
	tools
79 e8230860 Michael Hanselmann
80 2750b299 Michael Hanselmann
BUILDTIME_DIR_AUTOCREATE = \
81 c964d962 Michael Hanselmann
	scripts \
82 22c5390d Iustin Pop
	$(APIDOC_DIR) \
83 22c5390d Iustin Pop
	$(APIDOC_PY_DIR) \
84 22c5390d Iustin Pop
	$(APIDOC_HS_DIR) \
85 22c5390d Iustin Pop
	$(APIDOC_HS_DIR)/Ganeti $(APIDOC_HS_DIR)/Ganeti/HTools \
86 458a286a Iustin Pop
	$(APIDOC_HS_DIR)/Ganeti/HTools/Program \
87 22c5390d Iustin Pop
	$(COVERAGE_DIR) \
88 22c5390d Iustin Pop
	$(COVERAGE_PY_DIR) \
89 22c5390d Iustin Pop
	$(COVERAGE_HS_DIR) \
90 b91e9518 Iustin Pop
	.hpc
91 2750b299 Michael Hanselmann
92 2750b299 Michael Hanselmann
BUILDTIME_DIRS = \
93 2750b299 Michael Hanselmann
	$(BUILDTIME_DIR_AUTOCREATE) \
94 6b997854 Michael Hanselmann
	doc/html
95 6b997854 Michael Hanselmann
96 6b997854 Michael Hanselmann
DIRCHECK_EXCLUDE = \
97 6b997854 Michael Hanselmann
	$(BUILDTIME_DIRS) \
98 6b997854 Michael Hanselmann
	ganeti-[0-9]*.[0-9]*.[0-9]* \
99 6b997854 Michael Hanselmann
	doc/html/_*
100 6b997854 Michael Hanselmann
101 2750b299 Michael Hanselmann
all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
102 c964d962 Michael Hanselmann
103 22c5390d Iustin Pop
# some helper vars
104 22c5390d Iustin Pop
COVERAGE_DIR = doc/coverage
105 22c5390d Iustin Pop
COVERAGE_PY_DIR = $(COVERAGE_DIR)/py
106 22c5390d Iustin Pop
COVERAGE_HS_DIR = $(COVERAGE_DIR)/hs
107 22c5390d Iustin Pop
APIDOC_DIR = doc/api
108 22c5390d Iustin Pop
APIDOC_PY_DIR = $(APIDOC_DIR)/py
109 22c5390d Iustin Pop
APIDOC_HS_DIR = $(APIDOC_DIR)/hs
110 22c5390d Iustin Pop
111 2ab2b9f5 Iustin Pop
MAINTAINERCLEANFILES = \
112 d17e74b4 Iustin Pop
	$(docpng) \
113 b76aac08 Michael Hanselmann
	$(maninput) \
114 cbf3d64b Michael Hanselmann
	doc/install-quick.rst \
115 84a12e40 Iustin Pop
	doc/news.rst \
116 7a03d293 Michael Hanselmann
	doc/upgrade.rst \
117 84a12e40 Iustin Pop
	vcs-version
118 2ab2b9f5 Iustin Pop
119 d17e74b4 Iustin Pop
maintainer-clean-local:
120 6b997854 Michael Hanselmann
	rm -rf $(BUILDTIME_DIRS)
121 d17e74b4 Iustin Pop
122 e8230860 Michael Hanselmann
CLEANFILES = \
123 2f16ea8f Michael Hanselmann
	$(addsuffix /*.py[co],$(DIRS)) \
124 d5506465 Iustin Pop
	$(addsuffix /*.hi,$(HTOOLS_DIRS)) \
125 d5506465 Iustin Pop
	$(addsuffix /*.o,$(HTOOLS_DIRS)) \
126 c964d962 Michael Hanselmann
	$(all_dirfiles) \
127 2d48a3a2 Michael Hanselmann
	$(PYTHON_BOOTSTRAP) \
128 f774bd03 Michael Hanselmann
	epydoc.conf \
129 e8230860 Michael Hanselmann
	autotools/replace_vars.sed \
130 f154a7a3 Michael Hanselmann
	daemons/daemon-util \
131 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner \
132 e8230860 Michael Hanselmann
	devel/upload \
133 f72f8622 Iustin Pop
	doc/examples/bash_completion \
134 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd \
135 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd \
136 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron \
137 679008e7 Iustin Pop
	doc/examples/gnt-config-backup \
138 a2442bf9 Luca Bigliardi
	doc/examples/hooks/ipsec \
139 2ab2b9f5 Iustin Pop
	$(man_MANS) \
140 2ab2b9f5 Iustin Pop
	$(manhtml) \
141 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup \
142 dd1dfd9a Michael Hanselmann
	stamp-srclinks \
143 d6159933 Iustin Pop
	$(nodist_pkgpython_PYTHON) \
144 c3f67183 Iustin Pop
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
145 191ff68c Iustin Pop
	.hpc/*.mix htools/*.tix \
146 191ff68c Iustin Pop
	doc/hs-lint.html
147 e8230860 Michael Hanselmann
148 c964d962 Michael Hanselmann
# BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
149 c964d962 Michael Hanselmann
# it'll cause the target to rebuild every time.
150 dc7d2c49 Michael Hanselmann
BUILT_SOURCES = \
151 dc7d2c49 Michael Hanselmann
	ganeti \
152 dd1dfd9a Michael Hanselmann
	stamp-srclinks \
153 2d1f248e Michael Hanselmann
	lib/_autoconf.py \
154 13aeae6a Iustin Pop
	lib/_vcsversion.py \
155 c964d962 Michael Hanselmann
	$(all_dirfiles) \
156 2d1f248e Michael Hanselmann
	$(PYTHON_BOOTSTRAP)
157 2d1f248e Michael Hanselmann
158 e8230860 Michael Hanselmann
nodist_pkgpython_PYTHON = \
159 13aeae6a Iustin Pop
	lib/_autoconf.py \
160 13aeae6a Iustin Pop
	lib/_vcsversion.py
161 e8230860 Michael Hanselmann
162 f9897b6d Michael Hanselmann
noinst_PYTHON = \
163 5f43f393 Michael Hanselmann
	lib/build/__init__.py \
164 5f43f393 Michael Hanselmann
	lib/build/sphinx_ext.py
165 f9897b6d Michael Hanselmann
166 e8230860 Michael Hanselmann
pkgpython_PYTHON = \
167 e8230860 Michael Hanselmann
	lib/__init__.py \
168 a8a76bc2 Guido Trotter
	lib/asyncnotifier.py \
169 e8230860 Michael Hanselmann
	lib/backend.py \
170 e8230860 Michael Hanselmann
	lib/bdev.py \
171 e8230860 Michael Hanselmann
	lib/bootstrap.py \
172 e8230860 Michael Hanselmann
	lib/cli.py \
173 e8230860 Michael Hanselmann
	lib/cmdlib.py \
174 cea881e5 Michael Hanselmann
	lib/compat.py \
175 e8230860 Michael Hanselmann
	lib/config.py \
176 e8230860 Michael Hanselmann
	lib/constants.py \
177 821d9e43 Michael Hanselmann
	lib/daemon.py \
178 e8230860 Michael Hanselmann
	lib/errors.py \
179 62e0e880 Iustin Pop
	lib/ht.py \
180 e8230860 Michael Hanselmann
	lib/jqueue.py \
181 8b537bb0 Michael Hanselmann
	lib/jstore.py \
182 e8230860 Michael Hanselmann
	lib/locking.py \
183 e8230860 Michael Hanselmann
	lib/luxi.py \
184 e8230860 Michael Hanselmann
	lib/mcpu.py \
185 a744b676 Manuel Franceschini
	lib/netutils.py \
186 e8230860 Michael Hanselmann
	lib/objects.py \
187 e8230860 Michael Hanselmann
	lib/opcodes.py \
188 a123dc19 Michael Hanselmann
	lib/qlang.py \
189 4ca96421 Michael Hanselmann
	lib/query.py \
190 e8230860 Michael Hanselmann
	lib/rpc.py \
191 f12e1736 René Nussbaumer
	lib/runtime.py \
192 e8230860 Michael Hanselmann
	lib/serializer.py \
193 e8230860 Michael Hanselmann
	lib/ssconf.py \
194 e8230860 Michael Hanselmann
	lib/ssh.py \
195 ac2d0fe4 Michael Hanselmann
	lib/storage.py \
196 1338f2b4 Balazs Lecz
	lib/uidpool.py \
197 76094e37 Michael Hanselmann
	lib/workerpool.py
198 e8230860 Michael Hanselmann
199 2d48a3a2 Michael Hanselmann
client_PYTHON = \
200 c2855a12 Michael Hanselmann
	lib/client/__init__.py \
201 02266fe0 Michael Hanselmann
	lib/client/gnt_backup.py \
202 7b3e7d41 Michael Hanselmann
	lib/client/gnt_cluster.py \
203 6d50f5f9 Michael Hanselmann
	lib/client/gnt_debug.py \
204 667dbd6b Adeodato Simo
	lib/client/gnt_group.py \
205 e792102d Michael Hanselmann
	lib/client/gnt_instance.py \
206 a09b9e3d Michael Hanselmann
	lib/client/gnt_job.py \
207 37494fa4 Michael Hanselmann
	lib/client/gnt_node.py \
208 6d50f5f9 Michael Hanselmann
	lib/client/gnt_os.py
209 2d48a3a2 Michael Hanselmann
210 e8230860 Michael Hanselmann
hypervisor_PYTHON = \
211 e8230860 Michael Hanselmann
	lib/hypervisor/__init__.py \
212 e8230860 Michael Hanselmann
	lib/hypervisor/hv_base.py \
213 48297fa2 Iustin Pop
	lib/hypervisor/hv_chroot.py \
214 e8230860 Michael Hanselmann
	lib/hypervisor/hv_fake.py \
215 eb58f9b1 Guido Trotter
	lib/hypervisor/hv_kvm.py \
216 4b5e40a5 Iustin Pop
	lib/hypervisor/hv_lxc.py \
217 e8230860 Michael Hanselmann
	lib/hypervisor/hv_xen.py
218 e8230860 Michael Hanselmann
219 8c229cc7 Oleksiy Mishchenko
rapi_PYTHON = \
220 8c229cc7 Oleksiy Mishchenko
	lib/rapi/__init__.py \
221 10b207d4 Oleksiy Mishchenko
	lib/rapi/baserlib.py \
222 95ab4de9 David Knowles
	lib/rapi/client.py \
223 20b509de Michael Hanselmann
	lib/rapi/client_utils.py \
224 10b207d4 Oleksiy Mishchenko
	lib/rapi/connector.py \
225 10b207d4 Oleksiy Mishchenko
	lib/rapi/rlib2.py
226 8c229cc7 Oleksiy Mishchenko
227 ff9efc03 Michael Hanselmann
http_PYTHON = \
228 02cab3e7 Michael Hanselmann
	lib/http/__init__.py \
229 be500c29 Michael Hanselmann
	lib/http/auth.py \
230 02cab3e7 Michael Hanselmann
	lib/http/client.py \
231 02cab3e7 Michael Hanselmann
	lib/http/server.py
232 ff9efc03 Michael Hanselmann
233 12426ae1 Guido Trotter
confd_PYTHON = \
234 71f27d19 Guido Trotter
	lib/confd/__init__.py \
235 e4ccf6cd Guido Trotter
	lib/confd/client.py \
236 2f16ea8f Michael Hanselmann
	lib/confd/querylib.py \
237 2f16ea8f Michael Hanselmann
	lib/confd/server.py
238 8c229cc7 Oleksiy Mishchenko
239 dc101ecc Michael Hanselmann
masterd_PYTHON = \
240 033a1d00 Michael Hanselmann
	lib/masterd/__init__.py \
241 033a1d00 Michael Hanselmann
	lib/masterd/instance.py
242 dc101ecc Michael Hanselmann
243 bb44b1ae Michael Hanselmann
impexpd_PYTHON = \
244 bb44b1ae Michael Hanselmann
	lib/impexpd/__init__.py
245 bb44b1ae Michael Hanselmann
246 9f4bb951 Michael Hanselmann
watcher_PYTHON = \
247 9ca87fb3 Michael Hanselmann
	lib/watcher/__init__.py \
248 adf6301e Michael Hanselmann
	lib/watcher/nodemaint.py \
249 adf6301e Michael Hanselmann
	lib/watcher/state.py
250 9f4bb951 Michael Hanselmann
251 899c4d2c Michael Hanselmann
server_PYTHON = \
252 29d91329 Michael Hanselmann
	lib/server/__init__.py \
253 5c9c0e0e Michael Hanselmann
	lib/server/confd.py \
254 5119f2ec Michael Hanselmann
	lib/server/masterd.py \
255 d9c82a4e Michael Hanselmann
	lib/server/noded.py \
256 d9c82a4e Michael Hanselmann
	lib/server/rapi.py
257 899c4d2c Michael Hanselmann
258 0d2bf835 René Nussbaumer
pytools_PYTHON = \
259 0d2bf835 René Nussbaumer
	lib/tools/__init__.py \
260 0d2bf835 René Nussbaumer
	lib/tools/ensure_dirs.py
261 0d2bf835 René Nussbaumer
262 c047a981 Michael Hanselmann
utils_PYTHON = \
263 4fd029cf Michael Hanselmann
	lib/utils/__init__.py \
264 79d22269 Michael Hanselmann
	lib/utils/algo.py \
265 9d1b963f Michael Hanselmann
	lib/utils/filelock.py \
266 f21bb4b7 Michael Hanselmann
	lib/utils/hash.py \
267 3865ca48 Michael Hanselmann
	lib/utils/io.py \
268 1ae4c5a1 Michael Hanselmann
	lib/utils/log.py \
269 36a4acd4 Michael Hanselmann
	lib/utils/mlock.py \
270 17b97ab3 Michael Hanselmann
	lib/utils/nodesetup.py \
271 a4ccecf6 Michael Hanselmann
	lib/utils/process.py \
272 7fcffe27 Michael Hanselmann
	lib/utils/retry.py \
273 7831fc5f Michael Hanselmann
	lib/utils/text.py \
274 c50645c0 Michael Hanselmann
	lib/utils/wrapper.py \
275 c50645c0 Michael Hanselmann
	lib/utils/x509.py
276 c047a981 Michael Hanselmann
277 f05c99f3 Michael Hanselmann
docrst = \
278 ffa6869f Iustin Pop
	doc/admin.rst \
279 5c0c1eeb Iustin Pop
	doc/design-2.0.rst \
280 4f366caf Michael Hanselmann
	doc/design-2.1.rst \
281 e56bb0e8 Guido Trotter
	doc/design-2.2.rst \
282 1eb85930 Guido Trotter
	doc/design-2.3.rst \
283 92902e91 Iustin Pop
	doc/design-htools-2.3.rst \
284 78b40c5e Michael Hanselmann
	doc/design-2.4.rst \
285 c95c0f71 Michael Hanselmann
	doc/design-draft.rst \
286 1e86ee97 Marc Schmitt
	doc/design-oob.rst \
287 ae9b5e0f Tsachy Shacham
	doc/design-cpu-pinning.rst \
288 e5a246df Michael Hanselmann
	doc/design-query2.rst \
289 539f195a Michael Hanselmann
	doc/design-x509-ca.rst \
290 278ddaa9 Michael Hanselmann
	doc/design-http-server.rst \
291 1375e1d9 Michael Hanselmann
	doc/design-impexp2.rst \
292 ed9fda24 Michael Hanselmann
	doc/design-lu-generated-jobs.rst \
293 4055b109 Adeodato Simo
	doc/design-multi-reloc.rst \
294 eec83a95 Apollon Oikonomopoulos
	doc/design-network.rst \
295 6c3d18e0 Michael Hanselmann
	doc/design-chained-jobs.rst \
296 d9bdffc3 René Nussbaumer
	doc/cluster-merge.rst \
297 a997cec5 Apollon Oikonomopoulos
	doc/design-shared-storage.rst \
298 62947ebb Michael Hanselmann
	doc/devnotes.rst \
299 e2078d28 Iustin Pop
	doc/glossary.rst \
300 4d6443f4 Iustin Pop
	doc/hooks.rst \
301 876860a3 Iustin Pop
	doc/iallocator.rst \
302 d17e74b4 Iustin Pop
	doc/index.rst \
303 cbf3d64b Michael Hanselmann
	doc/install-quick.rst \
304 28e15341 Iustin Pop
	doc/install.rst \
305 9725b53d Michael Hanselmann
	doc/locking.rst \
306 6bf273d5 Michael Hanselmann
	doc/move-instance.rst \
307 c71a1a3d Iustin Pop
	doc/news.rst \
308 6d81475c Iustin Pop
	doc/rapi.rst \
309 b76aac08 Michael Hanselmann
	doc/security.rst \
310 35dd762d Michael Hanselmann
	doc/upgrade.rst \
311 c71a1a3d Iustin Pop
	doc/walkthrough.rst
312 f05c99f3 Michael Hanselmann
313 1494a4cc Iustin Pop
HS_PROGS = htools/htools
314 1494a4cc Iustin Pop
HS_BIN_ROLES = hbal hscan hspace
315 d6159933 Iustin Pop
316 c3f67183 Iustin Pop
HS_ALL_PROGS = $(HS_PROGS) htools/test
317 c3f67183 Iustin Pop
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
318 d6159933 Iustin Pop
# we don't add -Werror by default
319 d5506465 Iustin Pop
HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
320 b91e9518 Iustin Pop
# extra flags that can be overriden on the command line
321 d6159933 Iustin Pop
HEXTRA =
322 b91e9518 Iustin Pop
# exclude options for coverage reports
323 98b33d0e Iustin Pop
HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC \
324 98b33d0e Iustin Pop
	--exclude Ganeti.Constants \
325 98b33d0e Iustin Pop
	--exclude Ganeti.HTools.Version
326 d6159933 Iustin Pop
327 c3f67183 Iustin Pop
HS_LIB_SRCS = \
328 d6159933 Iustin Pop
	htools/Ganeti/HTools/CLI.hs \
329 d6159933 Iustin Pop
	htools/Ganeti/HTools/Cluster.hs \
330 1adec4be Iustin Pop
	htools/Ganeti/HTools/Compat.hs \
331 d6159933 Iustin Pop
	htools/Ganeti/HTools/Container.hs \
332 d6159933 Iustin Pop
	htools/Ganeti/HTools/ExtLoader.hs \
333 d6159933 Iustin Pop
	htools/Ganeti/HTools/Group.hs \
334 d6159933 Iustin Pop
	htools/Ganeti/HTools/IAlloc.hs \
335 d6159933 Iustin Pop
	htools/Ganeti/HTools/Instance.hs \
336 d6159933 Iustin Pop
	htools/Ganeti/HTools/Loader.hs \
337 d6159933 Iustin Pop
	htools/Ganeti/HTools/Luxi.hs \
338 d6159933 Iustin Pop
	htools/Ganeti/HTools/Node.hs \
339 d6159933 Iustin Pop
	htools/Ganeti/HTools/PeerMap.hs \
340 d6159933 Iustin Pop
	htools/Ganeti/HTools/QC.hs \
341 d6159933 Iustin Pop
	htools/Ganeti/HTools/Rapi.hs \
342 d6159933 Iustin Pop
	htools/Ganeti/HTools/Simu.hs \
343 d6159933 Iustin Pop
	htools/Ganeti/HTools/Text.hs \
344 d6159933 Iustin Pop
	htools/Ganeti/HTools/Types.hs \
345 d6159933 Iustin Pop
	htools/Ganeti/HTools/Utils.hs \
346 458a286a Iustin Pop
	htools/Ganeti/HTools/Program/Hail.hs \
347 201b6c34 Iustin Pop
	htools/Ganeti/HTools/Program/Hbal.hs \
348 7b695a0d Iustin Pop
	htools/Ganeti/HTools/Program/Hscan.hs \
349 1494a4cc Iustin Pop
	htools/Ganeti/HTools/Program/Hspace.hs \
350 d6159933 Iustin Pop
	htools/Ganeti/Jobs.hs \
351 d6159933 Iustin Pop
	htools/Ganeti/Luxi.hs \
352 d6159933 Iustin Pop
	htools/Ganeti/OpCodes.hs
353 d6159933 Iustin Pop
354 d99d1e36 Iustin Pop
HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
355 c3f67183 Iustin Pop
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
356 d6159933 Iustin Pop
357 c964d962 Michael Hanselmann
$(RUN_IN_TEMPDIR): | $(all_dirfiles)
358 c964d962 Michael Hanselmann
359 a2d917f3 Iustin Pop
# Note: we use here an order-only prerequisite, as the contents of
360 a2d917f3 Iustin Pop
# _autoconf.py are not actually influencing the html build output: it
361 a2d917f3 Iustin Pop
# has to exist in order for the sphinx module to be loaded
362 a2d917f3 Iustin Pop
# successfully, but we certainly don't want the docs to be rebuilt if
363 a2d917f3 Iustin Pop
# it changes
364 c964d962 Michael Hanselmann
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
365 a2d917f3 Iustin Pop
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
366 13aeae6a Iustin Pop
	| lib/_autoconf.py lib/_vcsversion.py
367 d17e74b4 Iustin Pop
	@test -n "$(SPHINX)" || \
368 d17e74b4 Iustin Pop
	    { echo 'sphinx-build' not found during configure; exit 1; }
369 2750b299 Michael Hanselmann
	@mkdir_p@ $(dir $@)
370 e7f6524c Michael Hanselmann
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
371 13de7d59 Michael Hanselmann
	    -d . \
372 d17e74b4 Iustin Pop
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
373 d17e74b4 Iustin Pop
	    -D release="$(PACKAGE_VERSION)" \
374 13de7d59 Michael Hanselmann
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
375 13de7d59 Michael Hanselmann
	rm -f doc/html/.buildinfo doc/html/objects.inv
376 13de7d59 Michael Hanselmann
	touch $@
377 13de7d59 Michael Hanselmann
378 c964d962 Michael Hanselmann
doc/html: doc/html/index.html
379 2ab2b9f5 Iustin Pop
380 cbf3d64b Michael Hanselmann
doc/install-quick.rst: INSTALL
381 b76aac08 Michael Hanselmann
doc/news.rst: NEWS
382 7a03d293 Michael Hanselmann
doc/upgrade.rst: UPGRADE
383 b76aac08 Michael Hanselmann
384 e8deef56 Michael Hanselmann
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
385 cbf3d64b Michael Hanselmann
	set -e; \
386 cbf3d64b Michael Hanselmann
	{ echo '.. This file is automatically updated at build time from $<.'; \
387 cbf3d64b Michael Hanselmann
	  echo '.. Do not edit.'; \
388 cbf3d64b Michael Hanselmann
	  echo; \
389 cbf3d64b Michael Hanselmann
	  cat $<; \
390 cbf3d64b Michael Hanselmann
	} > $@
391 cbf3d64b Michael Hanselmann
392 b8195800 Iustin Pop
docdot = \
393 ca9ccea8 Michael Hanselmann
	doc/arch-2.0.dot \
394 ca9ccea8 Michael Hanselmann
	doc/design-2.1-lock-acquire.dot \
395 ca9ccea8 Michael Hanselmann
	doc/design-2.1-lock-release.dot
396 b8195800 Iustin Pop
397 d17e74b4 Iustin Pop
docpng = $(patsubst %.dot,%.png,$(docdot))
398 e8230860 Michael Hanselmann
399 7e1ccbe0 Michael Hanselmann
# Things to build but not to install (add it to EXTRA_DIST if it should be
400 7e1ccbe0 Michael Hanselmann
# distributed)
401 7e1ccbe0 Michael Hanselmann
noinst_DATA = \
402 7e1ccbe0 Michael Hanselmann
	devel/upload \
403 7e1ccbe0 Michael Hanselmann
	doc/html \
404 7e1ccbe0 Michael Hanselmann
	doc/examples/bash_completion \
405 7e1ccbe0 Michael Hanselmann
	doc/examples/ganeti.cron \
406 7e1ccbe0 Michael Hanselmann
	doc/examples/ganeti.initd \
407 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd \
408 679008e7 Iustin Pop
	doc/examples/gnt-config-backup \
409 7e1ccbe0 Michael Hanselmann
	doc/examples/hooks/ipsec \
410 7e1ccbe0 Michael Hanselmann
	$(manhtml)
411 f29266b4 Iustin Pop
412 4f3d5b76 Michael Hanselmann
gnt_scripts = \
413 e8230860 Michael Hanselmann
	scripts/gnt-backup \
414 e8230860 Michael Hanselmann
	scripts/gnt-cluster \
415 e8230860 Michael Hanselmann
	scripts/gnt-debug \
416 667dbd6b Adeodato Simo
	scripts/gnt-group \
417 e8230860 Michael Hanselmann
	scripts/gnt-instance \
418 e8230860 Michael Hanselmann
	scripts/gnt-job \
419 e8230860 Michael Hanselmann
	scripts/gnt-node \
420 e8230860 Michael Hanselmann
	scripts/gnt-os
421 e8230860 Michael Hanselmann
422 0d2bf835 René Nussbaumer
PYTHON_BOOTSTRAP_SBIN = \
423 5c9c0e0e Michael Hanselmann
	daemons/ganeti-confd \
424 29d91329 Michael Hanselmann
	daemons/ganeti-masterd \
425 5119f2ec Michael Hanselmann
	daemons/ganeti-noded \
426 9f4bb951 Michael Hanselmann
	daemons/ganeti-watcher \
427 d9c82a4e Michael Hanselmann
	daemons/ganeti-rapi \
428 02266fe0 Michael Hanselmann
	scripts/gnt-backup \
429 7b3e7d41 Michael Hanselmann
	scripts/gnt-cluster \
430 6d50f5f9 Michael Hanselmann
	scripts/gnt-debug \
431 667dbd6b Adeodato Simo
	scripts/gnt-group \
432 e792102d Michael Hanselmann
	scripts/gnt-instance \
433 a09b9e3d Michael Hanselmann
	scripts/gnt-job \
434 37494fa4 Michael Hanselmann
	scripts/gnt-node \
435 6d50f5f9 Michael Hanselmann
	scripts/gnt-os
436 2d48a3a2 Michael Hanselmann
437 0d2bf835 René Nussbaumer
PYTHON_BOOTSTRAP = \
438 0d2bf835 René Nussbaumer
	$(PYTHON_BOOTSTRAP_SBIN) \
439 0d2bf835 René Nussbaumer
	tools/ensure-dirs
440 0d2bf835 René Nussbaumer
441 a8c68e44 Michael Hanselmann
qa_scripts = \
442 a8c68e44 Michael Hanselmann
	qa/ganeti-qa.py \
443 a8c68e44 Michael Hanselmann
	qa/qa_cluster.py \
444 a8c68e44 Michael Hanselmann
	qa/qa_config.py \
445 a8c68e44 Michael Hanselmann
	qa/qa_daemon.py \
446 a8c68e44 Michael Hanselmann
	qa/qa_env.py \
447 a8c68e44 Michael Hanselmann
	qa/qa_error.py \
448 a8c68e44 Michael Hanselmann
	qa/qa_instance.py \
449 a8c68e44 Michael Hanselmann
	qa/qa_node.py \
450 a8c68e44 Michael Hanselmann
	qa/qa_os.py \
451 a8c68e44 Michael Hanselmann
	qa/qa_rapi.py \
452 a8c68e44 Michael Hanselmann
	qa/qa_tags.py \
453 a8c68e44 Michael Hanselmann
	qa/qa_utils.py
454 a8c68e44 Michael Hanselmann
455 d6159933 Iustin Pop
bin_SCRIPTS =
456 d6159933 Iustin Pop
if WANT_HTOOLS
457 c3f67183 Iustin Pop
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
458 458a286a Iustin Pop
install-exec-hook:
459 458a286a Iustin Pop
	@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
460 458a286a Iustin Pop
	$(LN_S) -f $(DESTDIR)$(bindir)/htools \
461 458a286a Iustin Pop
		   $(DESTDIR)$(iallocatorsdir)/hail
462 201b6c34 Iustin Pop
	for role in $(HS_BIN_ROLES); do \
463 201b6c34 Iustin Pop
		$(LN_S) -f $(DESTDIR)$(bindir)/htools \
464 201b6c34 Iustin Pop
			   $(DESTDIR)$(bindir)/$$role ; \
465 201b6c34 Iustin Pop
	done
466 d6159933 Iustin Pop
endif
467 d6159933 Iustin Pop
468 c3f67183 Iustin Pop
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
469 16a6192d Iustin Pop
	@if [ -z "$(HTOOLS)" ]; then \
470 16a6192d Iustin Pop
	  echo "Error: htools compilation disabled at configure time" 1>&2 ;\
471 16a6192d Iustin Pop
	  exit 1; \
472 16a6192d Iustin Pop
	fi
473 49e11c49 Iustin Pop
	@BINARY=$(@:htools/%=%); \
474 49e11c49 Iustin Pop
	if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
475 fd0bc853 Iustin Pop
	  echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
476 fd0bc853 Iustin Pop
	  exit 1; \
477 49e11c49 Iustin Pop
	fi
478 49e11c49 Iustin Pop
	BINARY=$(@:htools/%=%); $(GHC) --make \
479 1adec4be Iustin Pop
	  $(HFLAGS) $(HEXTRA) \
480 1adec4be Iustin Pop
	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
481 49e11c49 Iustin Pop
	  -osuf $$BINARY.o -hisuf $$BINARY.hi $@
482 d6159933 Iustin Pop
483 b91e9518 Iustin Pop
# for the htools/test binary, we need to enable profiling/coverage
484 b91e9518 Iustin Pop
htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \
485 b91e9518 Iustin Pop
	-fno-warn-monomorphism-restriction -fno-warn-orphans \
486 b91e9518 Iustin Pop
	-fno-warn-missing-methods -fno-warn-unused-imports
487 b91e9518 Iustin Pop
488 da7e44ee Michael Hanselmann
dist_sbin_SCRIPTS = \
489 da7e44ee Michael Hanselmann
	tools/ganeti-listrunner
490 4f3d5b76 Michael Hanselmann
491 fc3fd894 Michael Hanselmann
nodist_sbin_SCRIPTS = \
492 0d2bf835 René Nussbaumer
	$(PYTHON_BOOTSTRAP_SBIN) \
493 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner
494 fc3fd894 Michael Hanselmann
495 61631293 Stephen Shirley
dist_tools_PYTHON = \
496 e8230860 Michael Hanselmann
	tools/burnin \
497 e8230860 Michael Hanselmann
	tools/cfgshell \
498 e8230860 Michael Hanselmann
	tools/cfgupgrade \
499 b5672ea0 Iustin Pop
	tools/cfgupgrade12 \
500 1f7d3f7d René Nussbaumer
	tools/cluster-merge \
501 ea5fd476 Iustin Pop
	tools/lvmstrap \
502 6bf273d5 Michael Hanselmann
	tools/move-instance \
503 05cd934d René Nussbaumer
	tools/setup-ssh \
504 ea5fd476 Iustin Pop
	tools/sanitize-config
505 e8230860 Michael Hanselmann
506 61631293 Stephen Shirley
dist_tools_SCRIPTS = \
507 61631293 Stephen Shirley
	$(dist_tools_PYTHON) \
508 2f4c951e Stephen Shirley
	tools/kvm-console-wrapper \
509 61631293 Stephen Shirley
	tools/xm-console-wrapper
510 61631293 Stephen Shirley
511 2d76b580 Michael Hanselmann
pkglib_python_scripts = \
512 c6ccba7e Michael Hanselmann
	daemons/import-export \
513 c6ccba7e Michael Hanselmann
	tools/check-cert-expired
514 2d76b580 Michael Hanselmann
515 0d2bf835 René Nussbaumer
nodist_pkglib_python_scripts = \
516 0d2bf835 René Nussbaumer
	tools/ensure-dirs
517 0d2bf835 René Nussbaumer
518 f154a7a3 Michael Hanselmann
pkglib_SCRIPTS = \
519 2d76b580 Michael Hanselmann
	daemons/daemon-util \
520 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup \
521 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts)
522 f154a7a3 Michael Hanselmann
523 0d2bf835 René Nussbaumer
nodist_pkglib_SCRIPTS = \
524 0d2bf835 René Nussbaumer
	$(nodist_pkglib_python_scripts)
525 0d2bf835 René Nussbaumer
526 e8230860 Michael Hanselmann
EXTRA_DIST = \
527 e8230860 Michael Hanselmann
	NEWS \
528 7a03d293 Michael Hanselmann
	UPGRADE \
529 f774bd03 Michael Hanselmann
	epydoc.conf.in \
530 70c771f6 Michael Hanselmann
	pylintrc \
531 bb46a96c Michael Hanselmann
	autotools/build-bash-completion \
532 eed5c5df Michael Hanselmann
	autotools/check-python-code \
533 a4f12da4 Michael Hanselmann
	autotools/check-man \
534 c81ed2b2 Michael Hanselmann
	autotools/check-news \
535 e627fe09 Michael Hanselmann
	autotools/check-tar \
536 96602be4 Michael Hanselmann
	autotools/check-version \
537 d99d1e36 Iustin Pop
	autotools/convert-constants \
538 95eb4188 Michael Hanselmann
	autotools/docpp \
539 27e336af Michael Hanselmann
	autotools/gen-coverage \
540 e8c8cf1a Michael Hanselmann
	autotools/testrunner \
541 f3313af5 Guido Trotter
	$(RUN_IN_TEMPDIR) \
542 f154a7a3 Michael Hanselmann
	daemons/daemon-util.in \
543 fc3fd894 Michael Hanselmann
	daemons/ganeti-cleaner.in \
544 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
545 e8230860 Michael Hanselmann
	devel/upload.in \
546 26916aad Apollon Oikonomopoulos
	tools/kvm-ifup.in \
547 b8195800 Iustin Pop
	$(docdot) \
548 f727d134 Michael Hanselmann
	$(docpng) \
549 d17e74b4 Iustin Pop
	$(docrst) \
550 d17e74b4 Iustin Pop
	doc/conf.py \
551 d17e74b4 Iustin Pop
	doc/html \
552 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd.in \
553 5d9e167a Miguel Di Ciurcio Filho
	doc/examples/ganeti-kvm-poweroff.initd.in \
554 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron.in \
555 679008e7 Iustin Pop
	doc/examples/gnt-config-backup.in \
556 752a8ca8 Michael Hanselmann
	doc/examples/ganeti.default \
557 752a8ca8 Michael Hanselmann
	doc/examples/ganeti.default-debug \
558 d6d9ce45 Guido Trotter
	doc/examples/hooks/ethers \
559 a2442bf9 Luca Bigliardi
	doc/examples/hooks/ipsec.in \
560 89c04c2d Guido Trotter
	doc/examples/gnt-debug/README \
561 89c04c2d Guido Trotter
	doc/examples/gnt-debug/delay0.json \
562 89c04c2d Guido Trotter
	doc/examples/gnt-debug/delay50.json \
563 e8230860 Michael Hanselmann
	test/testutils.py \
564 e8230860 Michael Hanselmann
	test/mocks.py \
565 e8230860 Michael Hanselmann
	$(dist_TESTS) \
566 e8230860 Michael Hanselmann
	$(TEST_FILES) \
567 6be8e2bf Iustin Pop
	man/footer.rst \
568 6be8e2bf Iustin Pop
	$(manrst) \
569 f727d134 Michael Hanselmann
	$(maninput) \
570 39e0d19e Michael Hanselmann
	qa/qa-sample.json \
571 d6159933 Iustin Pop
	$(qa_scripts) \
572 c3f67183 Iustin Pop
	$(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
573 c3f67183 Iustin Pop
	$(HS_PROG_SRCS)
574 e8230860 Michael Hanselmann
575 e8230860 Michael Hanselmann
man_MANS = \
576 e8230860 Michael Hanselmann
	man/ganeti.7 \
577 bae7e531 Michael Hanselmann
	man/ganeti-cleaner.8 \
578 b7b7cda6 Guido Trotter
	man/ganeti-confd.8 \
579 da7e44ee Michael Hanselmann
	man/ganeti-listrunner.8 \
580 320d986d Iustin Pop
	man/ganeti-masterd.8 \
581 e8230860 Michael Hanselmann
	man/ganeti-noded.8 \
582 e8230860 Michael Hanselmann
	man/ganeti-os-interface.7 \
583 320d986d Iustin Pop
	man/ganeti-rapi.8 \
584 e8230860 Michael Hanselmann
	man/ganeti-watcher.8 \
585 e8230860 Michael Hanselmann
	man/gnt-backup.8 \
586 e8230860 Michael Hanselmann
	man/gnt-cluster.8 \
587 d3b4cf9f Iustin Pop
	man/gnt-debug.8 \
588 667dbd6b Adeodato Simo
	man/gnt-group.8 \
589 e8230860 Michael Hanselmann
	man/gnt-instance.8 \
590 d3b4cf9f Iustin Pop
	man/gnt-job.8 \
591 e8230860 Michael Hanselmann
	man/gnt-node.8 \
592 5a19bd35 Iustin Pop
	man/gnt-os.8 \
593 5a19bd35 Iustin Pop
	man/hail.1 \
594 5a19bd35 Iustin Pop
	man/hbal.1 \
595 5a19bd35 Iustin Pop
	man/hscan.1 \
596 d26d808a Iustin Pop
	man/hspace.1 \
597 d26d808a Iustin Pop
	man/htools.1
598 e8230860 Michael Hanselmann
599 5a19bd35 Iustin Pop
manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
600 6be8e2bf Iustin Pop
manhtml = $(patsubst %.rst,%.html,$(manrst))
601 fcdb582d Michael Hanselmann
mangen = $(patsubst %.rst,%.gen,$(manrst))
602 25c92bc5 Michael Hanselmann
maninput = \
603 5a19bd35 Iustin Pop
	$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
604 de8eea3e Iustin Pop
	$(patsubst %.html,%.html.in,$(manhtml)) \
605 fcdb582d Michael Hanselmann
	man/footer.man man/footer.html $(mangen)
606 e8230860 Michael Hanselmann
607 e8230860 Michael Hanselmann
TEST_FILES = \
608 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-8.0.txt \
609 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-8.3.txt \
610 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-disk.txt \
611 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-net-ip4.txt \
612 5a672c30 Manuel Franceschini
	test/data/bdev-drbd-net-ip6.txt \
613 27e46076 Michael Hanselmann
	test/data/cert1.pem \
614 d816408a Iustin Pop
	test/data/proc_drbd8.txt \
615 a6ac80db Iustin Pop
	test/data/proc_drbd80-emptyline.txt \
616 2d76b580 Michael Hanselmann
	test/data/proc_drbd83.txt \
617 549071a0 Luca Bigliardi
	test/data/sys_drbd_usermode_helper.txt \
618 2d76b580 Michael Hanselmann
	test/import-export_unittest-helper
619 e8230860 Michael Hanselmann
620 e8c8cf1a Michael Hanselmann
python_tests = \
621 17496050 Guido Trotter
	test/ganeti.asyncnotifier_unittest.py \
622 f942a838 Michael Hanselmann
	test/ganeti.backend_unittest.py \
623 6de7c41d Iustin Pop
	test/ganeti.bdev_unittest.py \
624 6de7c41d Iustin Pop
	test/ganeti.cli_unittest.py \
625 66d1f035 René Nussbaumer
	test/ganeti.client.gnt_cluster_unittest.py \
626 25ce3ec4 Michael Hanselmann
	test/ganeti.client.gnt_instance_unittest.py \
627 1118ec44 Guido Trotter
	test/ganeti.daemon_unittest.py \
628 6de7c41d Iustin Pop
	test/ganeti.cmdlib_unittest.py \
629 cea881e5 Michael Hanselmann
	test/ganeti.compat_unittest.py \
630 edf7d66e Iustin Pop
	test/ganeti.confd.client_unittest.py \
631 e8230860 Michael Hanselmann
	test/ganeti.config_unittest.py \
632 6de7c41d Iustin Pop
	test/ganeti.constants_unittest.py \
633 3bd19c66 Michael Hanselmann
	test/ganeti.errors_unittest.py \
634 e8230860 Michael Hanselmann
	test/ganeti.hooks_unittest.py \
635 ecdf0398 Michael Hanselmann
	test/ganeti.ht_unittest.py \
636 6de7c41d Iustin Pop
	test/ganeti.http_unittest.py \
637 b7d82e40 Iustin Pop
	test/ganeti.hypervisor_unittest.py \
638 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_chroot_unittest.py \
639 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_fake_unittest.py \
640 748e4b5a Michael Hanselmann
	test/ganeti.hypervisor.hv_kvm_unittest.py \
641 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_lxc_unittest.py \
642 55cc0a44 Michael Hanselmann
	test/ganeti.hypervisor.hv_xen_unittest.py \
643 bb44b1ae Michael Hanselmann
	test/ganeti.impexpd_unittest.py \
644 989a8bee Michael Hanselmann
	test/ganeti.jqueue_unittest.py \
645 e8230860 Michael Hanselmann
	test/ganeti.locking_unittest.py \
646 231db3a5 Michael Hanselmann
	test/ganeti.luxi_unittest.py \
647 033a1d00 Michael Hanselmann
	test/ganeti.masterd.instance_unittest.py \
648 407339d0 Michael Hanselmann
	test/ganeti.mcpu_unittest.py \
649 a744b676 Manuel Franceschini
	test/ganeti.netutils_unittest.py \
650 4c14965f Guido Trotter
	test/ganeti.objects_unittest.py \
651 c32b908e Michael Hanselmann
	test/ganeti.opcodes_unittest.py \
652 a123dc19 Michael Hanselmann
	test/ganeti.qlang_unittest.py \
653 4ca96421 Michael Hanselmann
	test/ganeti.query_unittest.py \
654 cfaeaaf7 Michael Hanselmann
	test/ganeti.rapi.baserlib_unittest.py \
655 95ab4de9 David Knowles
	test/ganeti.rapi.client_unittest.py \
656 4cbd4462 Oleksiy Mishchenko
	test/ganeti.rapi.resources_unittest.py \
657 6395cebb Michael Hanselmann
	test/ganeti.rapi.rlib2_unittest.py \
658 33231500 Michael Hanselmann
	test/ganeti.rpc_unittest.py \
659 f12e1736 René Nussbaumer
	test/ganeti.runtime_unittest.py \
660 6de7c41d Iustin Pop
	test/ganeti.serializer_unittest.py \
661 6de7c41d Iustin Pop
	test/ganeti.ssh_unittest.py \
662 0d2bf835 René Nussbaumer
	test/ganeti.tools.ensure_dirs_unittest.py \
663 93be53da Balazs Lecz
	test/ganeti.uidpool_unittest.py \
664 4fd029cf Michael Hanselmann
	test/ganeti.utils.algo_unittest.py \
665 9d1b963f Michael Hanselmann
	test/ganeti.utils.filelock_unittest.py \
666 f21bb4b7 Michael Hanselmann
	test/ganeti.utils.hash_unittest.py \
667 3865ca48 Michael Hanselmann
	test/ganeti.utils.io_unittest.py \
668 b6fa9a44 Michael Hanselmann
	test/ganeti.utils.log_unittest.py \
669 36a4acd4 Michael Hanselmann
	test/ganeti.utils.mlock_unittest.py \
670 17b97ab3 Michael Hanselmann
	test/ganeti.utils.nodesetup_unittest.py \
671 a4ccecf6 Michael Hanselmann
	test/ganeti.utils.process_unittest.py \
672 79d22269 Michael Hanselmann
	test/ganeti.utils.retry_unittest.py \
673 7fcffe27 Michael Hanselmann
	test/ganeti.utils.text_unittest.py \
674 7831fc5f Michael Hanselmann
	test/ganeti.utils.wrapper_unittest.py \
675 c50645c0 Michael Hanselmann
	test/ganeti.utils.x509_unittest.py \
676 4fd029cf Michael Hanselmann
	test/ganeti.utils_unittest.py \
677 3f991867 Michael Hanselmann
	test/ganeti.workerpool_unittest.py \
678 aefbe369 Michael Hanselmann
	test/cfgupgrade_unittest.py \
679 055f822b Michael Hanselmann
	test/docs_unittest.py \
680 055f822b Michael Hanselmann
	test/tempfile_fork_unittest.py
681 e8230860 Michael Hanselmann
682 b91e9518 Iustin Pop
haskell_tests = htools/test
683 b91e9518 Iustin Pop
684 e8c8cf1a Michael Hanselmann
dist_TESTS = \
685 7172f605 Michael Hanselmann
	test/check-cert-expired_unittest.bash \
686 571b34f8 Michael Hanselmann
	test/daemon-util_unittest.bash \
687 7172f605 Michael Hanselmann
	test/ganeti-cleaner_unittest.bash \
688 2d76b580 Michael Hanselmann
	test/import-export_unittest.bash \
689 e8c8cf1a Michael Hanselmann
	$(python_tests)
690 e8c8cf1a Michael Hanselmann
691 e8230860 Michael Hanselmann
nodist_TESTS =
692 e5f6768c Iustin Pop
if WANT_HTOOLSTESTS
693 b91e9518 Iustin Pop
nodist_TESTS += $(haskell_tests)
694 b91e9518 Iustin Pop
endif
695 e8230860 Michael Hanselmann
696 e8230860 Michael Hanselmann
TESTS = $(dist_TESTS) $(nodist_TESTS)
697 e8230860 Michael Hanselmann
698 27e336af Michael Hanselmann
# Environment for all tests
699 27e336af Michael Hanselmann
PLAIN_TESTS_ENVIRONMENT = \
700 27e336af Michael Hanselmann
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
701 27e336af Michael Hanselmann
702 27e336af Michael Hanselmann
# Environment for tests run by automake
703 f848ac00 Michael Hanselmann
TESTS_ENVIRONMENT = \
704 e8c8cf1a Michael Hanselmann
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
705 6e06b36c Iustin Pop
706 eed5c5df Michael Hanselmann
all_python_code = \
707 01a3a718 Michael Hanselmann
	$(dist_sbin_SCRIPTS) \
708 61631293 Stephen Shirley
	$(dist_tools_PYTHON) \
709 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
710 0d2bf835 René Nussbaumer
	$(nodist_pkglib_python_scripts) \
711 e8c8cf1a Michael Hanselmann
	$(python_tests) \
712 01a3a718 Michael Hanselmann
	$(pkgpython_PYTHON) \
713 2d48a3a2 Michael Hanselmann
	$(client_PYTHON) \
714 01a3a718 Michael Hanselmann
	$(hypervisor_PYTHON) \
715 01a3a718 Michael Hanselmann
	$(rapi_PYTHON) \
716 899c4d2c Michael Hanselmann
	$(server_PYTHON) \
717 0d2bf835 René Nussbaumer
	$(pytools_PYTHON) \
718 01a3a718 Michael Hanselmann
	$(http_PYTHON) \
719 01a3a718 Michael Hanselmann
	$(confd_PYTHON) \
720 dc101ecc Michael Hanselmann
	$(masterd_PYTHON) \
721 bb44b1ae Michael Hanselmann
	$(impexpd_PYTHON) \
722 c047a981 Michael Hanselmann
	$(utils_PYTHON) \
723 9f4bb951 Michael Hanselmann
	$(watcher_PYTHON) \
724 a8c68e44 Michael Hanselmann
	$(noinst_PYTHON) \
725 a8c68e44 Michael Hanselmann
	$(qa_scripts)
726 01a3a718 Michael Hanselmann
727 eed5c5df Michael Hanselmann
srclink_files = \
728 6be8e2bf Iustin Pop
	man/footer.rst \
729 7172f605 Michael Hanselmann
	test/check-cert-expired_unittest.bash \
730 571b34f8 Michael Hanselmann
	test/daemon-util_unittest.bash \
731 7172f605 Michael Hanselmann
	test/ganeti-cleaner_unittest.bash \
732 2d76b580 Michael Hanselmann
	test/import-export_unittest.bash \
733 d6159933 Iustin Pop
	$(all_python_code) \
734 c3f67183 Iustin Pop
	$(HS_LIB_SRCS) $(HS_PROG_SRCS)
735 eed5c5df Michael Hanselmann
736 eed5c5df Michael Hanselmann
check_python_code = \
737 e4e7c7df Michael Hanselmann
	$(BUILD_BASH_COMPLETION) \
738 95eb4188 Michael Hanselmann
	$(DOCPP) \
739 eed5c5df Michael Hanselmann
	$(all_python_code)
740 eed5c5df Michael Hanselmann
741 e4e7c7df Michael Hanselmann
lint_python_code = \
742 f60d352e Michael Hanselmann
	ganeti \
743 f1763373 Iustin Pop
	ganeti/http/server.py \
744 f60d352e Michael Hanselmann
	$(dist_sbin_SCRIPTS) \
745 61631293 Stephen Shirley
	$(dist_tools_PYTHON) \
746 2d76b580 Michael Hanselmann
	$(pkglib_python_scripts) \
747 2cc8bdd0 Michael Hanselmann
	$(BUILD_BASH_COMPLETION) \
748 95eb4188 Michael Hanselmann
	$(DOCPP) \
749 2cc8bdd0 Michael Hanselmann
	$(PYTHON_BOOTSTRAP)
750 eed5c5df Michael Hanselmann
751 571b34f8 Michael Hanselmann
test/daemon-util_unittest.bash: daemons/daemon-util
752 571b34f8 Michael Hanselmann
753 7172f605 Michael Hanselmann
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
754 7172f605 Michael Hanselmann
755 26916aad Apollon Oikonomopoulos
tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
756 26916aad Apollon Oikonomopoulos
	sed -f $(REPLACE_VARS_SED) < $< > $@
757 26916aad Apollon Oikonomopoulos
	chmod +x $@
758 26916aad Apollon Oikonomopoulos
759 dbefcc7e Michael Hanselmann
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
760 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
761 e8230860 Michael Hanselmann
	chmod u+x $@
762 e8230860 Michael Hanselmann
763 c964d962 Michael Hanselmann
daemons/%: daemons/%.in $(REPLACE_VARS_SED)
764 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
765 5c566e17 Michael Hanselmann
	chmod +x $@
766 e8230860 Michael Hanselmann
767 c964d962 Michael Hanselmann
doc/examples/%: doc/examples/%.in $(REPLACE_VARS_SED)
768 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
769 e8230860 Michael Hanselmann
770 c964d962 Michael Hanselmann
doc/examples/hooks/%: doc/examples/hooks/%.in $(REPLACE_VARS_SED)
771 a2442bf9 Luca Bigliardi
	sed -f $(REPLACE_VARS_SED) < $< > $@
772 a2442bf9 Luca Bigliardi
773 b959138f Michael Hanselmann
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
774 88a6ca6f Michael Hanselmann
	lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin
775 b959138f Michael Hanselmann
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
776 4f3d5b76 Michael Hanselmann
777 f86e82ef Iustin Pop
doc/%.png: doc/%.dot
778 2ab2b9f5 Iustin Pop
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
779 f86e82ef Iustin Pop
	$(DOT) -Tpng -o $@ $<
780 f86e82ef Iustin Pop
781 de8eea3e Iustin Pop
man/footer.man: man/footer.rst
782 de8eea3e Iustin Pop
	@test -n "$(PANDOC)" || \
783 de8eea3e Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
784 de8eea3e Iustin Pop
	$(PANDOC) -f rst -t man -o $@ $<
785 de8eea3e Iustin Pop
786 6be8e2bf Iustin Pop
man/footer.html: man/footer.rst
787 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
788 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
789 6be8e2bf Iustin Pop
	$(PANDOC) -f rst -t html -o $@ $<
790 6be8e2bf Iustin Pop
791 fcdb582d Michael Hanselmann
man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py
792 fcdb582d Michael Hanselmann
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(DOCPP) < $< > $@
793 fcdb582d Michael Hanselmann
794 5a19bd35 Iustin Pop
man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.man
795 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
796 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
797 a01dd3c6 Iustin Pop
	set -o pipefail ; \
798 6be8e2bf Iustin Pop
	$(PANDOC) -s -f rst -t man -A man/footer.man $< | \
799 6be8e2bf Iustin Pop
	  sed -e 's/\\@/@/g' > $@
800 5f55173b Iustin Pop
	if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
801 2ab2b9f5 Iustin Pop
802 fcdb582d Michael Hanselmann
man/%.html.in: man/%.gen man/footer.html
803 6be8e2bf Iustin Pop
	@test -n "$(PANDOC)" || \
804 6be8e2bf Iustin Pop
	  { echo 'pandoc' not found during configure; exit 1; }
805 a01dd3c6 Iustin Pop
	set -o pipefail ; \
806 6be8e2bf Iustin Pop
	$(PANDOC) -s -f rst -t html -A man/footer.html $< | \
807 6be8e2bf Iustin Pop
	  sed -e 's/\\@/@/g' > $@
808 6be8e2bf Iustin Pop
809 5a19bd35 Iustin Pop
man/%.1: man/%.1.in $(REPLACE_VARS_SED)
810 5a19bd35 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
811 5a19bd35 Iustin Pop
812 dbefcc7e Michael Hanselmann
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
813 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
814 e8230860 Michael Hanselmann
815 dbefcc7e Michael Hanselmann
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
816 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
817 e8230860 Michael Hanselmann
818 dbefcc7e Michael Hanselmann
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
819 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
820 f29266b4 Iustin Pop
821 75f76703 Michael Hanselmann
epydoc.conf: epydoc.conf.in Makefile
822 75f76703 Michael Hanselmann
	sed -e 's#@MODULES@#$(strip $(lint_python_code))#g' < $< > $@
823 f774bd03 Michael Hanselmann
824 84a12e40 Iustin Pop
vcs-version:
825 84a12e40 Iustin Pop
	if test -d .git; then \
826 84a12e40 Iustin Pop
	  git describe > $@; \
827 84a12e40 Iustin Pop
	elif test ! -f $@ ; then \
828 84a12e40 Iustin Pop
	  echo "Cannot auto-generate $@ file"; exit 1; \
829 84a12e40 Iustin Pop
	fi
830 84a12e40 Iustin Pop
831 84a12e40 Iustin Pop
.PHONY: regen-vcs-version
832 84a12e40 Iustin Pop
regen-vcs-version:
833 e8230860 Michael Hanselmann
	set -e; \
834 84a12e40 Iustin Pop
	cd $(srcdir); \
835 84a12e40 Iustin Pop
	if test -d .git; then \
836 84a12e40 Iustin Pop
	  rm -f vcs-version; \
837 84a12e40 Iustin Pop
	  $(MAKE) vcs-version; \
838 84a12e40 Iustin Pop
	fi
839 84a12e40 Iustin Pop
840 d6159933 Iustin Pop
htools/Ganeti/HTools/Version.hs: htools/Ganeti/HTools/Version.hs.in vcs-version
841 d6159933 Iustin Pop
	set -e; \
842 d6159933 Iustin Pop
	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
843 d6159933 Iustin Pop
	sed -e "s/%ver%/$$VCSVER/" < $< > $@
844 d6159933 Iustin Pop
845 d99d1e36 Iustin Pop
htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
846 d99d1e36 Iustin Pop
	lib/constants.py lib/_autoconf.py $(CONVERT_CONSTANTS)
847 11fd5a86 Iustin Pop
	set -e; \
848 876f6a5e Iustin Pop
	{ cat $< ; PYTHONPATH=. $(CONVERT_CONSTANTS); } > $@
849 d99d1e36 Iustin Pop
850 13aeae6a Iustin Pop
lib/_autoconf.py: Makefile | lib/.dir
851 84a12e40 Iustin Pop
	set -e; \
852 e8230860 Michael Hanselmann
	{ echo '# This file is automatically generated, do not edit!'; \
853 e8230860 Michael Hanselmann
	  echo '#'; \
854 67047322 Iustin Pop
	  echo ''; \
855 67047322 Iustin Pop
	  echo '"""Build-time configuration for Ganeti.'; \
856 67047322 Iustin Pop
	  echo '';\
857 67047322 Iustin Pop
	  echo 'This file is autogenerated by the build process.'; \
858 67047322 Iustin Pop
	  echo 'For any changes you need to re-run ./configure (and'; \
859 67047322 Iustin Pop
	  echo 'not edit by hand).'; \
860 67047322 Iustin Pop
	  echo ''; \
861 67047322 Iustin Pop
	  echo '"""'; \
862 67047322 Iustin Pop
	  echo ''; \
863 0a4e7f24 Iustin Pop
	  echo '# pylint: disable-msg=C0301,C0324'; \
864 0a4e7f24 Iustin Pop
	  echo '# because this is autogenerated, we do not want'; \
865 0a4e7f24 Iustin Pop
	  echo '# style warnings' ; \
866 0a4e7f24 Iustin Pop
	  echo ''; \
867 e8230860 Michael Hanselmann
	  echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
868 e8230860 Michael Hanselmann
	  echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
869 e8230860 Michael Hanselmann
	  echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
870 e8230860 Michael Hanselmann
	  echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
871 e8230860 Michael Hanselmann
	  echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
872 e8230860 Michael Hanselmann
	  echo "VERSION_FULL = '$(VERSION_FULL)'"; \
873 e8230860 Michael Hanselmann
	  echo "LOCALSTATEDIR = '$(localstatedir)'"; \
874 e8230860 Michael Hanselmann
	  echo "SYSCONFDIR = '$(sysconfdir)'"; \
875 553bd93f Vitaly Kuznetsov
	  echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
876 e8230860 Michael Hanselmann
	  echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
877 e8230860 Michael Hanselmann
	  echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
878 2f2dbb4b Jun Futagawa
	  echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
879 e8230860 Michael Hanselmann
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
880 e8230860 Michael Hanselmann
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
881 e8230860 Michael Hanselmann
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
882 cb7c0198 Iustin Pop
	  echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
883 4b97f902 Apollon Oikonomopoulos
	  echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
884 4b97f902 Apollon Oikonomopoulos
	  echo "ENABLE_SHARED_FILE_STORAGE = $(ENABLE_SHARED_FILE_STORAGE)"; \
885 e8230860 Michael Hanselmann
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
886 7e2c5b9e Guido Trotter
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
887 fe5b0c42 Michael Hanselmann
	  echo "SOCAT_PATH = '$(SOCAT)'"; \
888 fe5b0c42 Michael Hanselmann
	  echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
889 e90739d6 Michael Hanselmann
	  echo "SOCAT_USE_COMPRESS = $(SOCAT_USE_COMPRESS)"; \
890 bea60381 Michael Hanselmann
	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
891 bea60381 Michael Hanselmann
	  echo "TOOLSDIR = '$(toolsdir)'"; \
892 4f3d5b76 Michael Hanselmann
	  echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
893 f154a7a3 Michael Hanselmann
	  echo "PKGLIBDIR = '$(pkglibdir)'"; \
894 89b70f39 Iustin Pop
	  echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \
895 551b6283 Iustin Pop
	  echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
896 8b72b05c René Nussbaumer
	  echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
897 f12e1736 René Nussbaumer
	  echo "ADMIN_GROUP = '$(ADMIN_GROUP)'"; \
898 8b72b05c René Nussbaumer
	  echo "MASTERD_USER = '$(MASTERD_USER)'"; \
899 f12e1736 René Nussbaumer
	  echo "MASTERD_GROUP = '$(MASTERD_GROUP)'"; \
900 8b72b05c René Nussbaumer
	  echo "RAPI_USER = '$(RAPI_USER)'"; \
901 f12e1736 René Nussbaumer
	  echo "RAPI_GROUP = '$(RAPI_GROUP)'"; \
902 f12e1736 René Nussbaumer
	  echo "CONFD_USER = '$(CONFD_USER)'"; \
903 f12e1736 René Nussbaumer
	  echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
904 f12e1736 René Nussbaumer
	  echo "NODED_USER = '$(NODED_USER)'"; \
905 03881cb0 René Nussbaumer
	  echo "NODED_GROUP = '$(NODED_GROUP)'"; \
906 3536c792 Iustin Pop
	  echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
907 e5395072 Iustin Pop
	  if [ "$(HTOOLS)" ]; then \
908 e5395072 Iustin Pop
	    echo "HTOOLS = True"; \
909 e5395072 Iustin Pop
	  else \
910 e5395072 Iustin Pop
	    echo "HTOOLS = False"; \
911 e5395072 Iustin Pop
	  fi; \
912 e8230860 Michael Hanselmann
	} > $@
913 e8230860 Michael Hanselmann
914 13aeae6a Iustin Pop
lib/_vcsversion.py: Makefile vcs-version | lib/.dir
915 13aeae6a Iustin Pop
	set -e; \
916 13aeae6a Iustin Pop
	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
917 13aeae6a Iustin Pop
	{ echo '# This file is automatically generated, do not edit!'; \
918 13aeae6a Iustin Pop
	  echo '#'; \
919 13aeae6a Iustin Pop
	  echo ''; \
920 13aeae6a Iustin Pop
	  echo '"""Build-time VCS version number for Ganeti.'; \
921 13aeae6a Iustin Pop
	  echo '';\
922 13aeae6a Iustin Pop
	  echo 'This file is autogenerated by the build process.'; \
923 13aeae6a Iustin Pop
	  echo 'For any changes you need to re-run ./configure (and'; \
924 13aeae6a Iustin Pop
	  echo 'not edit by hand).'; \
925 13aeae6a Iustin Pop
	  echo ''; \
926 13aeae6a Iustin Pop
	  echo '"""'; \
927 13aeae6a Iustin Pop
	  echo ''; \
928 13aeae6a Iustin Pop
	  echo '# pylint: disable-msg=C0301,C0324'; \
929 13aeae6a Iustin Pop
	  echo '# because this is autogenerated, we do not want'; \
930 13aeae6a Iustin Pop
	  echo '# style warnings' ; \
931 13aeae6a Iustin Pop
	  echo ''; \
932 13aeae6a Iustin Pop
	  echo "VCS_VERSION = '$$VCSVER'"; \
933 13aeae6a Iustin Pop
	} > $@
934 13aeae6a Iustin Pop
935 dbefcc7e Michael Hanselmann
$(REPLACE_VARS_SED): Makefile
936 e8230860 Michael Hanselmann
	set -e; \
937 e8230860 Michael Hanselmann
	{ echo 's#@PREFIX@#$(prefix)#g'; \
938 e8230860 Michael Hanselmann
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
939 e8230860 Michael Hanselmann
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
940 7a2ba406 Luca Bigliardi
	  echo 's#@BINDIR@#$(bindir)#g'; \
941 e8230860 Michael Hanselmann
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
942 e8230860 Michael Hanselmann
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
943 2f2dbb4b Jun Futagawa
	  echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
944 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
945 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
946 56956bcb Iustin Pop
	  echo 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \
947 56956bcb Iustin Pop
	  echo 's#@CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \
948 d3b4cf9f Iustin Pop
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
949 7e1fac25 Michael Hanselmann
	  echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
950 c5159571 Iustin Pop
	  echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
951 0d150c50 René Nussbaumer
	  echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \
952 0d150c50 René Nussbaumer
	  echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \
953 0d150c50 René Nussbaumer
	  echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \
954 0d150c50 René Nussbaumer
	  echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \
955 0d150c50 René Nussbaumer
	  echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
956 0d150c50 René Nussbaumer
	  echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
957 0d150c50 René Nussbaumer
	  echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
958 0d150c50 René Nussbaumer
	  echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
959 46a8da3b René Nussbaumer
	  echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
960 e8230860 Michael Hanselmann
	} > $@
961 e8230860 Michael Hanselmann
962 67313146 Michael Hanselmann
# Using deferred evaluation
963 899c4d2c Michael Hanselmann
daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
964 9f4bb951 Michael Hanselmann
daemons/ganeti-watcher: MODULE = ganeti.watcher
965 67313146 Michael Hanselmann
scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
966 0d2bf835 René Nussbaumer
tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs
967 67313146 Michael Hanselmann
968 c964d962 Michael Hanselmann
$(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
969 67313146 Michael Hanselmann
	test -n "$(MODULE)" || { echo Missing module; exit 1; }
970 2d48a3a2 Michael Hanselmann
	set -e; \
971 d75e738e Michael Hanselmann
	{ echo '#!/usr/bin/python'; \
972 2d48a3a2 Michael Hanselmann
	  echo '# This file is automatically generated, do not edit!'; \
973 67313146 Michael Hanselmann
	  echo "# Edit $(MODULE) instead."; \
974 2d48a3a2 Michael Hanselmann
	  echo; \
975 67313146 Michael Hanselmann
	  echo '"""Bootstrap script for L{$(MODULE)}"""'; \
976 2d48a3a2 Michael Hanselmann
	  echo; \
977 2d48a3a2 Michael Hanselmann
	  echo '# pylint: disable-msg=C0103'; \
978 2d48a3a2 Michael Hanselmann
	  echo '# C0103: Invalid name'; \
979 2d48a3a2 Michael Hanselmann
	  echo; \
980 2d48a3a2 Michael Hanselmann
	  echo 'import sys'; \
981 67313146 Michael Hanselmann
	  echo 'import $(MODULE) as main'; \
982 2d48a3a2 Michael Hanselmann
	  echo; \
983 2d48a3a2 Michael Hanselmann
	  echo '# Temporarily alias commands until bash completion'; \
984 2d48a3a2 Michael Hanselmann
	  echo '# generator is changed'; \
985 67313146 Michael Hanselmann
	  echo 'if hasattr(main, "commands"):'; \
986 3f42b4f6 Michael Hanselmann
	  echo '  commands = main.commands # pylint: disable-msg=E1101'; \
987 3f42b4f6 Michael Hanselmann
	  echo 'if hasattr(main, "aliases"):'; \
988 3f42b4f6 Michael Hanselmann
	  echo '  aliases = main.aliases # pylint: disable-msg=E1101'; \
989 2d48a3a2 Michael Hanselmann
	  echo; \
990 2d48a3a2 Michael Hanselmann
	  echo 'if __name__ == "__main__":'; \
991 67313146 Michael Hanselmann
	  echo '  sys.exit(main.Main())'; \
992 2d48a3a2 Michael Hanselmann
	} > $@
993 2d48a3a2 Michael Hanselmann
	chmod u+x $@
994 2d48a3a2 Michael Hanselmann
995 e8230860 Michael Hanselmann
# We need to create symlinks because "make distcheck" will not install Python
996 e8230860 Michael Hanselmann
# files when building.
997 c964d962 Michael Hanselmann
stamp-srclinks: Makefile | $(all_dirfiles)
998 e8230860 Michael Hanselmann
	set -e; \
999 01a3a718 Michael Hanselmann
	for i in $(srclink_files); do \
1000 e8230860 Michael Hanselmann
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
1001 e8230860 Michael Hanselmann
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
1002 e8230860 Michael Hanselmann
		fi; \
1003 e8230860 Michael Hanselmann
	done
1004 dd1dfd9a Michael Hanselmann
	touch $@
1005 97a37b3f Michael Hanselmann
1006 9ff7e35c Michael Hanselmann
.PHONY: ganeti
1007 9ff7e35c Michael Hanselmann
ganeti:
1008 01f3e7b1 Iustin Pop
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
1009 9ff7e35c Michael Hanselmann
1010 6b997854 Michael Hanselmann
.PHONY: check-dirs
1011 6b997854 Michael Hanselmann
check-dirs: $(BUILT_SOURCES)
1012 0c1103d6 Iustin Pop
	@set -e; \
1013 6b997854 Michael Hanselmann
	find . -type d \( \( -name . \) -o \( \
1014 6b997854 Michael Hanselmann
		-name .git -o \
1015 6b997854 Michael Hanselmann
		-name autom4te.cache \
1016 6b997854 Michael Hanselmann
		\) -prune -o -print \) | { \
1017 6b997854 Michael Hanselmann
		error=; \
1018 6b997854 Michael Hanselmann
		while read dir; do \
1019 6b997854 Michael Hanselmann
			case "$$dir" in \
1020 6b997854 Michael Hanselmann
				$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
1021 6b997854 Michael Hanselmann
				*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
1022 6b997854 Michael Hanselmann
			esac; \
1023 6b997854 Michael Hanselmann
		done; \
1024 6b997854 Michael Hanselmann
		for dir in $(DIRS); do \
1025 6b997854 Michael Hanselmann
			if ! test -d "$$dir"; then \
1026 6b997854 Michael Hanselmann
				echo "Directory $$dir listed in DIRS does not exist" >&2; \
1027 6b997854 Michael Hanselmann
				error=1; \
1028 6b997854 Michael Hanselmann
			fi \
1029 6b997854 Michael Hanselmann
		done; \
1030 6b997854 Michael Hanselmann
		if test -n "$$error"; then exit 1; else exit 0; fi; \
1031 6b997854 Michael Hanselmann
	}
1032 6b997854 Michael Hanselmann
1033 6b997854 Michael Hanselmann
check-local: check-dirs
1034 eed5c5df Michael Hanselmann
	$(CHECK_PYTHON_CODE) $(check_python_code)
1035 35576615 Michael Hanselmann
	$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
1036 7385c51d Michael Hanselmann
	$(CHECK_NEWS) < $(top_srcdir)/NEWS
1037 9488fd1d Michael Hanselmann
	expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
1038 154d7ba5 Michael Hanselmann
	if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \
1039 9488fd1d Michael Hanselmann
		echo "Incorrect version in README, expected $$expver"; \
1040 9488fd1d Michael Hanselmann
		exit 1; \
1041 7ecb3d0e Michael Hanselmann
	fi; \
1042 7ecb3d0e Michael Hanselmann
	if test "`sed -ne '4 p' $(top_srcdir)/doc/iallocator.rst`" != \
1043 7ecb3d0e Michael Hanselmann
					"Documents Ganeti version $$expver"; then \
1044 7ecb3d0e Michael Hanselmann
		echo "Incorrect version in iallocator.rst, expected $$expver"; \
1045 7ecb3d0e Michael Hanselmann
		exit 1; \
1046 9488fd1d Michael Hanselmann
	fi
1047 eed5c5df Michael Hanselmann
1048 49e11c49 Iustin Pop
.PHONY: hs-check
1049 49e11c49 Iustin Pop
hs-check: htools/test
1050 49e11c49 Iustin Pop
	@rm -f test.tix
1051 49e11c49 Iustin Pop
	./htools/test
1052 49e11c49 Iustin Pop
1053 e0098923 Iustin Pop
.PHONY: lint
1054 c964d962 Michael Hanselmann
lint: $(BUILT_SOURCES)
1055 6d7cc5ff Michael Hanselmann
	@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
1056 6d7cc5ff Michael Hanselmann
	$(PYLINT) $(LINT_OPTS) $(lint_python_code)
1057 3582eef6 Iustin Pop
	cd $(top_srcdir)/qa && \
1058 3582eef6 Iustin Pop
	  PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
1059 3582eef6 Iustin Pop
	  --rcfile  ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
1060 e0098923 Iustin Pop
1061 191ff68c Iustin Pop
.PHONY: hlint
1062 c3f67183 Iustin Pop
hlint: $(HS_BUILT_SRCS)
1063 191ff68c Iustin Pop
	if tty -s; then C="-c"; else C=""; fi; \
1064 191ff68c Iustin Pop
	hlint --report=doc/hs-lint.html $$C htools
1065 191ff68c Iustin Pop
1066 84a12e40 Iustin Pop
# a dist hook rule for updating the vcs-version file; this is
1067 84a12e40 Iustin Pop
# hardcoded due to where it needs to build the file...
1068 84a12e40 Iustin Pop
dist-hook:
1069 84a12e40 Iustin Pop
	$(MAKE) regen-vcs-version && \
1070 84a12e40 Iustin Pop
	rm -f $(top_distdir)/vcs-version && \
1071 84a12e40 Iustin Pop
	cp -p $(srcdir)/vcs-version $(top_distdir)
1072 84a12e40 Iustin Pop
1073 84a12e40 Iustin Pop
# a distcheck hook rule for catching revision control directories
1074 b6f2e47f Iustin Pop
distcheck-hook:
1075 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name .svn -or -name .git | grep .; then \
1076 c6aa0c42 Michael Hanselmann
		echo "Found revision control files in final archive." 1>&2; \
1077 c6aa0c42 Michael Hanselmann
		exit 1; \
1078 c6aa0c42 Michael Hanselmann
	fi
1079 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name '*.py[co]' | grep .; then \
1080 c6aa0c42 Michael Hanselmann
		echo "Found Python byte code in final archive." 1>&2; \
1081 c6aa0c42 Michael Hanselmann
		exit 1; \
1082 c6aa0c42 Michael Hanselmann
	fi
1083 c6aa0c42 Michael Hanselmann
	if find $(top_distdir) -name '*~' | grep .; then \
1084 c6aa0c42 Michael Hanselmann
		echo "Found backup files in final archive." 1>&2; \
1085 b6f2e47f Iustin Pop
		exit 1; \
1086 b6f2e47f Iustin Pop
	fi
1087 bf0b21da Michael Hanselmann
# Empty files or directories should not be distributed. They can cause
1088 bf0b21da Michael Hanselmann
# unnecessary warnings for packagers. Directories used by automake during
1089 bf0b21da Michael Hanselmann
# distcheck must be excluded.
1090 bf0b21da Michael Hanselmann
	if find $(top_distdir) -empty -and -not \( \
1091 bf0b21da Michael Hanselmann
			-path $(top_distdir)/_build -or \
1092 bf0b21da Michael Hanselmann
			-path $(top_distdir)/_inst \) | grep .; then \
1093 bf0b21da Michael Hanselmann
		echo "Found empty files or directories in final archive." 1>&2; \
1094 bf0b21da Michael Hanselmann
		exit 1; \
1095 bf0b21da Michael Hanselmann
	fi
1096 c7b86f6c Michael Hanselmann
	if test -n "$(BUILD_RELEASE)" && \
1097 c7b86f6c Michael Hanselmann
	   grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
1098 c7b86f6c Michael Hanselmann
		echo "Found unreleased version in NEWS." >&2; \
1099 c7b86f6c Michael Hanselmann
		exit 1; \
1100 c7b86f6c Michael Hanselmann
	fi
1101 c7b86f6c Michael Hanselmann
1102 c7b86f6c Michael Hanselmann
# When building a release, stricter checks should be used
1103 e627fe09 Michael Hanselmann
distcheck-release dist-release: export BUILD_RELEASE = 1
1104 c7b86f6c Michael Hanselmann
distcheck-release: distcheck
1105 b6f2e47f Iustin Pop
1106 e627fe09 Michael Hanselmann
dist-release: dist
1107 e627fe09 Michael Hanselmann
	set -e; \
1108 e627fe09 Michael Hanselmann
	for i in $(DIST_ARCHIVES); do \
1109 e627fe09 Michael Hanselmann
		echo -n "Checking $$i ... "; \
1110 e627fe09 Michael Hanselmann
		autotools/check-tar < $$i; \
1111 e627fe09 Michael Hanselmann
		echo OK; \
1112 e627fe09 Michael Hanselmann
	done
1113 e627fe09 Michael Hanselmann
1114 8925faaa Iustin Pop
install-exec-local:
1115 0d93b082 Michael Hanselmann
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
1116 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
1117 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/run/ganeti"
1118 e8230860 Michael Hanselmann
1119 c964d962 Michael Hanselmann
# To avoid conflicts between directory names and other targets, a file inside
1120 c964d962 Michael Hanselmann
# the directory is used to ensure its existence.
1121 c964d962 Michael Hanselmann
%.dir:
1122 c964d962 Michael Hanselmann
	@mkdir_p@ $* && touch $@
1123 e8230860 Michael Hanselmann
1124 d128fdb6 Iustin Pop
.PHONY: apidoc
1125 a38bfce5 Iustin Pop
if WANT_HTOOLSAPIDOC
1126 a38bfce5 Iustin Pop
apidoc: py-apidoc hs-apidoc
1127 a38bfce5 Iustin Pop
else
1128 a38bfce5 Iustin Pop
apidoc: py-apidoc
1129 a38bfce5 Iustin Pop
endif
1130 a38bfce5 Iustin Pop
1131 a38bfce5 Iustin Pop
.PHONY: py-apidoc
1132 a38bfce5 Iustin Pop
py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
1133 b959138f Michael Hanselmann
	$(RUN_IN_TEMPDIR) epydoc -v \
1134 b959138f Michael Hanselmann
		--conf $(CURDIR)/epydoc.conf \
1135 22c5390d Iustin Pop
		--output $(CURDIR)/$(APIDOC_PY_DIR)
1136 a38bfce5 Iustin Pop
1137 a38bfce5 Iustin Pop
.PHONY: hs-apidoc
1138 c3f67183 Iustin Pop
hs-apidoc: $(HS_BUILT_SRCS)
1139 a38bfce5 Iustin Pop
	@test -n "$(HSCOLOUR)" || \
1140 a38bfce5 Iustin Pop
	    { echo 'HsColour' not found during configure; exit 1; }
1141 a38bfce5 Iustin Pop
	@test -n "$(HADDOCK)" || \
1142 a38bfce5 Iustin Pop
	    { echo 'haddock' not found during configure; exit 1; }
1143 22c5390d Iustin Pop
	rm -rf $(APIDOC_HS_DIR)/*
1144 458a286a Iustin Pop
	@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/HTools/Program
1145 22c5390d Iustin Pop
	$(HSCOLOUR) -print-css > $(APIDOC_HS_DIR)/Ganeti/hscolour.css
1146 22c5390d Iustin Pop
	ln -s ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css
1147 a38bfce5 Iustin Pop
	set -e ; \
1148 a38bfce5 Iustin Pop
	cd htools; \
1149 c478f837 Iustin Pop
	if [ "$(HTOOLS_NOCURL)" ]; \
1150 c478f837 Iustin Pop
	then OPTGHC="--optghc=$(HTOOLS_NOCURL)"; \
1151 c478f837 Iustin Pop
	else OPTGHC=""; \
1152 c478f837 Iustin Pop
	fi; \
1153 1adec4be Iustin Pop
	if [ "$(HTOOLS_PARALLEL3)" ]; \
1154 1adec4be Iustin Pop
	then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_PARALLEL3)"; \
1155 1adec4be Iustin Pop
	fi; \
1156 606e71d3 Iustin Pop
	RELSRCS="$(HS_LIB_SRCS:htools/%=%)  $(HS_BUILT_SRCS:htools/%=%)"; \
1157 a38bfce5 Iustin Pop
	for file in $$RELSRCS; do \
1158 a38bfce5 Iustin Pop
		hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
1159 22c5390d Iustin Pop
		$(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \
1160 a38bfce5 Iustin Pop
	done ; \
1161 22c5390d Iustin Pop
	$(HADDOCK) --odir ../$(APIDOC_HS_DIR) --html --ignore-all-exports -w \
1162 a38bfce5 Iustin Pop
		-t ganeti-htools -p haddock-prologue \
1163 a38bfce5 Iustin Pop
		--source-module="%{MODULE/.//}.html" \
1164 a38bfce5 Iustin Pop
		--source-entity="%{MODULE/.//}.html#%{NAME}" \
1165 c478f837 Iustin Pop
		$$OPTGHC \
1166 c3f67183 Iustin Pop
		$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
1167 d128fdb6 Iustin Pop
1168 13e720f1 Iustin Pop
.PHONY: TAGS
1169 eb732fb5 Michael Hanselmann
TAGS: $(BUILT_SOURCES)
1170 13e720f1 Iustin Pop
	rm -f TAGS
1171 74fa8200 Iustin Pop
	find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
1172 74fa8200 Iustin Pop
	  -path './daemons/ganeti-*' -o -path './tools/*' -o \
1173 74fa8200 Iustin Pop
	  -path './qa/*.py' | \
1174 3bb5c580 Iustin Pop
	  etags -l python -
1175 13e720f1 Iustin Pop
1176 27e336af Michael Hanselmann
.PHONY: coverage
1177 b91e9518 Iustin Pop
if WANT_HTOOLS
1178 b91e9518 Iustin Pop
coverage: py-coverage hs-coverage
1179 b91e9518 Iustin Pop
else
1180 b91e9518 Iustin Pop
coverage: py-coverage
1181 b91e9518 Iustin Pop
endif
1182 b91e9518 Iustin Pop
1183 b91e9518 Iustin Pop
.PHONY: py-coverage
1184 b91e9518 Iustin Pop
py-coverage: $(BUILT_SOURCES) $(python_tests)
1185 27e336af Michael Hanselmann
	set -e; \
1186 22c5390d Iustin Pop
	COVERAGE_FILE=$(CURDIR)/$(COVERAGE_PY_DIR)/data \
1187 22c5390d Iustin Pop
	TEXT_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR)/report.txt \
1188 22c5390d Iustin Pop
	HTML_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR) \
1189 e8c8cf1a Michael Hanselmann
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
1190 e8c8cf1a Michael Hanselmann
	$(python_tests)
1191 27e336af Michael Hanselmann
1192 b91e9518 Iustin Pop
.PHONY: hs-coverage
1193 b91e9518 Iustin Pop
hs-coverage: $(haskell_tests)
1194 b91e9518 Iustin Pop
	cd htools && rm -f *.tix *.mix && ./test
1195 48f12e73 Iustin Pop
	@mkdir_p@ $(COVERAGE_HS_DIR)
1196 22c5390d Iustin Pop
	hpc markup --destdir=$(COVERAGE_HS_DIR) htools/test $(HPCEXCL)
1197 b91e9518 Iustin Pop
	hpc report htools/test $(HPCEXCL)
1198 16a6192d Iustin Pop
	ln -sf hpc_index.html $(COVERAGE_HS_DIR)/index.html
1199 b91e9518 Iustin Pop
1200 ec8379bd Iustin Pop
# Special "kind-of-QA" target for htools, needs special setup (all
1201 ec8379bd Iustin Pop
# tools compiled with -fhpc)
1202 ec8379bd Iustin Pop
.PHONY: live-test
1203 ec8379bd Iustin Pop
live-test: all
1204 ec8379bd Iustin Pop
	set -e ; \
1205 ec8379bd Iustin Pop
	cd htools; \
1206 ec8379bd Iustin Pop
	rm -f .hpc; ln -s ../.hpc .hpc; \
1207 ec8379bd Iustin Pop
	rm -f *.tix *.mix; \
1208 ec8379bd Iustin Pop
	./live-test.sh; \
1209 c3f67183 Iustin Pop
	hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:htools/%=%)) \
1210 ec8379bd Iustin Pop
	  --output=live-test.tix ; \
1211 22c5390d Iustin Pop
	@mkdir_p@ ../$(COVERAGE_HS_DIR) ; \
1212 22c5390d Iustin Pop
	hpc markup --destdir=../$(COVERAGE_HS_DIR) live-test \
1213 ec8379bd Iustin Pop
		--srcdir=.. $(HPCEXCL) ; \
1214 ec8379bd Iustin Pop
	hpc report --srcdir=.. live-test $(HPCEXCL)
1215 b91e9518 Iustin Pop
1216 b341b9ca Guido Trotter
commit-check: distcheck lint apidoc
1217 b341b9ca Guido Trotter
1218 3baa809c Michael Hanselmann
-include ./Makefile.local
1219 3baa809c Michael Hanselmann
1220 e8230860 Michael Hanselmann
# vim: set noet :