Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ c3f67183

History | View | Annotate | Download (29.7 kB)

1
# Ganeti makefile
2
# - Indent with tabs only.
3
# - Keep files sorted; one line per file.
4
# - Directories in lib/ must have their own *dir variable (see hypervisor).
5
# - All directories must be listed DIRS.
6
# - Use autogen.sh to generate Makefile.in and configure script.
7

    
8
# Automake doesn't export these variables before version 1.10.
9
abs_top_builddir = @abs_top_builddir@
10
abs_top_srcdir = @abs_top_srcdir@
11

    
12
# Use bash in order to be able to use pipefail
13
SHELL=/bin/bash
14

    
15
ACLOCAL_AMFLAGS = -I autotools
16
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
17
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
18
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
19
CHECK_MAN = $(top_srcdir)/autotools/check-man
20
CHECK_VERSION = $(top_srcdir)/autotools/check-version
21
CHECK_NEWS = $(top_srcdir)/autotools/check-news
22
DOCPP = $(top_srcdir)/autotools/docpp
23
REPLACE_VARS_SED = autotools/replace_vars.sed
24

    
25
# Note: the variable must be named after the directory + 'dir' suffix
26
clientdir = $(pkgpythondir)/client
27
hypervisordir = $(pkgpythondir)/hypervisor
28
httpdir = $(pkgpythondir)/http
29
masterddir = $(pkgpythondir)/masterd
30
confddir = $(pkgpythondir)/confd
31
rapidir = $(pkgpythondir)/rapi
32
serverdir = $(pkgpythondir)/server
33
watcherdir = $(pkgpythondir)/watcher
34
impexpddir = $(pkgpythondir)/impexpd
35
utilsdir = $(pkgpythondir)/utils
36
toolsdir = $(pkglibdir)/tools
37
iallocatorsdir = $(pkglibdir)/iallocators
38
docdir = $(datadir)/doc/$(PACKAGE)
39

    
40
# Delete output file if an error occurred while building it
41
.DELETE_ON_ERROR:
42

    
43
HTOOLS_DIRS = \
44
	htools \
45
	htools/Ganeti \
46
	htools/Ganeti/HTools
47

    
48
DIRS = \
49
	autotools \
50
	daemons \
51
	devel \
52
	doc \
53
	doc/examples \
54
	doc/examples/hooks \
55
	doc/examples/gnt-debug \
56
	$(HTOOLS_DIRS) \
57
	lib \
58
	lib/client \
59
	lib/build \
60
	lib/confd \
61
	lib/http \
62
	lib/hypervisor \
63
	lib/impexpd \
64
	lib/masterd \
65
	lib/rapi \
66
	lib/server \
67
	lib/utils \
68
	lib/watcher \
69
	man \
70
	qa \
71
	test \
72
	test/data \
73
	tools
74

    
75
BUILDTIME_DIR_AUTOCREATE = \
76
	scripts \
77
	doc/py-apidoc \
78
	$(HS_APIDOC) $(HS_APIDOC)/Ganeti $(HS_APIDOC)/Ganeti/HTools \
79
	doc/py-coverage \
80
	doc/hs-coverage \
81
	.hpc
82

    
83
BUILDTIME_DIRS = \
84
	$(BUILDTIME_DIR_AUTOCREATE) \
85
	doc/html
86

    
87
DIRCHECK_EXCLUDE = \
88
	$(BUILDTIME_DIRS) \
89
	ganeti-[0-9]*.[0-9]*.[0-9]* \
90
	doc/html/_*
91

    
92
all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
93

    
94
MAINTAINERCLEANFILES = \
95
	$(docpng) \
96
	$(maninput) \
97
	doc/install-quick.rst \
98
	doc/news.rst \
99
	doc/upgrade.rst \
100
	vcs-version
101

    
102
maintainer-clean-local:
103
	rm -rf $(BUILDTIME_DIRS)
104

    
105
CLEANFILES = \
106
	$(addsuffix /*.py[co],$(DIRS)) \
107
	$(addsuffix /*.hi,$(HTOOLS_DIRS)) \
108
	$(addsuffix /*.o,$(HTOOLS_DIRS)) \
109
	$(all_dirfiles) \
110
	$(PYTHON_BOOTSTRAP) \
111
	epydoc.conf \
112
	autotools/replace_vars.sed \
113
	daemons/daemon-util \
114
	daemons/ensure-dirs \
115
	daemons/ganeti-cleaner \
116
	devel/upload \
117
	doc/examples/bash_completion \
118
	doc/examples/ganeti.initd \
119
	doc/examples/ganeti-kvm-poweroff.initd \
120
	doc/examples/ganeti.cron \
121
	doc/examples/gnt-config-backup \
122
	doc/examples/hooks/ipsec \
123
	$(man_MANS) \
124
	$(manhtml) \
125
	tools/kvm-ifup \
126
	stamp-srclinks \
127
	$(nodist_pkgpython_PYTHON) \
128
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
129
	.hpc/*.mix htools/*.tix \
130
	doc/hs-lint.html
131

    
132
# BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
133
# it'll cause the target to rebuild every time.
134
BUILT_SOURCES = \
135
	ganeti \
136
	stamp-srclinks \
137
	lib/_autoconf.py \
138
	$(all_dirfiles) \
139
	$(PYTHON_BOOTSTRAP)
140

    
141
nodist_pkgpython_PYTHON = \
142
	lib/_autoconf.py
143

    
144
noinst_PYTHON = \
145
	lib/build/__init__.py \
146
	lib/build/sphinx_ext.py
147

    
148
pkgpython_PYTHON = \
149
	lib/__init__.py \
150
	lib/asyncnotifier.py \
151
	lib/backend.py \
152
	lib/bdev.py \
153
	lib/bootstrap.py \
154
	lib/cli.py \
155
	lib/cmdlib.py \
156
	lib/compat.py \
157
	lib/config.py \
158
	lib/constants.py \
159
	lib/daemon.py \
160
	lib/errors.py \
161
	lib/ht.py \
162
	lib/jqueue.py \
163
	lib/jstore.py \
164
	lib/locking.py \
165
	lib/luxi.py \
166
	lib/mcpu.py \
167
	lib/netutils.py \
168
	lib/objects.py \
169
	lib/opcodes.py \
170
	lib/qlang.py \
171
	lib/query.py \
172
	lib/rpc.py \
173
	lib/runtime.py \
174
	lib/serializer.py \
175
	lib/ssconf.py \
176
	lib/ssh.py \
177
	lib/storage.py \
178
	lib/uidpool.py \
179
	lib/workerpool.py
180

    
181
client_PYTHON = \
182
	lib/client/__init__.py \
183
	lib/client/gnt_backup.py \
184
	lib/client/gnt_cluster.py \
185
	lib/client/gnt_debug.py \
186
	lib/client/gnt_group.py \
187
	lib/client/gnt_instance.py \
188
	lib/client/gnt_job.py \
189
	lib/client/gnt_node.py \
190
	lib/client/gnt_os.py
191

    
192
hypervisor_PYTHON = \
193
	lib/hypervisor/__init__.py \
194
	lib/hypervisor/hv_base.py \
195
	lib/hypervisor/hv_chroot.py \
196
	lib/hypervisor/hv_fake.py \
197
	lib/hypervisor/hv_kvm.py \
198
	lib/hypervisor/hv_lxc.py \
199
	lib/hypervisor/hv_xen.py
200

    
201
rapi_PYTHON = \
202
	lib/rapi/__init__.py \
203
	lib/rapi/baserlib.py \
204
	lib/rapi/client.py \
205
	lib/rapi/client_utils.py \
206
	lib/rapi/connector.py \
207
	lib/rapi/rlib2.py
208

    
209
http_PYTHON = \
210
	lib/http/__init__.py \
211
	lib/http/auth.py \
212
	lib/http/client.py \
213
	lib/http/server.py
214

    
215
confd_PYTHON = \
216
	lib/confd/__init__.py \
217
	lib/confd/client.py \
218
	lib/confd/querylib.py \
219
	lib/confd/server.py
220

    
221
masterd_PYTHON = \
222
	lib/masterd/__init__.py \
223
	lib/masterd/instance.py
224

    
225
impexpd_PYTHON = \
226
	lib/impexpd/__init__.py
227

    
228
watcher_PYTHON = \
229
	lib/watcher/__init__.py
230

    
231
server_PYTHON = \
232
	lib/server/__init__.py \
233
	lib/server/confd.py \
234
	lib/server/masterd.py \
235
	lib/server/noded.py \
236
	lib/server/rapi.py
237

    
238
utils_PYTHON = \
239
	lib/utils/__init__.py \
240
	lib/utils/algo.py \
241
	lib/utils/filelock.py \
242
	lib/utils/hash.py \
243
	lib/utils/io.py \
244
	lib/utils/log.py \
245
	lib/utils/mlock.py \
246
	lib/utils/nodesetup.py \
247
	lib/utils/process.py \
248
	lib/utils/retry.py \
249
	lib/utils/text.py \
250
	lib/utils/wrapper.py \
251
	lib/utils/x509.py
252

    
253
docrst = \
254
	doc/admin.rst \
255
	doc/design-2.0.rst \
256
	doc/design-2.1.rst \
257
	doc/design-2.2.rst \
258
	doc/design-2.3.rst \
259
	doc/design-htools-2.3.rst \
260
	doc/design-2.4.rst \
261
	doc/design-draft.rst \
262
	doc/design-oob.rst \
263
	doc/design-query2.rst \
264
	doc/cluster-merge.rst \
265
	doc/design-shared-storage.rst \
266
	doc/devnotes.rst \
267
	doc/glossary.rst \
268
	doc/hooks.rst \
269
	doc/iallocator.rst \
270
	doc/index.rst \
271
	doc/install-quick.rst \
272
	doc/install.rst \
273
	doc/locking.rst \
274
	doc/move-instance.rst \
275
	doc/news.rst \
276
	doc/rapi.rst \
277
	doc/security.rst \
278
	doc/upgrade.rst \
279
	doc/walkthrough.rst
280

    
281
HS_PROGS = \
282
	htools/hbal \
283
	htools/hscan \
284
	htools/hail \
285
	htools/hspace
286

    
287
HS_ALL_PROGS = $(HS_PROGS) htools/test
288
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
289
# we don't add -Werror by default
290
HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
291
# extra flags that can be overriden on the command line
292
HEXTRA =
293
# exclude options for coverage reports
294
HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC
295
# directory for apidoc
296
HS_APIDOC = doc/hs-apidoc
297

    
298
HS_LIB_SRCS = \
299
	htools/Ganeti/HTools/CLI.hs \
300
	htools/Ganeti/HTools/Cluster.hs \
301
	htools/Ganeti/HTools/Container.hs \
302
	htools/Ganeti/HTools/ExtLoader.hs \
303
	htools/Ganeti/HTools/Group.hs \
304
	htools/Ganeti/HTools/IAlloc.hs \
305
	htools/Ganeti/HTools/Instance.hs \
306
	htools/Ganeti/HTools/Loader.hs \
307
	htools/Ganeti/HTools/Luxi.hs \
308
	htools/Ganeti/HTools/Node.hs \
309
	htools/Ganeti/HTools/PeerMap.hs \
310
	htools/Ganeti/HTools/QC.hs \
311
	htools/Ganeti/HTools/Rapi.hs \
312
	htools/Ganeti/HTools/Simu.hs \
313
	htools/Ganeti/HTools/Text.hs \
314
	htools/Ganeti/HTools/Types.hs \
315
	htools/Ganeti/HTools/Utils.hs \
316
	htools/Ganeti/Jobs.hs \
317
	htools/Ganeti/Luxi.hs \
318
	htools/Ganeti/OpCodes.hs
319

    
320
HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs
321
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
322

    
323
$(RUN_IN_TEMPDIR): | $(all_dirfiles)
324

    
325
# Note: we use here an order-only prerequisite, as the contents of
326
# _autoconf.py are not actually influencing the html build output: it
327
# has to exist in order for the sphinx module to be loaded
328
# successfully, but we certainly don't want the docs to be rebuilt if
329
# it changes
330
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
331
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
332
	| lib/_autoconf.py
333
	@test -n "$(SPHINX)" || \
334
	    { echo 'sphinx-build' not found during configure; exit 1; }
335
	@mkdir_p@ $(dir $@)
336
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
337
	    -d . \
338
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
339
	    -D release="$(PACKAGE_VERSION)" \
340
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
341
	rm -f doc/html/.buildinfo doc/html/objects.inv
342
	touch $@
343

    
344
doc/html: doc/html/index.html
345

    
346
doc/install-quick.rst: INSTALL
347
doc/news.rst: NEWS
348
doc/upgrade.rst: UPGRADE
349

    
350
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
351
	set -e; \
352
	{ echo '.. This file is automatically updated at build time from $<.'; \
353
	  echo '.. Do not edit.'; \
354
	  echo; \
355
	  cat $<; \
356
	} > $@
357

    
358
docdot = \
359
	doc/arch-2.0.dot \
360
	doc/design-2.1-lock-acquire.dot \
361
	doc/design-2.1-lock-release.dot
362

    
363
docpng = $(patsubst %.dot,%.png,$(docdot))
364

    
365
# Things to build but not to install (add it to EXTRA_DIST if it should be
366
# distributed)
367
noinst_DATA = \
368
	devel/upload \
369
	doc/html \
370
	doc/examples/bash_completion \
371
	doc/examples/ganeti.cron \
372
	doc/examples/ganeti.initd \
373
	doc/examples/ganeti-kvm-poweroff.initd \
374
	doc/examples/gnt-config-backup \
375
	doc/examples/hooks/ipsec \
376
	$(manhtml)
377

    
378
gnt_scripts = \
379
	scripts/gnt-backup \
380
	scripts/gnt-cluster \
381
	scripts/gnt-debug \
382
	scripts/gnt-group \
383
	scripts/gnt-instance \
384
	scripts/gnt-job \
385
	scripts/gnt-node \
386
	scripts/gnt-os
387

    
388
PYTHON_BOOTSTRAP = \
389
	daemons/ganeti-confd \
390
	daemons/ganeti-masterd \
391
	daemons/ganeti-noded \
392
	daemons/ganeti-watcher \
393
	daemons/ganeti-rapi \
394
	scripts/gnt-backup \
395
	scripts/gnt-cluster \
396
	scripts/gnt-debug \
397
	scripts/gnt-group \
398
	scripts/gnt-instance \
399
	scripts/gnt-job \
400
	scripts/gnt-node \
401
	scripts/gnt-os
402

    
403
qa_scripts = \
404
	qa/ganeti-qa.py \
405
	qa/qa_cluster.py \
406
	qa/qa_config.py \
407
	qa/qa_daemon.py \
408
	qa/qa_env.py \
409
	qa/qa_error.py \
410
	qa/qa_instance.py \
411
	qa/qa_node.py \
412
	qa/qa_os.py \
413
	qa/qa_rapi.py \
414
	qa/qa_tags.py \
415
	qa/qa_utils.py
416

    
417
bin_SCRIPTS =
418
iallocators_SCRIPTS =
419
if WANT_HTOOLS
420
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
421
iallocators_SCRIPTS += $(filter htools/hail,$(HS_PROGS))
422
endif
423

    
424
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
425
	BINARY=$(@:htools/%=%); \
426
	$(GHC) --make \
427
	  $(HFLAGS) $(HEXTRA) $(HTOOLS_NOCURL) \
428
	  -osuf $$BINARY.o -hisuf $$BINARY.hi \
429
	  $@
430

    
431
# for the htools/test binary, we need to enable profiling/coverage
432
htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \
433
	-fno-warn-monomorphism-restriction -fno-warn-orphans \
434
	-fno-warn-missing-methods -fno-warn-unused-imports
435

    
436
dist_sbin_SCRIPTS = \
437
	tools/ganeti-listrunner
438

    
439
nodist_sbin_SCRIPTS = \
440
	$(PYTHON_BOOTSTRAP) \
441
	daemons/ganeti-cleaner
442

    
443
dist_tools_SCRIPTS = \
444
	tools/burnin \
445
	tools/cfgshell \
446
	tools/cfgupgrade \
447
	tools/cfgupgrade12 \
448
	tools/cluster-merge \
449
	tools/lvmstrap \
450
	tools/move-instance \
451
	tools/setup-ssh \
452
	tools/sanitize-config
453

    
454
pkglib_python_scripts = \
455
	daemons/import-export \
456
	tools/check-cert-expired
457

    
458
pkglib_SCRIPTS = \
459
	daemons/daemon-util \
460
	daemons/ensure-dirs \
461
	tools/kvm-ifup \
462
	$(pkglib_python_scripts)
463

    
464
EXTRA_DIST = \
465
	NEWS \
466
	UPGRADE \
467
	epydoc.conf.in \
468
	pylintrc \
469
	autotools/build-bash-completion \
470
	autotools/check-python-code \
471
	autotools/check-man \
472
	autotools/check-news \
473
	autotools/check-tar \
474
	autotools/check-version \
475
	autotools/docpp \
476
	autotools/gen-coverage \
477
	autotools/testrunner \
478
	$(RUN_IN_TEMPDIR) \
479
	daemons/daemon-util.in \
480
	daemons/ensure-dirs.in \
481
	daemons/ganeti-cleaner.in \
482
	$(pkglib_python_scripts) \
483
	devel/upload.in \
484
	tools/kvm-ifup.in \
485
	$(docdot) \
486
	$(docpng) \
487
	$(docrst) \
488
	doc/conf.py \
489
	doc/html \
490
	doc/examples/ganeti.initd.in \
491
	doc/examples/ganeti-kvm-poweroff.initd.in \
492
	doc/examples/ganeti.cron.in \
493
	doc/examples/gnt-config-backup.in \
494
	doc/examples/ganeti.default \
495
	doc/examples/ganeti.default-debug \
496
	doc/examples/hooks/ethers \
497
	doc/examples/hooks/ipsec.in \
498
	doc/examples/gnt-debug/README \
499
	doc/examples/gnt-debug/delay0.json \
500
	doc/examples/gnt-debug/delay50.json \
501
	test/testutils.py \
502
	test/mocks.py \
503
	$(dist_TESTS) \
504
	$(TEST_FILES) \
505
	man/footer.rst \
506
	$(manrst) \
507
	$(maninput) \
508
	qa/qa-sample.json \
509
	$(qa_scripts) \
510
	$(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
511
	$(HS_PROG_SRCS)
512

    
513
man_MANS = \
514
	man/ganeti.7 \
515
	man/ganeti-cleaner.8 \
516
	man/ganeti-confd.8 \
517
	man/ganeti-listrunner.8 \
518
	man/ganeti-masterd.8 \
519
	man/ganeti-noded.8 \
520
	man/ganeti-os-interface.7 \
521
	man/ganeti-rapi.8 \
522
	man/ganeti-watcher.8 \
523
	man/gnt-backup.8 \
524
	man/gnt-cluster.8 \
525
	man/gnt-debug.8 \
526
	man/gnt-group.8 \
527
	man/gnt-instance.8 \
528
	man/gnt-job.8 \
529
	man/gnt-node.8 \
530
	man/gnt-os.8 \
531
	man/hail.1 \
532
	man/hbal.1 \
533
	man/hscan.1 \
534
	man/hspace.1
535

    
536
manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
537
manhtml = $(patsubst %.rst,%.html,$(manrst))
538
mangen = $(patsubst %.rst,%.gen,$(manrst))
539
maninput = \
540
	$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
541
	$(patsubst %.html,%.html.in,$(manhtml)) \
542
	man/footer.man man/footer.html $(mangen)
543

    
544
TEST_FILES = \
545
	test/data/bdev-drbd-8.0.txt \
546
	test/data/bdev-drbd-8.3.txt \
547
	test/data/bdev-drbd-disk.txt \
548
	test/data/bdev-drbd-net-ip4.txt \
549
	test/data/bdev-drbd-net-ip6.txt \
550
	test/data/cert1.pem \
551
	test/data/proc_drbd8.txt \
552
	test/data/proc_drbd80-emptyline.txt \
553
	test/data/proc_drbd83.txt \
554
	test/data/sys_drbd_usermode_helper.txt \
555
	test/import-export_unittest-helper
556

    
557
python_tests = \
558
	test/ganeti.asyncnotifier_unittest.py \
559
	test/ganeti.backend_unittest.py \
560
	test/ganeti.bdev_unittest.py \
561
	test/ganeti.cli_unittest.py \
562
	test/ganeti.client.gnt_cluster_unittest.py \
563
	test/ganeti.client.gnt_instance_unittest.py \
564
	test/ganeti.daemon_unittest.py \
565
	test/ganeti.cmdlib_unittest.py \
566
	test/ganeti.compat_unittest.py \
567
	test/ganeti.confd.client_unittest.py \
568
	test/ganeti.config_unittest.py \
569
	test/ganeti.constants_unittest.py \
570
	test/ganeti.errors_unittest.py \
571
	test/ganeti.hooks_unittest.py \
572
	test/ganeti.ht_unittest.py \
573
	test/ganeti.http_unittest.py \
574
	test/ganeti.hypervisor_unittest.py \
575
	test/ganeti.hypervisor.hv_chroot_unittest.py \
576
	test/ganeti.hypervisor.hv_fake_unittest.py \
577
	test/ganeti.hypervisor.hv_kvm_unittest.py \
578
	test/ganeti.hypervisor.hv_lxc_unittest.py \
579
	test/ganeti.hypervisor.hv_xen_unittest.py \
580
	test/ganeti.impexpd_unittest.py \
581
	test/ganeti.jqueue_unittest.py \
582
	test/ganeti.locking_unittest.py \
583
	test/ganeti.luxi_unittest.py \
584
	test/ganeti.masterd.instance_unittest.py \
585
	test/ganeti.mcpu_unittest.py \
586
	test/ganeti.netutils_unittest.py \
587
	test/ganeti.objects_unittest.py \
588
	test/ganeti.opcodes_unittest.py \
589
	test/ganeti.qlang_unittest.py \
590
	test/ganeti.query_unittest.py \
591
	test/ganeti.rapi.baserlib_unittest.py \
592
	test/ganeti.rapi.client_unittest.py \
593
	test/ganeti.rapi.resources_unittest.py \
594
	test/ganeti.rapi.rlib2_unittest.py \
595
	test/ganeti.rpc_unittest.py \
596
	test/ganeti.runtime_unittest.py \
597
	test/ganeti.serializer_unittest.py \
598
	test/ganeti.ssh_unittest.py \
599
	test/ganeti.uidpool_unittest.py \
600
	test/ganeti.utils.algo_unittest.py \
601
	test/ganeti.utils.filelock_unittest.py \
602
	test/ganeti.utils.hash_unittest.py \
603
	test/ganeti.utils.io_unittest.py \
604
	test/ganeti.utils.log_unittest.py \
605
	test/ganeti.utils.mlock_unittest.py \
606
	test/ganeti.utils.nodesetup_unittest.py \
607
	test/ganeti.utils.process_unittest.py \
608
	test/ganeti.utils.retry_unittest.py \
609
	test/ganeti.utils.text_unittest.py \
610
	test/ganeti.utils.wrapper_unittest.py \
611
	test/ganeti.utils.x509_unittest.py \
612
	test/ganeti.utils_unittest.py \
613
	test/ganeti.workerpool_unittest.py \
614
	test/cfgupgrade_unittest.py \
615
	test/docs_unittest.py \
616
	test/tempfile_fork_unittest.py
617

    
618
haskell_tests = htools/test
619

    
620
dist_TESTS = \
621
	test/check-cert-expired_unittest.bash \
622
	test/daemon-util_unittest.bash \
623
	test/ganeti-cleaner_unittest.bash \
624
	test/import-export_unittest.bash \
625
	$(python_tests)
626

    
627
nodist_TESTS =
628
if WANT_HTOOLS
629
nodist_TESTS += $(haskell_tests)
630
endif
631

    
632
TESTS = $(dist_TESTS) $(nodist_TESTS)
633

    
634
# Environment for all tests
635
PLAIN_TESTS_ENVIRONMENT = \
636
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
637

    
638
# Environment for tests run by automake
639
TESTS_ENVIRONMENT = \
640
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
641

    
642
all_python_code = \
643
	$(dist_sbin_SCRIPTS) \
644
	$(dist_tools_SCRIPTS) \
645
	$(pkglib_python_scripts) \
646
	$(python_tests) \
647
	$(pkgpython_PYTHON) \
648
	$(client_PYTHON) \
649
	$(hypervisor_PYTHON) \
650
	$(rapi_PYTHON) \
651
	$(server_PYTHON) \
652
	$(http_PYTHON) \
653
	$(confd_PYTHON) \
654
	$(masterd_PYTHON) \
655
	$(impexpd_PYTHON) \
656
	$(utils_PYTHON) \
657
	$(watcher_PYTHON) \
658
	$(noinst_PYTHON) \
659
	$(qa_scripts)
660

    
661
srclink_files = \
662
	man/footer.rst \
663
	test/check-cert-expired_unittest.bash \
664
	test/daemon-util_unittest.bash \
665
	test/ganeti-cleaner_unittest.bash \
666
	test/import-export_unittest.bash \
667
	$(all_python_code) \
668
	$(HS_LIB_SRCS) $(HS_PROG_SRCS)
669

    
670
check_python_code = \
671
	$(BUILD_BASH_COMPLETION) \
672
	$(DOCPP) \
673
	$(all_python_code)
674

    
675
lint_python_code = \
676
	ganeti \
677
	ganeti/http/server.py \
678
	$(dist_sbin_SCRIPTS) \
679
	$(dist_tools_SCRIPTS) \
680
	$(pkglib_python_scripts) \
681
	$(BUILD_BASH_COMPLETION) \
682
	$(DOCPP) \
683
	$(PYTHON_BOOTSTRAP)
684

    
685
test/daemon-util_unittest.bash: daemons/daemon-util
686

    
687
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
688

    
689
tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
690
	sed -f $(REPLACE_VARS_SED) < $< > $@
691
	chmod +x $@
692

    
693
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
694
	sed -f $(REPLACE_VARS_SED) < $< > $@
695
	chmod u+x $@
696

    
697
daemons/%: daemons/%.in $(REPLACE_VARS_SED)
698
	sed -f $(REPLACE_VARS_SED) < $< > $@
699
	chmod +x $@
700

    
701
doc/examples/%: doc/examples/%.in $(REPLACE_VARS_SED)
702
	sed -f $(REPLACE_VARS_SED) < $< > $@
703

    
704
doc/examples/hooks/%: doc/examples/hooks/%.in $(REPLACE_VARS_SED)
705
	sed -f $(REPLACE_VARS_SED) < $< > $@
706

    
707
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
708
	lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin
709
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
710

    
711
doc/%.png: doc/%.dot
712
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
713
	$(DOT) -Tpng -o $@ $<
714

    
715
man/footer.man: man/footer.rst
716
	@test -n "$(PANDOC)" || \
717
	  { echo 'pandoc' not found during configure; exit 1; }
718
	$(PANDOC) -f rst -t man -o $@ $<
719

    
720
man/footer.html: man/footer.rst
721
	@test -n "$(PANDOC)" || \
722
	  { echo 'pandoc' not found during configure; exit 1; }
723
	$(PANDOC) -f rst -t html -o $@ $<
724

    
725
man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py
726
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(DOCPP) < $< > $@
727

    
728
man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.man
729
	@test -n "$(PANDOC)" || \
730
	  { echo 'pandoc' not found during configure; exit 1; }
731
	set -o pipefail ; \
732
	$(PANDOC) -s -f rst -t man -A man/footer.man $< | \
733
	  sed -e 's/\\@/@/g' > $@
734
	if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
735

    
736
man/%.html.in: man/%.gen man/footer.html
737
	@test -n "$(PANDOC)" || \
738
	  { echo 'pandoc' not found during configure; exit 1; }
739
	set -o pipefail ; \
740
	$(PANDOC) -s -f rst -t html -A man/footer.html $< | \
741
	  sed -e 's/\\@/@/g' > $@
742

    
743
man/%.1: man/%.1.in $(REPLACE_VARS_SED)
744
	sed -f $(REPLACE_VARS_SED) < $< > $@
745

    
746
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
747
	sed -f $(REPLACE_VARS_SED) < $< > $@
748

    
749
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
750
	sed -f $(REPLACE_VARS_SED) < $< > $@
751

    
752
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
753
	sed -f $(REPLACE_VARS_SED) < $< > $@
754

    
755
epydoc.conf: epydoc.conf.in Makefile
756
	sed -e 's#@MODULES@#$(strip $(lint_python_code))#g' < $< > $@
757

    
758
vcs-version:
759
	if test -d .git; then \
760
	  git describe > $@; \
761
	elif test ! -f $@ ; then \
762
	  echo "Cannot auto-generate $@ file"; exit 1; \
763
	fi
764

    
765
.PHONY: regen-vcs-version
766
regen-vcs-version:
767
	set -e; \
768
	cd $(srcdir); \
769
	if test -d .git; then \
770
	  rm -f vcs-version; \
771
	  $(MAKE) vcs-version; \
772
	fi
773

    
774
htools/Ganeti/HTools/Version.hs: htools/Ganeti/HTools/Version.hs.in vcs-version
775
	set -e; \
776
	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
777
	sed -e "s/%ver%/$$VCSVER/" < $< > $@
778

    
779
lib/_autoconf.py: Makefile vcs-version | lib/.dir
780
	set -e; \
781
	VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
782
	{ echo '# This file is automatically generated, do not edit!'; \
783
	  echo '#'; \
784
	  echo ''; \
785
	  echo '"""Build-time configuration for Ganeti.'; \
786
	  echo '';\
787
	  echo 'This file is autogenerated by the build process.'; \
788
	  echo 'For any changes you need to re-run ./configure (and'; \
789
	  echo 'not edit by hand).'; \
790
	  echo ''; \
791
	  echo '"""'; \
792
	  echo ''; \
793
	  echo '# pylint: disable-msg=C0301,C0324'; \
794
	  echo '# because this is autogenerated, we do not want'; \
795
	  echo '# style warnings' ; \
796
	  echo ''; \
797
	  echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
798
	  echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
799
	  echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
800
	  echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
801
	  echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
802
	  echo "VERSION_FULL = '$(VERSION_FULL)'"; \
803
	  echo "LOCALSTATEDIR = '$(localstatedir)'"; \
804
	  echo "SYSCONFDIR = '$(sysconfdir)'"; \
805
	  echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
806
	  echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
807
	  echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
808
	  echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
809
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
810
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
811
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
812
	  echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
813
	  echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
814
	  echo "ENABLE_SHARED_FILE_STORAGE = $(ENABLE_SHARED_FILE_STORAGE)"; \
815
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
816
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
817
	  echo "SOCAT_PATH = '$(SOCAT)'"; \
818
	  echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
819
	  echo "SOCAT_USE_COMPRESS = $(SOCAT_USE_COMPRESS)"; \
820
	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
821
	  echo "TOOLSDIR = '$(toolsdir)'"; \
822
	  echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
823
	  echo "PKGLIBDIR = '$(pkglibdir)'"; \
824
	  echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \
825
	  echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
826
	  echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
827
	  echo "ADMIN_GROUP = '$(ADMIN_GROUP)'"; \
828
	  echo "MASTERD_USER = '$(MASTERD_USER)'"; \
829
	  echo "MASTERD_GROUP = '$(MASTERD_GROUP)'"; \
830
	  echo "RAPI_USER = '$(RAPI_USER)'"; \
831
	  echo "RAPI_GROUP = '$(RAPI_GROUP)'"; \
832
	  echo "CONFD_USER = '$(CONFD_USER)'"; \
833
	  echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
834
	  echo "NODED_USER = '$(NODED_USER)'"; \
835
	  echo "VCS_VERSION = '$$VCSVER'"; \
836
	  echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
837
	} > $@
838

    
839
$(REPLACE_VARS_SED): Makefile
840
	set -e; \
841
	{ echo 's#@PREFIX@#$(prefix)#g'; \
842
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
843
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
844
	  echo 's#@BINDIR@#$(bindir)#g'; \
845
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
846
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
847
	  echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
848
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
849
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
850
	  echo 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \
851
	  echo 's#@CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \
852
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
853
	  echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
854
	  echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
855
	  echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \
856
	  echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \
857
	  echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \
858
	  echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \
859
	  echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
860
	  echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
861
	  echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
862
	  echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
863
	  echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
864
	} > $@
865

    
866
# Using deferred evaluation
867
daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
868
daemons/ganeti-watcher: MODULE = ganeti.watcher
869
scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
870

    
871
$(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
872
	test -n "$(MODULE)" || { echo Missing module; exit 1; }
873
	set -e; \
874
	{ echo '#!/usr/bin/python'; \
875
	  echo '# This file is automatically generated, do not edit!'; \
876
	  echo "# Edit $(MODULE) instead."; \
877
	  echo; \
878
	  echo '"""Bootstrap script for L{$(MODULE)}"""'; \
879
	  echo; \
880
	  echo '# pylint: disable-msg=C0103'; \
881
	  echo '# C0103: Invalid name'; \
882
	  echo; \
883
	  echo 'import sys'; \
884
	  echo 'import $(MODULE) as main'; \
885
	  echo; \
886
	  echo '# Temporarily alias commands until bash completion'; \
887
	  echo '# generator is changed'; \
888
	  echo 'if hasattr(main, "commands"):'; \
889
		echo '  commands = main.commands # pylint: disable-msg=E1101'; \
890
	  echo; \
891
	  echo 'if __name__ == "__main__":'; \
892
	  echo '  sys.exit(main.Main())'; \
893
	} > $@
894
	chmod u+x $@
895

    
896
# We need to create symlinks because "make distcheck" will not install Python
897
# files when building.
898
stamp-srclinks: Makefile | $(all_dirfiles)
899
	set -e; \
900
	for i in $(srclink_files); do \
901
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
902
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
903
		fi; \
904
	done
905
	touch $@
906

    
907
.PHONY: ganeti
908
ganeti:
909
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
910

    
911
.PHONY: check-dirs
912
check-dirs: $(BUILT_SOURCES)
913
	@set -e; \
914
	find . -type d \( \( -name . \) -o \( \
915
		-name .git -o \
916
		-name autom4te.cache \
917
		\) -prune -o -print \) | { \
918
		error=; \
919
		while read dir; do \
920
			case "$$dir" in \
921
				$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
922
				*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
923
			esac; \
924
		done; \
925
		for dir in $(DIRS); do \
926
			if ! test -d "$$dir"; then \
927
				echo "Directory $$dir listed in DIRS does not exist" >&2; \
928
				error=1; \
929
			fi \
930
		done; \
931
		if test -n "$$error"; then exit 1; else exit 0; fi; \
932
	}
933

    
934
check-local: check-dirs
935
	$(CHECK_PYTHON_CODE) $(check_python_code)
936
	$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
937
	$(CHECK_NEWS) < $(top_srcdir)/NEWS
938

    
939
.PHONY: lint
940
lint: $(BUILT_SOURCES)
941
	@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
942
	$(PYLINT) $(LINT_OPTS) $(lint_python_code)
943
	cd $(top_srcdir)/qa && \
944
	  PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
945
	  --rcfile  ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
946

    
947
.PHONY: hlint
948
hlint: $(HS_BUILT_SRCS)
949
	if tty -s; then C="-c"; else C=""; fi; \
950
	hlint --report=doc/hs-lint.html $$C htools
951

    
952
# a dist hook rule for updating the vcs-version file; this is
953
# hardcoded due to where it needs to build the file...
954
dist-hook:
955
	$(MAKE) regen-vcs-version && \
956
	rm -f $(top_distdir)/vcs-version && \
957
	cp -p $(srcdir)/vcs-version $(top_distdir)
958

    
959
# a distcheck hook rule for catching revision control directories
960
distcheck-hook:
961
	if find $(top_distdir) -name .svn -or -name .git | grep .; then \
962
		echo "Found revision control files in final archive." 1>&2; \
963
		exit 1; \
964
	fi
965
	if find $(top_distdir) -name '*.py[co]' | grep .; then \
966
		echo "Found Python byte code in final archive." 1>&2; \
967
		exit 1; \
968
	fi
969
	if find $(top_distdir) -name '*~' | grep .; then \
970
		echo "Found backup files in final archive." 1>&2; \
971
		exit 1; \
972
	fi
973
# Empty files or directories should not be distributed. They can cause
974
# unnecessary warnings for packagers. Directories used by automake during
975
# distcheck must be excluded.
976
	if find $(top_distdir) -empty -and -not \( \
977
			-path $(top_distdir)/_build -or \
978
			-path $(top_distdir)/_inst \) | grep .; then \
979
		echo "Found empty files or directories in final archive." 1>&2; \
980
		exit 1; \
981
	fi
982
	if test -n "$(BUILD_RELEASE)" && \
983
	   grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
984
		echo "Found unreleased version in NEWS." >&2; \
985
		exit 1; \
986
	fi
987

    
988
# When building a release, stricter checks should be used
989
distcheck-release dist-release: export BUILD_RELEASE = 1
990
distcheck-release: distcheck
991

    
992
dist-release: dist
993
	set -e; \
994
	for i in $(DIST_ARCHIVES); do \
995
		echo -n "Checking $$i ... "; \
996
		autotools/check-tar < $$i; \
997
		echo OK; \
998
	done
999

    
1000
install-exec-local:
1001
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
1002
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
1003
	  "$(DESTDIR)${localstatedir}/run/ganeti"
1004

    
1005
# To avoid conflicts between directory names and other targets, a file inside
1006
# the directory is used to ensure its existence.
1007
%.dir:
1008
	@mkdir_p@ $* && touch $@
1009

    
1010
.PHONY: apidoc
1011
if WANT_HTOOLSAPIDOC
1012
apidoc: py-apidoc hs-apidoc
1013
else
1014
apidoc: py-apidoc
1015
endif
1016

    
1017
.PHONY: py-apidoc
1018
py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
1019
	$(RUN_IN_TEMPDIR) epydoc -v \
1020
		--conf $(CURDIR)/epydoc.conf \
1021
		--output $(CURDIR)/doc/py-apidoc
1022

    
1023
.PHONY: hs-apidoc
1024
hs-apidoc: $(HS_BUILT_SRCS)
1025
	@test -n "$(HSCOLOUR)" || \
1026
	    { echo 'HsColour' not found during configure; exit 1; }
1027
	@test -n "$(HADDOCK)" || \
1028
	    { echo 'haddock' not found during configure; exit 1; }
1029
	rm -rf $(HS_APIDOC)/*
1030
	@mkdir_p@ $(HS_APIDOC)/Ganeti/HTools
1031
	$(HSCOLOUR) -print-css > $(HS_APIDOC)/Ganeti/hscolour.css
1032
	ln -s ../hscolour.css $(HS_APIDOC)/Ganeti/HTools/hscolour.css
1033
	set -e ; \
1034
	cd htools; \
1035
	RELSRCS="$(HS_LIB_SRCS:htools/%=%)"; \
1036
	for file in $$RELSRCS; do \
1037
		hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
1038
		$(HSCOLOUR) -css -anchor $$file > ../$(HS_APIDOC)/$$hfile ; \
1039
	done ; \
1040
	$(HADDOCK) --odir ../$(HS_APIDOC) --html --ignore-all-exports -w \
1041
		-t ganeti-htools -p haddock-prologue \
1042
		--source-module="%{MODULE/.//}.html" \
1043
		--source-entity="%{MODULE/.//}.html#%{NAME}" \
1044
		$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
1045

    
1046
.PHONY: TAGS
1047
TAGS: $(BUILT_SOURCES)
1048
	rm -f TAGS
1049
	find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
1050
	  -path './daemons/ganeti-*' -o -path './tools/*' -o \
1051
	  -path './qa/*.py' | \
1052
	  etags -l python -
1053

    
1054
.PHONY: coverage
1055
if WANT_HTOOLS
1056
coverage: py-coverage hs-coverage
1057
else
1058
coverage: py-coverage
1059
endif
1060

    
1061
.PHONY: py-coverage
1062
py-coverage: $(BUILT_SOURCES) $(python_tests)
1063
	set -e; \
1064
	COVERAGE_FILE=$(CURDIR)/doc/py-coverage/data \
1065
	TEXT_COVERAGE=$(CURDIR)/doc/py-coverage/report.txt \
1066
	HTML_COVERAGE=$(CURDIR)/doc/py-coverage \
1067
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
1068
	$(python_tests)
1069

    
1070
.PHONY: hs-coverage
1071
hs-coverage: $(haskell_tests)
1072
	cd htools && rm -f *.tix *.mix && ./test
1073
	mkdir -p doc/hs-coverage
1074
	hpc markup --destdir=doc/hs-coverage htools/test $(HPCEXCL)
1075
	hpc report htools/test $(HPCEXCL)
1076

    
1077
# Special "kind-of-QA" target for htools, needs special setup (all
1078
# tools compiled with -fhpc)
1079
.PHONY: live-test
1080
live-test: all
1081
	set -e ; \
1082
	cd htools; \
1083
	rm -f .hpc; ln -s ../.hpc .hpc; \
1084
	rm -f *.tix *.mix; \
1085
	./live-test.sh; \
1086
	hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:htools/%=%)) \
1087
	  --output=live-test.tix ; \
1088
	@mkdir_p@ ../doc/hs-coverage ; \
1089
	hpc markup --destdir=../doc/hs-coverage live-test \
1090
		--srcdir=.. $(HPCEXCL) ; \
1091
	hpc report --srcdir=.. live-test $(HPCEXCL)
1092

    
1093
commit-check: distcheck lint apidoc
1094

    
1095
-include ./Makefile.local
1096

    
1097
# vim: set noet :