Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 1494a4cc

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