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.
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@
12 ACLOCAL_AMFLAGS = -I autotools
13 BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
14 RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
15 CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
16 CHECK_MAN = $(top_srcdir)/autotools/check-man
17 REPLACE_VARS_SED = autotools/replace_vars.sed
19 clientdir = $(pkgpythondir)/client
20 hypervisordir = $(pkgpythondir)/hypervisor
21 httpdir = $(pkgpythondir)/http
22 masterddir = $(pkgpythondir)/masterd
23 confddir = $(pkgpythondir)/confd
24 rapidir = $(pkgpythondir)/rapi
25 serverdir = $(pkgpythondir)/server
26 watcherdir = $(pkgpythondir)/watcher
27 impexpddir = $(pkgpythondir)/impexpd
28 toolsdir = $(pkglibdir)/tools
29 docdir = $(datadir)/doc/$(PACKAGE)
31 # Delete output file if an error occurred while building it
41 doc/examples/gnt-debug \
59 BUILDTIME_DIR_AUTOCREATE = \
65 $(BUILDTIME_DIR_AUTOCREATE) \
70 ganeti-[0-9]*.[0-9]*.[0-9]* \
73 all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
75 MAINTAINERCLEANFILES = \
78 doc/install-quick.rst \
82 maintainer-clean-local:
83 rm -rf $(BUILDTIME_DIRS)
86 $(addsuffix /*.py[co],$(DIRS)) \
89 autotools/replace_vars.sed \
92 daemons/ganeti-cleaner \
94 doc/examples/bash_completion \
95 doc/examples/ganeti.initd \
96 doc/examples/ganeti.cron \
97 doc/examples/gnt-config-backup \
98 doc/examples/hooks/ipsec \
102 $(nodist_pkgpython_PYTHON)
104 # BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
105 # it'll cause the target to rebuild every time.
113 nodist_pkgpython_PYTHON = \
117 lib/build/__init__.py
121 lib/asyncnotifier.py \
154 lib/client/__init__.py \
155 lib/client/gnt_backup.py \
156 lib/client/gnt_cluster.py \
157 lib/client/gnt_debug.py \
158 lib/client/gnt_instance.py \
159 lib/client/gnt_job.py \
160 lib/client/gnt_node.py \
163 hypervisor_PYTHON = \
164 lib/hypervisor/__init__.py \
165 lib/hypervisor/hv_base.py \
166 lib/hypervisor/hv_chroot.py \
167 lib/hypervisor/hv_fake.py \
168 lib/hypervisor/hv_kvm.py \
169 lib/hypervisor/hv_lxc.py \
170 lib/hypervisor/hv_xen.py
173 lib/rapi/__init__.py \
174 lib/rapi/baserlib.py \
176 lib/rapi/client_utils.py \
177 lib/rapi/connector.py \
181 lib/http/__init__.py \
187 lib/confd/__init__.py \
188 lib/confd/client.py \
189 lib/confd/querylib.py \
193 lib/masterd/__init__.py \
194 lib/masterd/instance.py
197 lib/impexpd/__init__.py
200 lib/watcher/__init__.py
203 lib/server/__init__.py \
204 lib/server/confd.py \
205 lib/server/masterd.py \
206 lib/server/noded.py \
216 doc/design-query2.rst \
217 doc/cluster-merge.rst \
223 doc/install-quick.rst \
226 doc/move-instance.rst \
232 $(RUN_IN_TEMPDIR): | $(all_dirfiles)
234 doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
236 @test -n "$(SPHINX)" || \
237 { echo 'sphinx-build' not found during configure; exit 1; }
239 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
241 -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
242 -D release="$(PACKAGE_VERSION)" \
243 $(abs_top_srcdir)/doc $(CURDIR)/doc/html
244 rm -f doc/html/.buildinfo doc/html/objects.inv
247 doc/html: doc/html/index.html
251 { echo '.. This file is automatically updated at build time from $<.'; \
252 echo '.. Do not edit.'; \
257 doc/install-quick.rst: INSTALL
259 { echo '.. This file is automatically updated at build time from $<.'; \
260 echo '.. Do not edit.'; \
267 doc/design-2.1-lock-acquire.dot \
268 doc/design-2.1-lock-release.dot
270 docpng = $(patsubst %.dot,%.png,$(docdot))
272 # Things to build but not to install (add it to EXTRA_DIST if it should be
277 doc/examples/bash_completion \
278 doc/examples/ganeti.cron \
279 doc/examples/ganeti.initd \
280 doc/examples/gnt-config-backup \
281 doc/examples/hooks/ipsec \
286 scripts/gnt-cluster \
288 scripts/gnt-instance \
294 daemons/ganeti-confd \
295 daemons/ganeti-masterd \
296 daemons/ganeti-noded \
297 daemons/ganeti-watcher \
298 daemons/ganeti-rapi \
300 scripts/gnt-cluster \
302 scripts/gnt-instance \
309 nodist_sbin_SCRIPTS = \
310 $(PYTHON_BOOTSTRAP) \
311 daemons/ganeti-cleaner
313 dist_tools_SCRIPTS = \
318 tools/cluster-merge \
320 tools/move-instance \
322 tools/sanitize-config
324 pkglib_python_scripts = \
325 daemons/import-export \
326 tools/check-cert-expired
329 daemons/daemon-util \
330 daemons/ensure-dirs \
331 $(pkglib_python_scripts)
336 autotools/build-bash-completion \
337 autotools/check-python-code \
338 autotools/check-man \
339 autotools/check-tar \
340 autotools/gen-coverage \
341 autotools/testrunner \
343 daemons/daemon-util.in \
344 daemons/ensure-dirs.in \
345 daemons/ganeti-cleaner.in \
346 $(pkglib_python_scripts) \
353 doc/examples/ganeti.initd.in \
354 doc/examples/ganeti.cron.in \
355 doc/examples/gnt-config-backup.in \
356 doc/examples/dumb-allocator \
357 doc/examples/ganeti.default \
358 doc/examples/ganeti.default-debug \
359 doc/examples/hooks/ethers \
360 doc/examples/hooks/ipsec.in \
361 doc/examples/gnt-debug/README \
362 doc/examples/gnt-debug/delay0.json \
363 doc/examples/gnt-debug/delay50.json \
387 man/ganeti-cleaner.8 \
389 man/ganeti-masterd.8 \
391 man/ganeti-os-interface.7 \
393 man/ganeti-watcher.8 \
402 manrst = $(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS)))
403 manhtml = $(patsubst %.rst,%.html,$(manrst))
405 $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
406 $(patsubst %.html,%.html.in,$(manhtml)) \
407 man/footer.man man/footer.html
410 test/data/bdev-drbd-8.0.txt \
411 test/data/bdev-drbd-8.3.txt \
412 test/data/bdev-drbd-disk.txt \
413 test/data/bdev-drbd-net-ip4.txt \
414 test/data/bdev-drbd-net-ip6.txt \
415 test/data/cert1.pem \
416 test/data/proc_drbd8.txt \
417 test/data/proc_drbd80-emptyline.txt \
418 test/data/proc_drbd83.txt \
419 test/data/sys_drbd_usermode_helper.txt \
420 test/import-export_unittest-helper
423 test/ganeti.asyncnotifier_unittest.py \
424 test/ganeti.backend_unittest.py \
425 test/ganeti.bdev_unittest.py \
426 test/ganeti.cli_unittest.py \
427 test/ganeti.daemon_unittest.py \
428 test/ganeti.cmdlib_unittest.py \
429 test/ganeti.compat_unittest.py \
430 test/ganeti.confd.client_unittest.py \
431 test/ganeti.config_unittest.py \
432 test/ganeti.constants_unittest.py \
433 test/ganeti.errors_unittest.py \
434 test/ganeti.hooks_unittest.py \
435 test/ganeti.http_unittest.py \
436 test/ganeti.hypervisor_unittest.py \
437 test/ganeti.hypervisor.hv_kvm_unittest.py \
438 test/ganeti.impexpd_unittest.py \
439 test/ganeti.jqueue_unittest.py \
440 test/ganeti.locking_unittest.py \
441 test/ganeti.luxi_unittest.py \
442 test/ganeti.masterd.instance_unittest.py \
443 test/ganeti.mcpu_unittest.py \
444 test/ganeti.netutils_unittest.py \
445 test/ganeti.objects_unittest.py \
446 test/ganeti.opcodes_unittest.py \
447 test/ganeti.qlang_unittest.py \
448 test/ganeti.query_unittest.py \
449 test/ganeti.rapi.client_unittest.py \
450 test/ganeti.rapi.resources_unittest.py \
451 test/ganeti.rapi.rlib2_unittest.py \
452 test/ganeti.rpc_unittest.py \
453 test/ganeti.runtime_unittest.py \
454 test/ganeti.serializer_unittest.py \
455 test/ganeti.ssh_unittest.py \
456 test/ganeti.uidpool_unittest.py \
457 test/ganeti.utils_unittest.py \
458 test/ganeti.utils_mlockall_unittest.py \
459 test/ganeti.workerpool_unittest.py \
460 test/cfgupgrade_unittest.py \
461 test/docs_unittest.py \
462 test/tempfile_fork_unittest.py
465 test/check-cert-expired_unittest.bash \
466 test/daemon-util_unittest.bash \
467 test/ganeti-cleaner_unittest.bash \
468 test/import-export_unittest.bash \
473 TESTS = $(dist_TESTS) $(nodist_TESTS)
475 # Environment for all tests
476 PLAIN_TESTS_ENVIRONMENT = \
477 PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
479 # Environment for tests run by automake
480 TESTS_ENVIRONMENT = \
481 $(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
484 $(dist_sbin_SCRIPTS) \
485 $(dist_tools_SCRIPTS) \
486 $(pkglib_python_scripts) \
488 $(pkgpython_PYTHON) \
490 $(hypervisor_PYTHON) \
502 test/check-cert-expired_unittest.bash \
503 test/daemon-util_unittest.bash \
504 test/ganeti-cleaner_unittest.bash \
505 test/import-export_unittest.bash \
508 check_python_code = \
509 $(BUILD_BASH_COMPLETION) \
514 ganeti/http/server.py \
515 $(dist_sbin_SCRIPTS) \
516 $(dist_tools_SCRIPTS) \
517 $(pkglib_python_scripts) \
518 $(BUILD_BASH_COMPLETION) \
521 test/daemon-util_unittest.bash: daemons/daemon-util
523 test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
525 devel/upload: devel/upload.in $(REPLACE_VARS_SED)
526 sed -f $(REPLACE_VARS_SED) < $< > $@
529 daemons/%: daemons/%.in $(REPLACE_VARS_SED)
530 sed -f $(REPLACE_VARS_SED) < $< > $@
533 doc/examples/%: doc/examples/%.in $(REPLACE_VARS_SED)
534 sed -f $(REPLACE_VARS_SED) < $< > $@
536 doc/examples/hooks/%: doc/examples/hooks/%.in $(REPLACE_VARS_SED)
537 sed -f $(REPLACE_VARS_SED) < $< > $@
539 doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
540 lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin
541 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
544 @test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
545 $(DOT) -Tpng -o $@ $<
547 man/footer.man: man/footer.rst
548 @test -n "$(PANDOC)" || \
549 { echo 'pandoc' not found during configure; exit 1; }
550 $(PANDOC) -f rst -t man -o $@ $<
552 man/footer.html: man/footer.rst
553 @test -n "$(PANDOC)" || \
554 { echo 'pandoc' not found during configure; exit 1; }
555 $(PANDOC) -f rst -t html -o $@ $<
557 man/%.7.in man/%.8.in: man/%.rst man/footer.man
558 @test -n "$(PANDOC)" || \
559 { echo 'pandoc' not found during configure; exit 1; }
560 $(PANDOC) -s -f rst -t man -A man/footer.man $< | \
561 sed -e 's/\\@/@/g' > $@
562 if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
564 man/%.html.in: man/%.rst man/footer.html
565 @test -n "$(PANDOC)" || \
566 { echo 'pandoc' not found during configure; exit 1; }
567 $(PANDOC) -s -f rst -t html -A man/footer.html $< | \
568 sed -e 's/\\@/@/g' > $@
571 man/%.7: man/%.7.in $(REPLACE_VARS_SED)
572 sed -f $(REPLACE_VARS_SED) < $< > $@
574 man/%.8: man/%.8.in $(REPLACE_VARS_SED)
575 sed -f $(REPLACE_VARS_SED) < $< > $@
577 man/%.html: man/%.html.in $(REPLACE_VARS_SED)
578 sed -f $(REPLACE_VARS_SED) < $< > $@
581 if test -d .git; then \
583 elif test ! -f $@ ; then \
584 echo "Cannot auto-generate $@ file"; exit 1; \
587 .PHONY: regen-vcs-version
591 if test -d .git; then \
593 $(MAKE) vcs-version; \
596 lib/_autoconf.py: Makefile vcs-version | lib/.dir
598 VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
599 { echo '# This file is automatically generated, do not edit!'; \
602 echo '"""Build-time configuration for Ganeti.'; \
604 echo 'This file is autogenerated by the build process.'; \
605 echo 'For any changes you need to re-run ./configure (and'; \
606 echo 'not edit by hand).'; \
610 echo '# pylint: disable-msg=C0301,C0324'; \
611 echo '# because this is autogenerated, we do not want'; \
612 echo '# style warnings' ; \
614 echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
615 echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
616 echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
617 echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
618 echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
619 echo "VERSION_FULL = '$(VERSION_FULL)'"; \
620 echo "LOCALSTATEDIR = '$(localstatedir)'"; \
621 echo "SYSCONFDIR = '$(sysconfdir)'"; \
622 echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
623 echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
624 echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
625 echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
626 echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
627 echo "XEN_INITRD = '$(XEN_INITRD)'"; \
628 echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
629 echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
630 echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
631 echo "KVM_PATH = '$(KVM_PATH)'"; \
632 echo "SOCAT_PATH = '$(SOCAT)'"; \
633 echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
634 echo "SOCAT_USE_COMPRESS = $(SOCAT_USE_COMPRESS)"; \
635 echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
636 echo "TOOLSDIR = '$(toolsdir)'"; \
637 echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
638 echo "PKGLIBDIR = '$(pkglibdir)'"; \
639 echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \
640 echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
641 echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
642 echo "ADMIN_GROUP = '$(ADMIN_GROUP)'"; \
643 echo "MASTERD_USER = '$(MASTERD_USER)'"; \
644 echo "MASTERD_GROUP = '$(MASTERD_GROUP)'"; \
645 echo "RAPI_USER = '$(RAPI_USER)'"; \
646 echo "RAPI_GROUP = '$(RAPI_GROUP)'"; \
647 echo "CONFD_USER = '$(CONFD_USER)'"; \
648 echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
649 echo "NODED_USER = '$(NODED_USER)'"; \
650 echo "VCS_VERSION = '$$VCSVER'"; \
653 $(REPLACE_VARS_SED): Makefile
655 { echo 's#@PREFIX@#$(prefix)#g'; \
656 echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
657 echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
658 echo 's#@BINDIR@#$(bindir)#g'; \
659 echo 's#@SBINDIR@#$(sbindir)#g'; \
660 echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
661 echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
662 echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
663 echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
664 echo 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \
665 echo 's#@CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \
666 echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
667 echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
668 echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
669 echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \
670 echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \
671 echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \
672 echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \
673 echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
674 echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
675 echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
676 echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
677 echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
680 # Using deferred evaluation
681 daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
682 daemons/ganeti-watcher: MODULE = ganeti.watcher
683 scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
685 $(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
686 test -n "$(MODULE)" || { echo Missing module; exit 1; }
688 { echo '#!/usr/bin/python'; \
689 echo '# This file is automatically generated, do not edit!'; \
690 echo "# Edit $(MODULE) instead."; \
692 echo '"""Bootstrap script for L{$(MODULE)}"""'; \
694 echo '# pylint: disable-msg=C0103'; \
695 echo '# C0103: Invalid name'; \
698 echo 'import $(MODULE) as main'; \
700 echo '# Temporarily alias commands until bash completion'; \
701 echo '# generator is changed'; \
702 echo 'if hasattr(main, "commands"):'; \
703 echo ' commands = main.commands # pylint: disable-msg=E1101'; \
705 echo 'if __name__ == "__main__":'; \
706 echo ' sys.exit(main.Main())'; \
710 # We need to create symlinks because "make distcheck" will not install Python
711 # files when building.
712 stamp-srclinks: Makefile | $(all_dirfiles)
714 for i in $(srclink_files); do \
715 if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
716 $(LN_S) $(abs_top_srcdir)/$$i $$i; \
723 cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
726 check-dirs: $(BUILT_SOURCES)
728 find . -type d \( \( -name . \) -o \( \
730 -name autom4te.cache \
731 \) -prune -o -print \) | { \
735 $(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
736 *) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
739 for dir in $(DIRS); do \
740 if ! test -d "$$dir"; then \
741 echo "Directory $$dir listed in DIRS does not exist" >&2; \
745 if test -n "$$error"; then exit 1; else exit 0; fi; \
748 check-local: check-dirs
749 $(CHECK_PYTHON_CODE) $(check_python_code)
752 lint: $(BUILT_SOURCES)
753 @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
754 $(PYLINT) $(LINT_OPTS) $(lint_python_code)
756 # a dist hook rule for updating the vcs-version file; this is
757 # hardcoded due to where it needs to build the file...
759 $(MAKE) regen-vcs-version && \
760 rm -f $(top_distdir)/vcs-version && \
761 cp -p $(srcdir)/vcs-version $(top_distdir)
763 # a distcheck hook rule for catching revision control directories
765 if find $(top_distdir) -name .svn -or -name .git | grep .; then \
766 echo "Found revision control files in final archive." 1>&2; \
769 if find $(top_distdir) -name '*.py[co]' | grep .; then \
770 echo "Found Python byte code in final archive." 1>&2; \
773 if find $(top_distdir) -name '*~' | grep .; then \
774 echo "Found backup files in final archive." 1>&2; \
777 # Empty files or directories should not be distributed. They can cause
778 # unnecessary warnings for packagers. Directories used by automake during
779 # distcheck must be excluded.
780 if find $(top_distdir) -empty -and -not \( \
781 -path $(top_distdir)/_build -or \
782 -path $(top_distdir)/_inst \) | grep .; then \
783 echo "Found empty files or directories in final archive." 1>&2; \
786 if test -n "$(BUILD_RELEASE)" && \
787 grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
788 echo "Found unreleased version in NEWS." >&2; \
792 # When building a release, stricter checks should be used
793 distcheck-release dist-release: export BUILD_RELEASE = 1
794 distcheck-release: distcheck
798 for i in $(DIST_ARCHIVES); do \
799 echo -n "Checking $$i ... "; \
800 autotools/check-tar < $$i; \
805 @mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
806 "$(DESTDIR)${localstatedir}/log/ganeti" \
807 "$(DESTDIR)${localstatedir}/run/ganeti"
809 # To avoid conflicts between directory names and other targets, a file inside
810 # the directory is used to ensure its existence.
812 @mkdir_p@ $* && touch $@
815 apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
816 $(RUN_IN_TEMPDIR) epydoc -v \
817 --conf $(CURDIR)/epydoc.conf \
818 --output $(CURDIR)/doc/api
821 TAGS: $(BUILT_SOURCES)
823 find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
824 -path './daemons/ganeti-*' -o -path './tools/*' -o \
825 -path './qa/*.py' | \
829 coverage: $(BUILT_SOURCES) $(python_tests)
831 COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
832 TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
833 HTML_COVERAGE=$(CURDIR)/doc/coverage \
834 $(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
837 commit-check: distcheck lint apidoc
839 -include ./Makefile.local