Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ bb44b1ae

History | View | Annotate | Download (15.3 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
impexpddir = $(pkgpythondir)/impexpd
26
toolsdir = $(pkglibdir)/tools
27
docdir = $(datadir)/doc/$(PACKAGE)
28

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

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

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

    
60
maintainer-clean-local:
61
	rm -rf doc/api doc/html doc/coverage
62

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

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

    
86
nodist_pkgpython_PYTHON = \
87
	lib/_autoconf.py
88

    
89
noinst_PYTHON = \
90
	lib/build/__init__.py
91

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

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

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

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

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

    
149
masterd_PYTHON = \
150
	lib/masterd/__init__.py \
151
	lib/masterd/instance.py
152

    
153
impexpd_PYTHON = \
154
	lib/impexpd/__init__.py
155

    
156
docrst = \
157
	doc/admin.rst \
158
	doc/design-2.0.rst \
159
	doc/design-2.1.rst \
160
	doc/design-2.2.rst \
161
	doc/design-cluster-merger.rst \
162
	doc/devnotes.rst \
163
	doc/glossary.rst \
164
	doc/hooks.rst \
165
	doc/iallocator.rst \
166
	doc/index.rst \
167
	doc/install-quick.rst \
168
	doc/install.rst \
169
	doc/locking.rst \
170
	doc/move-instance.rst \
171
	doc/news.rst \
172
	doc/rapi.rst \
173
	doc/security.rst \
174
	doc/walkthrough.rst
175

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

    
187
doc/html: doc/html/.stamp
188

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

    
197
doc/install-quick.rst: INSTALL
198
	set -e; \
199
	{ echo '.. This file is automatically updated at build time from $<.'; \
200
	  echo '.. Do not edit.'; \
201
	  echo; \
202
	  cat $<; \
203
	} > $@
204

    
205
docdot = \
206
	doc/arch-2.0.dot \
207
	doc/design-2.1-lock-acquire.dot \
208
	doc/design-2.1-lock-release.dot
209

    
210
docpng = $(patsubst %.dot,%.png,$(docdot))
211

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

    
224
gnt_scripts = \
225
	scripts/gnt-backup \
226
	scripts/gnt-cluster \
227
	scripts/gnt-debug \
228
	scripts/gnt-instance \
229
	scripts/gnt-job \
230
	scripts/gnt-node \
231
	scripts/gnt-os
232

    
233
dist_sbin_SCRIPTS = \
234
	daemons/ganeti-noded \
235
	daemons/ganeti-watcher \
236
	daemons/ganeti-masterd \
237
	daemons/ganeti-confd \
238
	daemons/ganeti-rapi \
239
	$(gnt_scripts)
240

    
241
nodist_sbin_SCRIPTS = \
242
	daemons/ganeti-cleaner
243

    
244
dist_tools_SCRIPTS = \
245
	tools/burnin \
246
	tools/cfgshell \
247
	tools/cfgupgrade \
248
	tools/cfgupgrade12 \
249
	tools/cluster-merge \
250
	tools/lvmstrap \
251
	tools/move-instance \
252
	tools/sanitize-config
253

    
254
pkglib_python_scripts = \
255
	daemons/import-export \
256
	tools/check-cert-expired
257

    
258
pkglib_SCRIPTS = \
259
	daemons/daemon-util \
260
	$(pkglib_python_scripts)
261

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

    
310
man_MANS = \
311
	man/ganeti.7 \
312
	man/ganeti-cleaner.8 \
313
	man/ganeti-confd.8 \
314
	man/ganeti-masterd.8 \
315
	man/ganeti-noded.8 \
316
	man/ganeti-os-interface.7 \
317
	man/ganeti-rapi.8 \
318
	man/ganeti-watcher.8 \
319
	man/gnt-backup.8 \
320
	man/gnt-cluster.8 \
321
	man/gnt-debug.8 \
322
	man/gnt-instance.8 \
323
	man/gnt-job.8 \
324
	man/gnt-node.8 \
325
	man/gnt-os.8
326

    
327
mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS)))
328
manhtml = $(patsubst %.sgml,%.html,$(mansgml))
329
maninput = \
330
	$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
331
	$(patsubst %.html,%.html.in,$(manhtml))
332

    
333
TEST_FILES = \
334
	test/data/bdev-both.txt \
335
	test/data/bdev-8.3-both.txt \
336
	test/data/bdev-disk.txt \
337
	test/data/bdev-net.txt \
338
	test/data/cert1.pem \
339
	test/data/proc_drbd8.txt \
340
	test/data/proc_drbd80-emptyline.txt \
341
	test/data/proc_drbd83.txt \
342
	test/import-export_unittest-helper
343

    
344
python_tests = \
345
	test/ganeti.asyncnotifier_unittest.py \
346
	test/ganeti.backend_unittest.py \
347
	test/ganeti.bdev_unittest.py \
348
	test/ganeti.cli_unittest.py \
349
	test/ganeti.daemon_unittest.py \
350
	test/ganeti.cmdlib_unittest.py \
351
	test/ganeti.compat_unittest.py \
352
	test/ganeti.confd.client_unittest.py \
353
	test/ganeti.config_unittest.py \
354
	test/ganeti.constants_unittest.py \
355
	test/ganeti.errors_unittest.py \
356
	test/ganeti.hooks_unittest.py \
357
	test/ganeti.http_unittest.py \
358
	test/ganeti.impexpd_unittest.py \
359
	test/ganeti.locking_unittest.py \
360
	test/ganeti.luxi_unittest.py \
361
	test/ganeti.masterd.instance_unittest.py \
362
	test/ganeti.mcpu_unittest.py \
363
	test/ganeti.objects_unittest.py \
364
	test/ganeti.opcodes_unittest.py \
365
	test/ganeti.rapi.client_unittest.py \
366
	test/ganeti.rapi.resources_unittest.py \
367
	test/ganeti.rapi.rlib2_unittest.py \
368
	test/ganeti.serializer_unittest.py \
369
	test/ganeti.ssh_unittest.py \
370
	test/ganeti.uidpool_unittest.py \
371
	test/ganeti.utils_unittest.py \
372
	test/ganeti.utils_mlockall_unittest.py \
373
	test/ganeti.workerpool_unittest.py \
374
	test/docs_unittest.py \
375
	test/tempfile_fork_unittest.py
376

    
377
dist_TESTS = \
378
	test/daemon-util_unittest.bash \
379
	test/import-export_unittest.bash \
380
	test/check-cert-expired_unittest.bash \
381
	$(python_tests)
382

    
383
nodist_TESTS =
384

    
385
TESTS = $(dist_TESTS) $(nodist_TESTS)
386

    
387
# Environment for all tests
388
PLAIN_TESTS_ENVIRONMENT = \
389
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
390

    
391
# Environment for tests run by automake
392
TESTS_ENVIRONMENT = \
393
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
394

    
395
all_python_code = \
396
	$(dist_sbin_SCRIPTS) \
397
	$(dist_tools_SCRIPTS) \
398
	$(pkglib_python_scripts) \
399
	$(python_tests) \
400
	$(pkgpython_PYTHON) \
401
	$(hypervisor_PYTHON) \
402
	$(rapi_PYTHON) \
403
	$(http_PYTHON) \
404
	$(confd_PYTHON) \
405
	$(masterd_PYTHON) \
406
	$(impexpd_PYTHON) \
407
	$(noinst_PYTHON)
408

    
409
srclink_files = \
410
	man/footer.sgml \
411
	test/daemon-util_unittest.bash \
412
	test/import-export_unittest.bash \
413
	test/check-cert-expired_unittest.bash \
414
	$(all_python_code)
415

    
416
check_python_code = \
417
	$(BUILD_BASH_COMPLETION) \
418
	$(all_python_code)
419

    
420
lint_python_code = \
421
	ganeti \
422
	$(dist_sbin_SCRIPTS) \
423
	$(dist_tools_SCRIPTS) \
424
	$(pkglib_python_scripts) \
425
	$(BUILD_BASH_COMPLETION)
426

    
427
test/daemon-util_unittest.bash: daemons/daemon-util
428

    
429
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
430
	sed -f $(REPLACE_VARS_SED) < $< > $@
431
	chmod u+x $@
432

    
433
daemons/%: daemons/%.in \
434
		$(REPLACE_VARS_SED)
435
	sed -f $(REPLACE_VARS_SED) < $< > $@
436
	chmod +x $@
437

    
438
doc/examples/%: doc/examples/%.in \
439
		$(REPLACE_VARS_SED)
440
	sed -f $(REPLACE_VARS_SED) < $< > $@
441

    
442
doc/examples/hooks/%: doc/examples/hooks/%.in \
443
		$(REPLACE_VARS_SED)
444
	sed -f $(REPLACE_VARS_SED) < $< > $@
445

    
446
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
447
	lib/cli.py $(gnt_scripts) tools/burnin
448
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
449

    
450
doc/%.png: doc/%.dot
451
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
452
	$(DOT) -Tpng -o $@ $<
453

    
454
man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
455
	@test -n "$(DOCBOOK2MAN)" || \
456
	  { echo 'docbook2man' not found during configure; exit 1; }
457
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
458
	$(CHECK_MAN) $@
459

    
460
man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
461
	@test -n "$(DOCBOOK2HTML)" || \
462
	  { echo 'docbook2html' not found during configure; exit 1; }
463
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@
464

    
465
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
466
	sed -f $(REPLACE_VARS_SED) < $< > $@
467

    
468
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
469
	sed -f $(REPLACE_VARS_SED) < $< > $@
470

    
471
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
472
	sed -f $(REPLACE_VARS_SED) < $< > $@
473

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

    
519
$(REPLACE_VARS_SED): Makefile
520
	set -e; \
521
	{ echo 's#@PREFIX@#$(prefix)#g'; \
522
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
523
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
524
	  echo 's#@BINDIR@#$(bindir)#g'; \
525
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
526
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
527
	  echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
528
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
529
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
530
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
531
	  echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
532
	  echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
533
	} > $@
534

    
535
# We need to create symlinks because "make distcheck" will not install Python
536
# files when building.
537
stamp-srclinks: Makefile stamp-directories
538
	set -e; \
539
	for i in $(srclink_files); do \
540
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
541
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
542
		fi; \
543
	done
544
	touch $@
545

    
546
.PHONY: ganeti
547
ganeti:
548
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
549

    
550
check-local:
551
	$(CHECK_PYTHON_CODE) $(check_python_code)
552

    
553
.PHONY: lint
554
lint: ganeti $(BUILT_SOURCES)
555
	@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
556
	$(PYLINT) $(LINT_OPTS) $(lint_python_code)
557

    
558
# a dist hook rule for catching revision control directories
559
distcheck-hook:
560
	if find $(top_distdir) -name .svn -or -name .git | grep .; then \
561
		echo "Found revision control files in final archive." 1>&2; \
562
		exit 1; \
563
	fi
564
	if find $(top_distdir) -name '*.py[co]' | grep .; then \
565
		echo "Found Python byte code in final archive." 1>&2; \
566
		exit 1; \
567
	fi
568
	if find $(top_distdir) -name '*~' | grep .; then \
569
		echo "Found backup files in final archive." 1>&2; \
570
		exit 1; \
571
	fi
572

    
573
install-exec-local:
574
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
575
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
576
	  "$(DESTDIR)${localstatedir}/run/ganeti"
577

    
578
stamp-directories: Makefile
579
	@mkdir_p@ $(DIRS)
580
	touch $@
581

    
582
.PHONY: apidoc
583
apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
584
	test -e doc/api || mkdir doc/api
585
	$(RUN_IN_TEMPDIR) epydoc -v \
586
		--conf $(CURDIR)/epydoc.conf \
587
		--output $(CURDIR)/doc/api
588

    
589
.PHONY: TAGS
590
TAGS: $(BUILT_SOURCES)
591
	rm -f TAGS
592
	find . -path './lib/*.py' -o -path 'scripts/gnt-*' -o \
593
	  -path 'daemons/ganeti-*' -o -path 'tools/*' | \
594
	  etags -
595

    
596
.PHONY: coverage
597
coverage: $(BUILT_SOURCES) $(python_tests)
598
	set -e; \
599
	mkdir -p doc/coverage; \
600
	COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
601
	TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
602
	HTML_COVERAGE=$(CURDIR)/doc/coverage \
603
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
604
	$(python_tests)
605

    
606
commit-check: distcheck lint apidoc
607

    
608
# vim: set noet :