Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ d88eba85

History | View | Annotate | Download (15.1 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
ACLOCAL_AMFLAGS = -I autotools
13
DOCBOOK_WRAPPER = $(top_srcdir)/autotools/docbook-wrapper
14
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
15
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
16
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
17
CHECK_MAN = $(top_srcdir)/autotools/check-man
18
REPLACE_VARS_SED = autotools/replace_vars.sed
19

    
20
hypervisordir = $(pkgpythondir)/hypervisor
21
httpdir = $(pkgpythondir)/http
22
masterddir = $(pkgpythondir)/masterd
23
confddir = $(pkgpythondir)/confd
24
rapidir = $(pkgpythondir)/rapi
25
toolsdir = $(pkglibdir)/tools
26
docdir = $(datadir)/doc/$(PACKAGE)
27

    
28
# Delete output file if an error occurred while building it
29
.DELETE_ON_ERROR:
30

    
31
DIRS = \
32
	autotools \
33
	daemons \
34
	devel \
35
	doc \
36
	doc/examples \
37
	doc/examples/hooks \
38
	lib \
39
	lib/build \
40
	lib/confd \
41
	lib/http \
42
	lib/hypervisor \
43
	lib/masterd \
44
	lib/rapi \
45
	man \
46
	qa \
47
	scripts \
48
	test \
49
	test/data \
50
	tools
51

    
52
MAINTAINERCLEANFILES = \
53
	$(docpng) \
54
	$(maninput) \
55
	doc/install-quick.rst \
56
	doc/news.rst
57

    
58
maintainer-clean-local:
59
	rm -rf doc/api doc/html doc/coverage
60

    
61
CLEANFILES = \
62
	$(addsuffix /*.py[co],$(DIRS)) \
63
	autotools/replace_vars.sed \
64
	daemons/daemon-util \
65
	daemons/ganeti-cleaner \
66
	devel/upload \
67
	doc/examples/bash_completion \
68
	doc/examples/ganeti.initd \
69
	doc/examples/ganeti.cron \
70
	doc/examples/gnt-config-backup \
71
	doc/examples/hooks/ipsec \
72
	$(man_MANS) \
73
	$(manhtml) \
74
	stamp-directories \
75
	stamp-srclinks \
76
	$(nodist_pkgpython_PYTHON)
77

    
78
BUILT_SOURCES = \
79
	ganeti \
80
	stamp-srclinks \
81
	stamp-directories \
82
	lib/_autoconf.py
83

    
84
nodist_pkgpython_PYTHON = \
85
	lib/_autoconf.py
86

    
87
noinst_PYTHON = \
88
	lib/build/__init__.py
89

    
90
pkgpython_PYTHON = \
91
	lib/__init__.py \
92
	lib/asyncnotifier.py \
93
	lib/backend.py \
94
	lib/bdev.py \
95
	lib/bootstrap.py \
96
	lib/cli.py \
97
	lib/cmdlib.py \
98
	lib/compat.py \
99
	lib/config.py \
100
	lib/constants.py \
101
	lib/daemon.py \
102
	lib/errors.py \
103
	lib/jqueue.py \
104
	lib/jstore.py \
105
	lib/locking.py \
106
	lib/luxi.py \
107
	lib/mcpu.py \
108
	lib/objects.py \
109
	lib/opcodes.py \
110
	lib/rpc.py \
111
	lib/serializer.py \
112
	lib/ssconf.py \
113
	lib/ssh.py \
114
	lib/storage.py \
115
	lib/utils.py \
116
	lib/uidpool.py \
117
	lib/workerpool.py
118

    
119
hypervisor_PYTHON = \
120
	lib/hypervisor/__init__.py \
121
	lib/hypervisor/hv_base.py \
122
	lib/hypervisor/hv_chroot.py \
123
	lib/hypervisor/hv_fake.py \
124
	lib/hypervisor/hv_kvm.py \
125
	lib/hypervisor/hv_xen.py
126

    
127
rapi_PYTHON = \
128
	lib/rapi/__init__.py \
129
	lib/rapi/baserlib.py \
130
	lib/rapi/client.py \
131
	lib/rapi/client_utils.py \
132
	lib/rapi/connector.py \
133
	lib/rapi/rlib2.py
134

    
135
http_PYTHON = \
136
	lib/http/__init__.py \
137
	lib/http/auth.py \
138
	lib/http/client.py \
139
	lib/http/server.py
140

    
141
confd_PYTHON = \
142
	lib/confd/__init__.py \
143
	lib/confd/client.py \
144
	lib/confd/querylib.py \
145
	lib/confd/server.py
146

    
147
masterd_PYTHON = \
148
	lib/masterd/__init__.py \
149
	lib/masterd/instance.py
150

    
151
docrst = \
152
	doc/admin.rst \
153
	doc/design-2.0.rst \
154
	doc/design-2.1.rst \
155
	doc/design-2.2.rst \
156
	doc/design-cluster-merger.rst \
157
	doc/devnotes.rst \
158
	doc/glossary.rst \
159
	doc/hooks.rst \
160
	doc/iallocator.rst \
161
	doc/index.rst \
162
	doc/install-quick.rst \
163
	doc/install.rst \
164
	doc/locking.rst \
165
	doc/news.rst \
166
	doc/rapi.rst \
167
	doc/security.rst \
168
	doc/walkthrough.rst
169

    
170
doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
171
	@test -n "$(SPHINX)" || \
172
	    { echo 'sphinx-build' not found during configure; exit 1; }
173
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
174
	    -d . \
175
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
176
	    -D release="$(PACKAGE_VERSION)" \
177
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
178
	rm -f doc/html/.buildinfo doc/html/objects.inv
179
	touch $@
180

    
181
doc/html: doc/html/.stamp
182

    
183
doc/news.rst: NEWS
184
	set -e; \
185
	{ echo '.. This file is automatically updated at build time from $<.'; \
186
	  echo '.. Do not edit.'; \
187
	  echo; \
188
	  cat $<; \
189
	} > $@
190

    
191
doc/install-quick.rst: INSTALL
192
	set -e; \
193
	{ echo '.. This file is automatically updated at build time from $<.'; \
194
	  echo '.. Do not edit.'; \
195
	  echo; \
196
	  cat $<; \
197
	} > $@
198

    
199
docdot = \
200
	doc/arch-2.0.dot \
201
	doc/design-2.1-lock-acquire.dot \
202
	doc/design-2.1-lock-release.dot
203

    
204
docpng = $(patsubst %.dot,%.png,$(docdot))
205

    
206
# Things to build but not to install (add it to EXTRA_DIST if it should be
207
# distributed)
208
noinst_DATA = \
209
	devel/upload \
210
	doc/html \
211
	doc/examples/bash_completion \
212
	doc/examples/ganeti.cron \
213
	doc/examples/ganeti.initd \
214
	doc/examples/gnt-config-backup \
215
	doc/examples/hooks/ipsec \
216
	$(manhtml)
217

    
218
gnt_scripts = \
219
	scripts/gnt-backup \
220
	scripts/gnt-cluster \
221
	scripts/gnt-debug \
222
	scripts/gnt-instance \
223
	scripts/gnt-job \
224
	scripts/gnt-node \
225
	scripts/gnt-os
226

    
227
dist_sbin_SCRIPTS = \
228
	daemons/ganeti-noded \
229
	daemons/ganeti-watcher \
230
	daemons/ganeti-masterd \
231
	daemons/ganeti-confd \
232
	daemons/ganeti-rapi \
233
	$(gnt_scripts)
234

    
235
nodist_sbin_SCRIPTS = \
236
	daemons/ganeti-cleaner
237

    
238
dist_tools_SCRIPTS = \
239
	tools/burnin \
240
	tools/cfgshell \
241
	tools/cfgupgrade \
242
	tools/cfgupgrade12 \
243
	tools/cluster-merge \
244
	tools/lvmstrap \
245
	tools/sanitize-config
246

    
247
pkglib_python_scripts = \
248
	daemons/import-export \
249
	tools/check-cert-expired
250

    
251
pkglib_SCRIPTS = \
252
	daemons/daemon-util \
253
	$(pkglib_python_scripts)
254

    
255
EXTRA_DIST = \
256
	NEWS \
257
	pylintrc \
258
	autotools/build-bash-completion \
259
	autotools/check-python-code \
260
	autotools/check-man \
261
	autotools/docbook-wrapper \
262
	autotools/gen-coverage \
263
	autotools/testrunner \
264
	$(RUN_IN_TEMPDIR) \
265
	daemons/daemon-util.in \
266
	daemons/ganeti-cleaner.in \
267
	$(pkglib_python_scripts) \
268
	devel/upload.in \
269
	$(docdot) \
270
	$(docpng) \
271
	$(docrst) \
272
	doc/conf.py \
273
	doc/html \
274
	doc/examples/ganeti.initd.in \
275
	doc/examples/ganeti.cron.in \
276
	doc/examples/gnt-config-backup.in \
277
	doc/examples/dumb-allocator \
278
	doc/examples/ganeti.default \
279
	doc/examples/ganeti.default-debug \
280
	doc/examples/hooks/ethers \
281
	doc/examples/hooks/ipsec.in \
282
	test/testutils.py \
283
	test/mocks.py \
284
	$(dist_TESTS) \
285
	$(TEST_FILES) \
286
	man/footer.sgml \
287
	$(mansgml) \
288
	$(maninput) \
289
	qa/ganeti-qa.py \
290
	qa/qa-sample.json \
291
	qa/qa_cluster.py \
292
	qa/qa_config.py \
293
	qa/qa_daemon.py \
294
	qa/qa_env.py \
295
	qa/qa_error.py \
296
	qa/qa_instance.py \
297
	qa/qa_node.py \
298
	qa/qa_os.py \
299
	qa/qa_rapi.py \
300
	qa/qa_tags.py \
301
	qa/qa_utils.py
302

    
303
man_MANS = \
304
	man/ganeti.7 \
305
	man/ganeti-cleaner.8 \
306
	man/ganeti-confd.8 \
307
	man/ganeti-masterd.8 \
308
	man/ganeti-noded.8 \
309
	man/ganeti-os-interface.7 \
310
	man/ganeti-rapi.8 \
311
	man/ganeti-watcher.8 \
312
	man/gnt-backup.8 \
313
	man/gnt-cluster.8 \
314
	man/gnt-debug.8 \
315
	man/gnt-instance.8 \
316
	man/gnt-job.8 \
317
	man/gnt-node.8 \
318
	man/gnt-os.8
319

    
320
mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS)))
321
manhtml = $(patsubst %.sgml,%.html,$(mansgml))
322
maninput = \
323
	$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
324
	$(patsubst %.html,%.html.in,$(manhtml))
325

    
326
TEST_FILES = \
327
	test/data/bdev-both.txt \
328
	test/data/bdev-8.3-both.txt \
329
	test/data/bdev-disk.txt \
330
	test/data/bdev-net.txt \
331
	test/data/cert1.pem \
332
	test/data/proc_drbd8.txt \
333
	test/data/proc_drbd80-emptyline.txt \
334
	test/data/proc_drbd83.txt \
335
	test/import-export_unittest-helper
336

    
337
python_tests = \
338
	test/ganeti.backend_unittest.py \
339
	test/ganeti.bdev_unittest.py \
340
	test/ganeti.cli_unittest.py \
341
	test/ganeti.cmdlib_unittest.py \
342
	test/ganeti.compat_unittest.py \
343
	test/ganeti.confd.client_unittest.py \
344
	test/ganeti.config_unittest.py \
345
	test/ganeti.constants_unittest.py \
346
	test/ganeti.errors_unittest.py \
347
	test/ganeti.hooks_unittest.py \
348
	test/ganeti.http_unittest.py \
349
	test/ganeti.locking_unittest.py \
350
	test/ganeti.luxi_unittest.py \
351
	test/ganeti.masterd.instance_unittest.py \
352
	test/ganeti.mcpu_unittest.py \
353
	test/ganeti.objects_unittest.py \
354
	test/ganeti.opcodes_unittest.py \
355
	test/ganeti.rapi.client_unittest.py \
356
	test/ganeti.rapi.resources_unittest.py \
357
	test/ganeti.rapi.rlib2_unittest.py \
358
	test/ganeti.serializer_unittest.py \
359
	test/ganeti.ssh_unittest.py \
360
	test/ganeti.uidpool_unittest.py \
361
	test/ganeti.utils_unittest.py \
362
	test/ganeti.utils_mlockall_unittest.py \
363
	test/ganeti.workerpool_unittest.py \
364
	test/docs_unittest.py \
365
	test/tempfile_fork_unittest.py
366

    
367
dist_TESTS = \
368
	test/daemon-util_unittest.bash \
369
	test/import-export_unittest.bash \
370
	test/check-cert-expired_unittest.bash \
371
	$(python_tests)
372

    
373
nodist_TESTS =
374

    
375
TESTS = $(dist_TESTS) $(nodist_TESTS)
376

    
377
# Environment for all tests
378
PLAIN_TESTS_ENVIRONMENT = \
379
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
380

    
381
# Environment for tests run by automake
382
TESTS_ENVIRONMENT = \
383
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
384

    
385
all_python_code = \
386
	$(dist_sbin_SCRIPTS) \
387
	$(dist_tools_SCRIPTS) \
388
	$(pkglib_python_scripts) \
389
	$(python_tests) \
390
	$(pkgpython_PYTHON) \
391
	$(hypervisor_PYTHON) \
392
	$(rapi_PYTHON) \
393
	$(http_PYTHON) \
394
	$(confd_PYTHON) \
395
	$(masterd_PYTHON) \
396
	$(noinst_PYTHON)
397

    
398
srclink_files = \
399
	man/footer.sgml \
400
	test/daemon-util_unittest.bash \
401
	test/import-export_unittest.bash \
402
	test/check-cert-expired_unittest.bash \
403
	$(all_python_code)
404

    
405
check_python_code = \
406
	$(BUILD_BASH_COMPLETION) \
407
	$(all_python_code)
408

    
409
lint_python_code = \
410
	ganeti \
411
	$(dist_sbin_SCRIPTS) \
412
	$(dist_tools_SCRIPTS) \
413
	$(pkglib_python_scripts) \
414
	$(BUILD_BASH_COMPLETION)
415

    
416
test/daemon-util_unittest.bash: daemons/daemon-util
417

    
418
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
419
	sed -f $(REPLACE_VARS_SED) < $< > $@
420
	chmod u+x $@
421

    
422
daemons/%: daemons/%.in \
423
		$(REPLACE_VARS_SED)
424
	sed -f $(REPLACE_VARS_SED) < $< > $@
425
	chmod +x $@
426

    
427
doc/examples/%: doc/examples/%.in \
428
		$(REPLACE_VARS_SED)
429
	sed -f $(REPLACE_VARS_SED) < $< > $@
430

    
431
doc/examples/hooks/%: doc/examples/hooks/%.in \
432
		$(REPLACE_VARS_SED)
433
	sed -f $(REPLACE_VARS_SED) < $< > $@
434

    
435
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
436
	lib/cli.py $(gnt_scripts) tools/burnin
437
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
438

    
439
doc/%.png: doc/%.dot
440
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
441
	$(DOT) -Tpng -o $@ $<
442

    
443
man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
444
	@test -n "$(DOCBOOK2MAN)" || \
445
	  { echo 'docbook2man' not found during configure; exit 1; }
446
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
447
	$(CHECK_MAN) $@
448

    
449
man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
450
	@test -n "$(DOCBOOK2HTML)" || \
451
	  { echo 'docbook2html' not found during configure; exit 1; }
452
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@
453

    
454
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
455
	sed -f $(REPLACE_VARS_SED) < $< > $@
456

    
457
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
458
	sed -f $(REPLACE_VARS_SED) < $< > $@
459

    
460
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
461
	sed -f $(REPLACE_VARS_SED) < $< > $@
462

    
463
lib/_autoconf.py: Makefile stamp-directories
464
	set -e; \
465
	{ echo '# This file is automatically generated, do not edit!'; \
466
	  echo '#'; \
467
	  echo ''; \
468
	  echo '"""Build-time configuration for Ganeti.'; \
469
	  echo '';\
470
	  echo 'This file is autogenerated by the build process.'; \
471
	  echo 'For any changes you need to re-run ./configure (and'; \
472
	  echo 'not edit by hand).'; \
473
	  echo ''; \
474
	  echo '"""'; \
475
	  echo ''; \
476
	  echo '# pylint: disable-msg=C0301,C0324'; \
477
	  echo '# because this is autogenerated, we do not want'; \
478
	  echo '# style warnings' ; \
479
	  echo ''; \
480
	  echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
481
	  echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
482
	  echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
483
	  echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
484
	  echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
485
	  echo "VERSION_FULL = '$(VERSION_FULL)'"; \
486
	  echo "LOCALSTATEDIR = '$(localstatedir)'"; \
487
	  echo "SYSCONFDIR = '$(sysconfdir)'"; \
488
	  echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
489
	  echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
490
	  echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
491
	  echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
492
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
493
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
494
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
495
	  echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
496
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
497
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
498
	  echo "SOCAT_PATH = '$(SOCAT)'"; \
499
	  echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
500
	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
501
	  echo "TOOLSDIR = '$(toolsdir)'"; \
502
	  echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
503
	  echo "PKGLIBDIR = '$(pkglibdir)'"; \
504
	  echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \
505
	  echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
506
	} > $@
507

    
508
$(REPLACE_VARS_SED): Makefile
509
	set -e; \
510
	{ echo 's#@PREFIX@#$(prefix)#g'; \
511
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
512
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
513
	  echo 's#@BINDIR@#$(bindir)#g'; \
514
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
515
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
516
	  echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
517
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
518
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
519
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
520
	  echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
521
	  echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
522
	} > $@
523

    
524
# We need to create symlinks because "make distcheck" will not install Python
525
# files when building.
526
stamp-srclinks: Makefile stamp-directories
527
	set -e; \
528
	for i in $(srclink_files); do \
529
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
530
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
531
		fi; \
532
	done
533
	touch $@
534

    
535
.PHONY: ganeti
536
ganeti:
537
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
538

    
539
check-local:
540
	$(CHECK_PYTHON_CODE) $(check_python_code)
541

    
542
.PHONY: lint
543
lint: ganeti $(BUILT_SOURCES)
544
	@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
545
	$(PYLINT) $(LINT_OPTS) $(lint_python_code)
546

    
547
# a dist hook rule for catching revision control directories
548
distcheck-hook:
549
	if find $(top_distdir) -name .svn -or -name .git | grep .; then \
550
		echo "Found revision control files in final archive." 1>&2; \
551
		exit 1; \
552
	fi
553
	if find $(top_distdir) -name '*.py[co]' | grep .; then \
554
		echo "Found Python byte code in final archive." 1>&2; \
555
		exit 1; \
556
	fi
557
	if find $(top_distdir) -name '*~' | grep .; then \
558
		echo "Found backup files in final archive." 1>&2; \
559
		exit 1; \
560
	fi
561

    
562
install-exec-local:
563
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
564
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
565
	  "$(DESTDIR)${localstatedir}/run/ganeti"
566

    
567
stamp-directories: Makefile
568
	@mkdir_p@ $(DIRS)
569
	touch $@
570

    
571
.PHONY: apidoc
572
apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
573
	test -e doc/api || mkdir doc/api
574
	$(RUN_IN_TEMPDIR) epydoc -v \
575
		--conf $(CURDIR)/epydoc.conf \
576
		--output $(CURDIR)/doc/api
577

    
578
.PHONY: TAGS
579
TAGS: $(BUILT_SOURCES)
580
	rm -f TAGS
581
	find . -path './lib/*.py' -o -path 'scripts/gnt-*' -o \
582
	  -path 'daemons/ganeti-*' -o -path 'tools/*' | \
583
	  etags -
584

    
585
.PHONY: coverage
586
coverage: $(BUILT_SOURCES) $(python_tests)
587
	set -e; \
588
	mkdir -p doc/coverage; \
589
	COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
590
	TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
591
	HTML_COVERAGE=$(CURDIR)/doc/coverage \
592
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
593
	$(python_tests)
594

    
595
commit-check: distcheck lint apidoc
596

    
597
# vim: set noet :