Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 6bf273d5

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/move-instance.rst \
166
	doc/news.rst \
167
	doc/rapi.rst \
168
	doc/security.rst \
169
	doc/walkthrough.rst
170

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

    
182
doc/html: doc/html/.stamp
183

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

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

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

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

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

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

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

    
236
nodist_sbin_SCRIPTS = \
237
	daemons/ganeti-cleaner
238

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

    
249
pkglib_python_scripts = \
250
	daemons/import-export \
251
	tools/check-cert-expired
252

    
253
pkglib_SCRIPTS = \
254
	daemons/daemon-util \
255
	$(pkglib_python_scripts)
256

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

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

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

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

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

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

    
375
nodist_TESTS =
376

    
377
TESTS = $(dist_TESTS) $(nodist_TESTS)
378

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

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

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

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

    
407
check_python_code = \
408
	$(BUILD_BASH_COMPLETION) \
409
	$(all_python_code)
410

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

    
418
test/daemon-util_unittest.bash: daemons/daemon-util
419

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
541
check-local:
542
	$(CHECK_PYTHON_CODE) $(check_python_code)
543

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

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

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

    
569
stamp-directories: Makefile
570
	@mkdir_p@ $(DIRS)
571
	touch $@
572

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

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

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

    
597
commit-check: distcheck lint apidoc
598

    
599
# vim: set noet :