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 # Helper values for calling builtin functions
14 space := $(empty) $(empty)
17 # Use bash in order to be able to use pipefail
20 ACLOCAL_AMFLAGS = -I autotools
21 BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
22 RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
23 CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
24 CHECK_HEADER = $(top_srcdir)/autotools/check-header
25 CHECK_MAN_DASHES = $(top_srcdir)/autotools/check-man-dashes
26 CHECK_MAN_WARNINGS = $(top_srcdir)/autotools/check-man-warnings
27 CHECK_VERSION = $(top_srcdir)/autotools/check-version
28 CHECK_NEWS = $(top_srcdir)/autotools/check-news
29 CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
30 DOCPP = $(top_srcdir)/autotools/docpp
31 REPLACE_VARS_SED = autotools/replace_vars.sed
32 CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
33 BUILD_RPC = $(top_srcdir)/autotools/build-rpc
35 # Note: these are automake-specific variables, and must be named after
36 # the directory + 'dir' suffix
37 clientdir = $(pkgpythondir)/client
38 hypervisordir = $(pkgpythondir)/hypervisor
39 httpdir = $(pkgpythondir)/http
40 masterddir = $(pkgpythondir)/masterd
41 confddir = $(pkgpythondir)/confd
42 rapidir = $(pkgpythondir)/rapi
43 serverdir = $(pkgpythondir)/server
44 watcherdir = $(pkgpythondir)/watcher
45 impexpddir = $(pkgpythondir)/impexpd
46 utilsdir = $(pkgpythondir)/utils
47 toolsdir = $(pkglibdir)/tools
48 iallocatorsdir = $(pkglibdir)/iallocators
49 pytoolsdir = $(pkgpythondir)/tools
50 docdir = $(datadir)/doc/$(PACKAGE)
51 myexeclibdir = $(pkglibdir)
53 # Delete output file if an error occurred while building it
60 htools/Ganeti/HTools \
61 htools/Ganeti/HTools/Program
70 doc/examples/gnt-debug \
91 test/data/ovfdata/other \
94 BUILDTIME_DIR_AUTOCREATE = \
99 $(APIDOC_HS_DIR)/Ganeti \
100 $(APIDOC_HS_DIR)/Ganeti/Confd \
101 $(APIDOC_HS_DIR)/Ganeti/HTools \
102 $(APIDOC_HS_DIR)/Ganeti/HTools/Program \
109 $(BUILDTIME_DIR_AUTOCREATE) \
114 ganeti-[0-9]*.[0-9]*.[0-9]* \
117 all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
120 COVERAGE_DIR = doc/coverage
121 COVERAGE_PY_DIR = $(COVERAGE_DIR)/py
122 COVERAGE_HS_DIR = $(COVERAGE_DIR)/hs
124 APIDOC_PY_DIR = $(APIDOC_DIR)/py
125 APIDOC_HS_DIR = $(APIDOC_DIR)/hs
127 MAINTAINERCLEANFILES = \
130 doc/install-quick.rst \
135 maintainer-clean-local:
136 rm -rf $(BUILDTIME_DIRS)
139 $(addsuffix /*.py[co],$(DIRS)) \
140 $(addsuffix /*.hi,$(HTOOLS_DIRS)) \
141 $(addsuffix /*.o,$(HTOOLS_DIRS)) \
143 $(PYTHON_BOOTSTRAP) \
145 autotools/replace_vars.sed \
146 daemons/daemon-util \
147 daemons/ganeti-cleaner \
150 doc/examples/bash_completion \
151 lib/_generated_rpc.py \
156 $(nodist_pkgpython_PYTHON) \
157 $(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
158 .hpc/*.mix htools/*.tix \
161 # BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
162 # it'll cause the target to rebuild every time.
164 $(built_base_sources) \
165 $(BUILT_PYTHON_SOURCES) \
168 built_base_sources = \
173 built_python_base_sources = \
177 BUILT_PYTHON_SOURCES = \
178 $(built_python_base_sources) \
179 lib/_generated_rpc.py
181 # Generating the RPC wrappers depends on many things, so make sure it's built at
182 # the end of the built sources
183 lib/_generated_rpc.py: | $(built_base_sources) $(built_python_base_sources)
185 # these are all built from the underlying %.in sources
187 doc/examples/ganeti-kvm-poweroff.initd \
188 doc/examples/ganeti.cron \
189 doc/examples/ganeti.initd \
190 doc/examples/gnt-config-backup \
191 doc/examples/hooks/ipsec
193 nodist_pkgpython_PYTHON = \
194 $(BUILT_PYTHON_SOURCES)
197 lib/build/__init__.py \
198 lib/build/sphinx_ext.py
202 lib/asyncnotifier.py \
236 lib/client/__init__.py \
237 lib/client/gnt_backup.py \
238 lib/client/gnt_cluster.py \
239 lib/client/gnt_debug.py \
240 lib/client/gnt_group.py \
241 lib/client/gnt_instance.py \
242 lib/client/gnt_job.py \
243 lib/client/gnt_node.py \
246 hypervisor_PYTHON = \
247 lib/hypervisor/__init__.py \
248 lib/hypervisor/hv_base.py \
249 lib/hypervisor/hv_chroot.py \
250 lib/hypervisor/hv_fake.py \
251 lib/hypervisor/hv_kvm.py \
252 lib/hypervisor/hv_lxc.py \
253 lib/hypervisor/hv_xen.py
256 lib/rapi/__init__.py \
257 lib/rapi/baserlib.py \
259 lib/rapi/client_utils.py \
260 lib/rapi/connector.py \
262 lib/rapi/testutils.py
265 lib/http/__init__.py \
271 lib/confd/__init__.py \
272 lib/confd/client.py \
273 lib/confd/querylib.py \
277 lib/masterd/__init__.py \
278 lib/masterd/instance.py
281 lib/impexpd/__init__.py
284 lib/watcher/__init__.py \
285 lib/watcher/nodemaint.py \
289 lib/server/__init__.py \
290 lib/server/confd.py \
291 lib/server/masterd.py \
292 lib/server/noded.py \
296 lib/tools/__init__.py \
297 lib/tools/ensure_dirs.py
300 lib/utils/__init__.py \
302 lib/utils/filelock.py \
307 lib/utils/nodesetup.py \
308 lib/utils/process.py \
311 lib/utils/wrapper.py \
320 doc/design-htools-2.3.rst \
323 doc/design-draft.rst \
325 doc/design-cpu-pinning.rst \
326 doc/design-query2.rst \
327 doc/design-x509-ca.rst \
328 doc/design-http-server.rst \
329 doc/design-impexp2.rst \
330 doc/design-lu-generated-jobs.rst \
331 doc/design-multi-reloc.rst \
332 doc/design-network.rst \
333 doc/design-chained-jobs.rst \
334 doc/design-ovf-support.rst \
335 doc/design-resource-model.rst \
336 doc/cluster-merge.rst \
337 doc/design-shared-storage.rst \
338 doc/design-node-state-cache.rst \
339 doc/design-virtual-clusters.rst \
345 doc/install-quick.rst \
348 doc/move-instance.rst \
355 HS_PROGS = htools/htools htools/hconfd
356 HS_BIN_ROLES = hbal hscan hspace hinfo
358 HS_ALL_PROGS = $(HS_PROGS) htools/test htools/htools-hpc
359 HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
360 # we don't add -Werror by default
361 HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
362 # extra flags that can be overriden on the command line
364 # internal extra flags (used for htools/test mainly)
366 # exclude options for coverage reports
367 HPCEXCL = --exclude Main \
368 --exclude Ganeti.Constants \
369 --exclude Ganeti.THH \
370 --exclude Ganeti.HTools.QC \
371 --exclude Ganeti.HTools.QCHelper \
372 --exclude Ganeti.HTools.Version
375 htools/Ganeti/HTools/CLI.hs \
376 htools/Ganeti/HTools/Cluster.hs \
377 htools/Ganeti/HTools/Compat.hs \
378 htools/Ganeti/HTools/Container.hs \
379 htools/Ganeti/HTools/ExtLoader.hs \
380 htools/Ganeti/HTools/Group.hs \
381 htools/Ganeti/HTools/IAlloc.hs \
382 htools/Ganeti/HTools/Instance.hs \
383 htools/Ganeti/HTools/JSON.hs \
384 htools/Ganeti/HTools/Loader.hs \
385 htools/Ganeti/HTools/Luxi.hs \
386 htools/Ganeti/HTools/Node.hs \
387 htools/Ganeti/HTools/PeerMap.hs \
388 htools/Ganeti/HTools/QC.hs \
389 htools/Ganeti/HTools/QCHelper.hs \
390 htools/Ganeti/HTools/Rapi.hs \
391 htools/Ganeti/HTools/Simu.hs \
392 htools/Ganeti/HTools/Text.hs \
393 htools/Ganeti/HTools/Types.hs \
394 htools/Ganeti/HTools/Utils.hs \
395 htools/Ganeti/HTools/Program.hs \
396 htools/Ganeti/HTools/Program/Hail.hs \
397 htools/Ganeti/HTools/Program/Hbal.hs \
398 htools/Ganeti/HTools/Program/Hinfo.hs \
399 htools/Ganeti/HTools/Program/Hscan.hs \
400 htools/Ganeti/HTools/Program/Hspace.hs \
401 htools/Ganeti/BasicTypes.hs \
402 htools/Ganeti/Confd.hs \
403 htools/Ganeti/Confd/Server.hs \
404 htools/Ganeti/Config.hs \
405 htools/Ganeti/Daemon.hs \
406 htools/Ganeti/Hash.hs \
407 htools/Ganeti/Jobs.hs \
408 htools/Ganeti/Logging.hs \
409 htools/Ganeti/Luxi.hs \
410 htools/Ganeti/Objects.hs \
411 htools/Ganeti/OpCodes.hs \
412 htools/Ganeti/Runtime.hs \
415 HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
416 HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
418 $(RUN_IN_TEMPDIR): | $(all_dirfiles)
420 # Note: we use here an order-only prerequisite, as the contents of
421 # _autoconf.py are not actually influencing the html build output: it
422 # has to exist in order for the sphinx module to be loaded
423 # successfully, but we certainly don't want the docs to be rebuilt if
425 doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
426 $(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
427 | $(BUILT_PYTHON_SOURCES)
428 @test -n "$(SPHINX)" || \
429 { echo 'sphinx-build' not found during configure; exit 1; }
431 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
433 -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
434 -D release="$(PACKAGE_VERSION)" \
435 $(abs_top_srcdir)/doc $(CURDIR)/doc/html
436 rm -f doc/html/.buildinfo doc/html/objects.inv
439 doc/html: doc/html/index.html
441 doc/install-quick.rst: INSTALL
443 doc/upgrade.rst: UPGRADE
445 doc/install-quick.rst doc/news.rst doc/upgrade.rst:
447 { echo '.. This file is automatically updated at build time from $<.'; \
448 echo '.. Do not edit.'; \
455 doc/design-2.1-lock-acquire.dot \
456 doc/design-2.1-lock-release.dot
458 docpng = $(patsubst %.dot,%.png,$(docdot))
460 # Things to build but not to install (add it to EXTRA_DIST if it should be
466 doc/examples/bash_completion \
471 scripts/gnt-cluster \
474 scripts/gnt-instance \
479 PYTHON_BOOTSTRAP_SBIN = \
480 daemons/ganeti-confd \
481 daemons/ganeti-masterd \
482 daemons/ganeti-noded \
483 daemons/ganeti-watcher \
484 daemons/ganeti-rapi \
488 $(PYTHON_BOOTSTRAP_SBIN) \
508 bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
510 @mkdir_p@ $(DESTDIR)$(iallocatorsdir)
511 # FIXME: this is a hardcoded logic, instead of auto-resolving
512 $(LN_S) -f ../../../bin/htools \
513 $(DESTDIR)$(iallocatorsdir)/hail
514 for role in $(HS_BIN_ROLES); do \
516 $(DESTDIR)$(bindir)/$$role ; \
520 $(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
521 @if [ -z "$(HTOOLS)" ]; then \
522 echo "Error: htools compilation disabled at configure time" 1>&2 ;\
525 @BINARY=$(@:htools/%=%); \
526 if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
527 echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
530 rm -f $(@:htools/%=%).tix
531 BINARY=$(@:htools/%=%); $(GHC) --make \
533 $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
534 -osuf $$BINARY.o -hisuf $$BINARY.hi \
535 $(HEXTRA) $(HEXTRA_INT) $@
537 # for the htools/test binary, we need to enable profiling/coverage
538 htools/test: HEXTRA_INT=-fhpc -Wwarn -fno-warn-missing-signatures \
539 -fno-warn-monomorphism-restriction -fno-warn-orphans \
540 -fno-warn-missing-methods -fno-warn-unused-imports
542 # we compile the htools-hpc binary with the program coverage
543 htools/htools-hpc: HEXTRA_INT=-fhpc
546 htools/offline-tests.sh: htools/htools-hpc
548 # rules for building profiling-enabled versions of the haskell
549 # programs: hs-prof does the full two-step build, whereas
550 # hs-prof-quick does only the final rebuild (hs-prof must have been
552 .PHONY: hs-prof hs-prof-quick
555 $(MAKE) $(HS_ALL_PROGS) HEXTRA="-osuf .o"
556 rm -f $(HS_ALL_PROGS)
557 $(MAKE) hs-prof-quick
560 $(MAKE) $(HS_ALL_PROGS) HEXTRA="-osuf .prof_o -prof -auto-all"
562 dist_sbin_SCRIPTS = \
563 tools/ganeti-listrunner
565 nodist_sbin_SCRIPTS = \
566 $(PYTHON_BOOTSTRAP_SBIN) \
567 daemons/ganeti-cleaner
574 tools/cluster-merge \
578 tools/move-instance \
581 tools/sanitize-config
583 dist_tools_SCRIPTS = \
585 tools/kvm-console-wrapper \
586 tools/xm-console-wrapper \
587 tools/master-ip-setup
589 pkglib_python_scripts = \
590 daemons/import-export \
591 tools/check-cert-expired
593 nodist_pkglib_python_scripts = \
596 myexeclib_SCRIPTS = \
597 daemons/daemon-util \
599 $(pkglib_python_scripts)
601 nodist_myexeclib_SCRIPTS = \
602 $(nodist_pkglib_python_scripts)
609 autotools/build-bash-completion \
610 autotools/build-rpc \
611 autotools/check-header \
612 autotools/check-python-code \
613 autotools/check-imports \
614 autotools/check-man-dashes \
615 autotools/check-man-warnings \
616 autotools/check-news \
617 autotools/check-tar \
618 autotools/check-version \
619 autotools/convert-constants \
621 autotools/gen-coverage \
622 autotools/testrunner \
624 daemons/daemon-util.in \
625 daemons/ganeti-cleaner.in \
626 $(pkglib_python_scripts) \
634 $(BUILT_EXAMPLES:%=%.in) \
635 doc/examples/ganeti.default \
636 doc/examples/ganeti.default-debug \
637 doc/examples/hooks/ethers \
638 doc/examples/gnt-debug/README \
639 doc/examples/gnt-debug/delay0.json \
640 doc/examples/gnt-debug/delay50.json \
651 $(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
653 htools/lint-hints.hs \
654 htools/cli-tests-defs.sh \
655 htools/offline-test.sh
659 man/ganeti-cleaner.8 \
661 man/ganeti-listrunner.8 \
662 man/ganeti-masterd.8 \
664 man/ganeti-os-interface.7 \
666 man/ganeti-watcher.8 \
682 manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
683 manhtml = $(patsubst %.rst,%.html,$(manrst))
684 mangen = $(patsubst %.rst,%.gen,$(manrst))
686 $(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
687 $(patsubst %.html,%.html.in,$(manhtml)) \
688 man/footer.man man/footer.html $(mangen)
691 test/data/bdev-drbd-8.0.txt \
692 test/data/bdev-drbd-8.3.txt \
693 test/data/bdev-drbd-disk.txt \
694 test/data/bdev-drbd-net-ip4.txt \
695 test/data/bdev-drbd-net-ip6.txt \
696 test/data/cert1.pem \
697 test/data/ip-addr-show-dummy0.txt \
698 test/data/ip-addr-show-lo-ipv4.txt \
699 test/data/ip-addr-show-lo-ipv6.txt \
700 test/data/ip-addr-show-lo-oneline-ipv4.txt \
701 test/data/ip-addr-show-lo-oneline-ipv6.txt \
702 test/data/ip-addr-show-lo-oneline.txt \
703 test/data/ip-addr-show-lo.txt \
704 test/data/proc_drbd8.txt \
705 test/data/proc_drbd80-emptyline.txt \
706 test/data/proc_drbd83.txt \
707 test/data/proc_drbd83_sync.txt \
708 test/data/proc_drbd83_sync_krnl2.6.39.txt \
709 test/data/kvm_1.0_help.txt \
710 test/data/kvm_0.15.90_help.txt \
711 test/data/kvm_0.12.5_help.txt \
712 test/data/kvm_0.9.1_help.txt \
713 test/data/sys_drbd_usermode_helper.txt \
714 test/data/htools/hail-alloc-drbd.json \
715 test/data/htools/hail-change-group.json \
716 test/data/htools/hail-node-evac.json \
717 test/data/htools/hail-reloc-drbd.json \
718 test/data/htools/rapi/groups.json \
719 test/data/htools/rapi/info.json \
720 test/data/htools/rapi/instances.json \
721 test/data/htools/rapi/nodes.json \
722 test/data/ovfdata/compr_disk.vmdk.gz \
723 test/data/ovfdata/config.ini \
724 test/data/ovfdata/corrupted_resources.ovf \
725 test/data/ovfdata/empty.ini \
726 test/data/ovfdata/empty.ovf \
727 test/data/ovfdata/ganeti.mf \
728 test/data/ovfdata/ganeti.ovf \
729 test/data/ovfdata/gzip_disk.ovf \
730 test/data/ovfdata/new_disk.vmdk \
731 test/data/ovfdata/no_disk.ini \
732 test/data/ovfdata/no_disk_in_ref.ovf \
733 test/data/ovfdata/no_os.ini \
734 test/data/ovfdata/no_ovf.ova \
735 test/data/ovfdata/ova.ova \
736 test/data/ovfdata/second_disk.vmdk \
737 test/data/ovfdata/rawdisk.raw \
738 test/data/ovfdata/unsafe_path.ini \
739 test/data/ovfdata/virtualbox.ovf \
740 test/data/ovfdata/wrong_extension.ovd \
741 test/data/ovfdata/wrong_config.ini \
742 test/data/ovfdata/wrong_manifest.mf \
743 test/data/ovfdata/wrong_manifest.ovf \
744 test/data/ovfdata/wrong_ova.ova \
745 test/data/ovfdata/wrong_xml.ovf \
746 test/data/ovfdata/other/rawdisk.raw \
747 test/data/vgreduce-removemissing-2.02.02.txt \
748 test/data/vgreduce-removemissing-2.02.66-fail.txt \
749 test/data/vgreduce-removemissing-2.02.66-ok.txt \
750 test/data/vgs-missing-pvs-2.02.02.txt \
751 test/data/vgs-missing-pvs-2.02.66.txt \
752 test/import-export_unittest-helper
755 test/ganeti.asyncnotifier_unittest.py \
756 test/ganeti.backend_unittest.py \
757 test/ganeti.bdev_unittest.py \
758 test/ganeti.cli_unittest.py \
759 test/ganeti.client.gnt_cluster_unittest.py \
760 test/ganeti.client.gnt_instance_unittest.py \
761 test/ganeti.daemon_unittest.py \
762 test/ganeti.cmdlib_unittest.py \
763 test/ganeti.compat_unittest.py \
764 test/ganeti.confd.client_unittest.py \
765 test/ganeti.config_unittest.py \
766 test/ganeti.constants_unittest.py \
767 test/ganeti.errors_unittest.py \
768 test/ganeti.hooks_unittest.py \
769 test/ganeti.ht_unittest.py \
770 test/ganeti.http_unittest.py \
771 test/ganeti.hypervisor_unittest.py \
772 test/ganeti.hypervisor.hv_chroot_unittest.py \
773 test/ganeti.hypervisor.hv_fake_unittest.py \
774 test/ganeti.hypervisor.hv_kvm_unittest.py \
775 test/ganeti.hypervisor.hv_lxc_unittest.py \
776 test/ganeti.hypervisor.hv_xen_unittest.py \
777 test/ganeti.impexpd_unittest.py \
778 test/ganeti.jqueue_unittest.py \
779 test/ganeti.locking_unittest.py \
780 test/ganeti.luxi_unittest.py \
781 test/ganeti.masterd.instance_unittest.py \
782 test/ganeti.mcpu_unittest.py \
783 test/ganeti.netutils_unittest.py \
784 test/ganeti.objects_unittest.py \
785 test/ganeti.opcodes_unittest.py \
786 test/ganeti.ovf_unittest.py \
787 test/ganeti.qlang_unittest.py \
788 test/ganeti.query_unittest.py \
789 test/ganeti.rapi.baserlib_unittest.py \
790 test/ganeti.rapi.client_unittest.py \
791 test/ganeti.rapi.resources_unittest.py \
792 test/ganeti.rapi.rlib2_unittest.py \
793 test/ganeti.rapi.testutils_unittest.py \
794 test/ganeti.rpc_unittest.py \
795 test/ganeti.runtime_unittest.py \
796 test/ganeti.serializer_unittest.py \
797 test/ganeti.ssh_unittest.py \
798 test/ganeti.storage_unittest.py \
799 test/ganeti.tools.ensure_dirs_unittest.py \
800 test/ganeti.uidpool_unittest.py \
801 test/ganeti.utils.algo_unittest.py \
802 test/ganeti.utils.filelock_unittest.py \
803 test/ganeti.utils.hash_unittest.py \
804 test/ganeti.utils.io_unittest.py \
805 test/ganeti.utils.log_unittest.py \
806 test/ganeti.utils.mlock_unittest.py \
807 test/ganeti.utils.nodesetup_unittest.py \
808 test/ganeti.utils.process_unittest.py \
809 test/ganeti.utils.retry_unittest.py \
810 test/ganeti.utils.text_unittest.py \
811 test/ganeti.utils.wrapper_unittest.py \
812 test/ganeti.utils.x509_unittest.py \
813 test/ganeti.utils_unittest.py \
814 test/ganeti.workerpool_unittest.py \
815 test/cfgupgrade_unittest.py \
816 test/docs_unittest.py \
817 test/pycurl_reset_unittest.py \
818 test/tempfile_fork_unittest.py
820 python_tests += test/ganeti.utils.io_unittest-runasroot.py
823 haskell_tests = htools/test
826 test/check-cert-expired_unittest.bash \
827 test/daemon-util_unittest.bash \
828 test/ganeti-cleaner_unittest.bash \
829 test/import-export_unittest.bash \
836 nodist_TESTS += $(haskell_tests)
837 dist_TESTS += htools/offline-test.sh
838 check_SCRIPTS += htools/htools-hpc
841 TESTS = $(dist_TESTS) $(nodist_TESTS)
843 # Environment for all tests
844 PLAIN_TESTS_ENVIRONMENT = \
845 PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) \
846 FAKEROOT=$(FAKEROOT_PATH) $(RUN_IN_TEMPDIR)
848 # Environment for tests run by automake
849 TESTS_ENVIRONMENT = \
850 $(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
853 $(dist_sbin_SCRIPTS) \
855 $(pkglib_python_scripts) \
856 $(nodist_pkglib_python_scripts) \
858 $(pkgpython_PYTHON) \
860 $(hypervisor_PYTHON) \
875 test/check-cert-expired_unittest.bash \
876 test/daemon-util_unittest.bash \
877 test/ganeti-cleaner_unittest.bash \
878 test/import-export_unittest.bash \
879 htools/offline-test.sh \
880 htools/cli-tests-defs.sh \
882 $(HS_LIB_SRCS) $(HS_PROG_SRCS)
884 check_python_code = \
885 $(BUILD_BASH_COMPLETION) \
893 ganeti/http/server.py \
894 $(dist_sbin_SCRIPTS) \
896 $(pkglib_python_scripts) \
897 $(BUILD_BASH_COMPLETION) \
903 standalone_python_modules = \
905 tools/ganeti-listrunner
909 ganeti/http/server.py \
910 $(dist_sbin_SCRIPTS) \
912 $(pkglib_python_scripts) \
913 $(BUILD_BASH_COMPLETION) \
916 $(PYTHON_BOOTSTRAP) \
919 test/daemon-util_unittest.bash: daemons/daemon-util
921 test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
923 tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
924 sed -f $(REPLACE_VARS_SED) < $< > $@
927 devel/upload: devel/upload.in $(REPLACE_VARS_SED)
928 sed -f $(REPLACE_VARS_SED) < $< > $@
931 daemons/%: daemons/%.in $(REPLACE_VARS_SED)
932 sed -f $(REPLACE_VARS_SED) < $< > $@
935 doc/examples/%: doc/examples/%.in $(REPLACE_VARS_SED)
936 sed -f $(REPLACE_VARS_SED) < $< > $@
938 doc/examples/hooks/%: doc/examples/hooks/%.in $(REPLACE_VARS_SED)
939 sed -f $(REPLACE_VARS_SED) < $< > $@
941 doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
942 lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin
943 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@
946 @test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
947 $(DOT) -Tpng -o $@ $<
949 man/footer.man: man/footer.rst
950 @test -n "$(PANDOC)" || \
951 { echo 'pandoc' not found during configure; exit 1; }
952 $(PANDOC) -f rst -t man -o $@ $<
954 man/footer.html: man/footer.rst
955 @test -n "$(PANDOC)" || \
956 { echo 'pandoc' not found during configure; exit 1; }
957 $(PANDOC) -f rst -t html -o $@ $<
959 man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py
960 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(DOCPP) < $< > $@
962 man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.man
963 @test -n "$(PANDOC)" || \
964 { echo 'pandoc' not found during configure; exit 1; }
966 trap 'echo auto-removing $@; rm $@' EXIT; \
967 $(PANDOC) -s -f rst -t man -A man/footer.man $< | \
968 sed -e 's/\\@/@/g' > $@; \
969 if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN_WARNINGS) $@; fi; \
970 $(CHECK_MAN_DASHES) $@; \
974 man/%.html.in: man/%.gen man/footer.html
975 @test -n "$(PANDOC)" || \
976 { echo 'pandoc' not found during configure; exit 1; }
978 $(PANDOC) -s -f rst -t html -A man/footer.html $< | \
979 sed -e 's/\\@/@/g' > $@
981 man/%.1: man/%.1.in $(REPLACE_VARS_SED)
982 sed -f $(REPLACE_VARS_SED) < $< > $@
984 man/%.7: man/%.7.in $(REPLACE_VARS_SED)
985 sed -f $(REPLACE_VARS_SED) < $< > $@
987 man/%.8: man/%.8.in $(REPLACE_VARS_SED)
988 sed -f $(REPLACE_VARS_SED) < $< > $@
990 man/%.html: man/%.html.in $(REPLACE_VARS_SED)
991 sed -f $(REPLACE_VARS_SED) < $< > $@
993 epydoc.conf: epydoc.conf.in Makefile
994 sed -e 's#@MODULES@#$(strip $(lint_python_code))#g' < $< > $@
997 if test -d .git; then \
999 elif test ! -f $@ ; then \
1000 echo "Cannot auto-generate $@ file"; exit 1; \
1003 .PHONY: regen-vcs-version
1007 if test -d .git; then \
1008 rm -f vcs-version; \
1009 $(MAKE) vcs-version; \
1012 htools/Ganeti/HTools/Version.hs: htools/Ganeti/HTools/Version.hs.in vcs-version
1014 VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
1015 sed -e "s/%ver%/$$VCSVER/" < $< > $@
1017 htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
1018 lib/constants.py lib/_autoconf.py $(CONVERT_CONSTANTS) \
1019 | lib/_vcsversion.py
1021 { cat $< ; PYTHONPATH=. $(CONVERT_CONSTANTS); } > $@
1023 lib/_autoconf.py: Makefile | lib/.dir
1025 { echo '# This file is automatically generated, do not edit!'; \
1028 echo '"""Build-time configuration for Ganeti.'; \
1030 echo 'This file is autogenerated by the build process.'; \
1031 echo 'For any changes you need to re-run ./configure (and'; \
1032 echo 'not edit by hand).'; \
1036 echo '# pylint: disable=C0301,C0324'; \
1037 echo '# because this is autogenerated, we do not want'; \
1038 echo '# style warnings' ; \
1040 echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
1041 echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
1042 echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
1043 echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
1044 echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
1045 echo "VERSION_FULL = '$(VERSION_FULL)'"; \
1046 echo "LOCALSTATEDIR = '$(localstatedir)'"; \
1047 echo "SYSCONFDIR = '$(sysconfdir)'"; \
1048 echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
1049 echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
1050 echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
1051 echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
1052 echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
1053 echo "XEN_INITRD = '$(XEN_INITRD)'"; \
1054 echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
1055 echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
1056 echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
1057 echo "ENABLE_SHARED_FILE_STORAGE = $(ENABLE_SHARED_FILE_STORAGE)"; \
1058 echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
1059 echo "KVM_PATH = '$(KVM_PATH)'"; \
1060 echo "IP_PATH = '$(IP_PATH)'"; \
1061 echo "SOCAT_PATH = '$(SOCAT)'"; \
1062 echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \
1063 echo "SOCAT_USE_COMPRESS = $(SOCAT_USE_COMPRESS)"; \
1064 echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
1065 echo "TOOLSDIR = '$(toolsdir)'"; \
1066 echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \
1067 echo "PKGLIBDIR = '$(pkglibdir)'"; \
1068 echo "DRBD_BARRIERS = '$(DRBD_BARRIERS)'"; \
1069 echo "DRBD_NO_META_FLUSH = $(DRBD_NO_META_FLUSH)"; \
1070 echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \
1071 echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
1072 echo "ADMIN_GROUP = '$(ADMIN_GROUP)'"; \
1073 echo "MASTERD_USER = '$(MASTERD_USER)'"; \
1074 echo "MASTERD_GROUP = '$(MASTERD_GROUP)'"; \
1075 echo "RAPI_USER = '$(RAPI_USER)'"; \
1076 echo "RAPI_GROUP = '$(RAPI_GROUP)'"; \
1077 echo "CONFD_USER = '$(CONFD_USER)'"; \
1078 echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
1079 echo "NODED_USER = '$(NODED_USER)'"; \
1080 echo "NODED_GROUP = '$(NODED_GROUP)'"; \
1081 echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
1082 echo "QEMUIMG_PATH = '$(QEMUIMG_PATH)'"; \
1083 if [ "$(HTOOLS)" ]; then \
1084 echo "HTOOLS = True"; \
1086 echo "HTOOLS = False"; \
1088 echo "ENABLE_CONFD = $(ENABLE_CONFD)"; \
1091 lib/_vcsversion.py: Makefile vcs-version | lib/.dir
1093 VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
1094 { echo '# This file is automatically generated, do not edit!'; \
1097 echo '"""Build-time VCS version number for Ganeti.'; \
1099 echo 'This file is autogenerated by the build process.'; \
1100 echo 'For any changes you need to re-run ./configure (and'; \
1101 echo 'not edit by hand).'; \
1105 echo '# pylint: disable=C0301,C0324'; \
1106 echo '# because this is autogenerated, we do not want'; \
1107 echo '# style warnings' ; \
1109 echo "VCS_VERSION = '$$VCSVER'"; \
1112 lib/_generated_rpc.py: lib/rpc_defs.py $(BUILD_RPC)
1113 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_RPC) lib/rpc_defs.py > $@
1115 $(REPLACE_VARS_SED): Makefile
1117 { echo 's#@PREFIX@#$(prefix)#g'; \
1118 echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
1119 echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
1120 echo 's#@BINDIR@#$(bindir)#g'; \
1121 echo 's#@SBINDIR@#$(sbindir)#g'; \
1122 echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
1123 echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \
1124 echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
1125 echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
1126 echo 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \
1127 echo 's#@CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \
1128 echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
1129 echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \
1130 echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
1131 echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \
1132 echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \
1133 echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \
1134 echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \
1135 echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
1136 echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
1137 echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
1138 echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
1139 echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
1140 echo 's#@CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \
1143 # Using deferred evaluation
1144 daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
1145 daemons/ganeti-watcher: MODULE = ganeti.watcher
1146 scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
1147 tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs
1149 $(PYTHON_BOOTSTRAP): Makefile | $(all_dirfiles)
1150 test -n "$(MODULE)" || { echo Missing module; exit 1; }
1152 { echo '#!/usr/bin/python'; \
1153 echo '# This file is automatically generated, do not edit!'; \
1154 echo "# Edit $(MODULE) instead."; \
1156 echo '"""Bootstrap script for L{$(MODULE)}"""'; \
1158 echo '# pylint: disable=C0103'; \
1159 echo '# C0103: Invalid name'; \
1161 echo 'import sys'; \
1162 echo 'import $(MODULE) as main'; \
1164 echo '# Temporarily alias commands until bash completion'; \
1165 echo '# generator is changed'; \
1166 echo 'if hasattr(main, "commands"):'; \
1167 echo ' commands = main.commands # pylint: disable=E1101'; \
1168 echo 'if hasattr(main, "aliases"):'; \
1169 echo ' aliases = main.aliases # pylint: disable=E1101'; \
1171 echo 'if __name__ == "__main__":'; \
1172 echo ' sys.exit(main.Main())'; \
1176 # We need to create symlinks because "make distcheck" will not install Python
1177 # files when building.
1178 stamp-srclinks: Makefile | $(all_dirfiles)
1180 for i in $(srclink_files); do \
1181 if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
1182 $(LN_S) $(abs_top_srcdir)/$$i $$i; \
1189 cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
1192 check-dirs: $(BUILT_SOURCES)
1194 find . -type d \( \( -name . \) -o \( \
1196 -name autom4te.cache \
1197 \) -prune -o -print \) | { \
1199 while read dir; do \
1201 $(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
1202 *) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
1205 for dir in $(DIRS); do \
1206 if ! test -d "$$dir"; then \
1207 echo "Directory $$dir listed in DIRS does not exist" >&2; \
1211 if test -n "$$error"; then exit 1; else exit 0; fi; \
1215 check-local: check-dirs $(BUILT_SOURCES)
1216 $(CHECK_PYTHON_CODE) $(check_python_code)
1217 PYTHONPATH=. $(CHECK_HEADER) $(check_python_code)
1218 $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
1219 $(CHECK_NEWS) < $(top_srcdir)/NEWS
1220 PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules)
1221 expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
1222 if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \
1223 echo "Incorrect version in README, expected $$expver"; \
1226 for file in doc/iallocator.rst doc/hooks.rst; do \
1227 if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
1228 "Documents Ganeti version $$expver"; then \
1229 echo "Incorrect version in $$file, expected $$expver"; \
1235 hs-check: htools/test htools/htools-hpc
1238 HBINARY="./htools/htools-hpc" ./htools/offline-test.sh
1240 # E111: indentation is not a multiple of four
1241 # E261: at least two spaces before inline comment
1242 # E501: line too long (80 characters)
1243 PEP8_IGNORE = E111,E261,E501
1245 # For excluding pep8 expects filenames only, not whole paths
1246 PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(BUILT_PYTHON_SOURCES))))
1249 lint: $(BUILT_SOURCES)
1250 @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
1251 if test -z "$(PEP8)"; then \
1252 echo '"pep8" not found during configure' >&2; \
1254 $(PEP8) --repeat --ignore='$(PEP8_IGNORE)' --exclude='$(PEP8_EXCLUDE)' \
1255 $(pep8_python_code); \
1257 $(PYLINT) $(LINT_OPTS) $(lint_python_code)
1258 cd $(top_srcdir)/qa && \
1259 PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
1260 --rcfile ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
1263 hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
1264 if tty -s; then C="-c"; else C=""; fi; \
1265 hlint --report=doc/hs-lint.html --cross $$C \
1266 --ignore "Use first" \
1267 --ignore "Use comparing" \
1269 --ignore "Use Control.Exception.catch" \
1270 --ignore "Reduce duplication" \
1271 --hint htools/lint-hints \
1272 $(filter-out htools/Ganeti/THH.hs,$(HS_LIB_SRCS))
1274 # a dist hook rule for updating the vcs-version file; this is
1275 # hardcoded due to where it needs to build the file...
1277 $(MAKE) regen-vcs-version && \
1278 rm -f $(top_distdir)/vcs-version && \
1279 cp -p $(srcdir)/vcs-version $(top_distdir)
1281 # a distcheck hook rule for catching revision control directories
1283 if find $(top_distdir) -name .svn -or -name .git | grep .; then \
1284 echo "Found revision control files in final archive." 1>&2; \
1287 if find $(top_distdir) -name '*.py[co]' | grep .; then \
1288 echo "Found Python byte code in final archive." 1>&2; \
1291 if find $(top_distdir) -name '*~' | grep .; then \
1292 echo "Found backup files in final archive." 1>&2; \
1295 # Empty files or directories should not be distributed. They can cause
1296 # unnecessary warnings for packagers. Directories used by automake during
1297 # distcheck must be excluded.
1298 if find $(top_distdir) -empty -and -not \( \
1299 -path $(top_distdir)/_build -or \
1300 -path $(top_distdir)/_inst \) | grep .; then \
1301 echo "Found empty files or directories in final archive." 1>&2; \
1304 if test -n "$(BUILD_RELEASE)" && \
1305 grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
1306 echo "Found unreleased version in NEWS." >&2; \
1310 # When building a release, stricter checks should be used
1311 distcheck-release dist-release: export BUILD_RELEASE = 1
1312 distcheck-release: distcheck
1316 for i in $(DIST_ARCHIVES); do \
1317 echo -n "Checking $$i ... "; \
1318 autotools/check-tar < $$i; \
1323 @mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
1324 "$(DESTDIR)${localstatedir}/log/ganeti" \
1325 "$(DESTDIR)${localstatedir}/run/ganeti"
1327 # To avoid conflicts between directory names and other targets, a file inside
1328 # the directory is used to ensure its existence.
1330 @mkdir_p@ $* && touch $@
1333 if WANT_HTOOLSAPIDOC
1334 apidoc: py-apidoc hs-apidoc
1340 py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
1341 $(RUN_IN_TEMPDIR) epydoc -v \
1342 --conf $(CURDIR)/epydoc.conf \
1343 --output $(CURDIR)/$(APIDOC_PY_DIR)
1346 hs-apidoc: $(HS_BUILT_SRCS)
1347 @test -n "$(HSCOLOUR)" || \
1348 { echo 'HsColour' not found during configure; exit 1; }
1349 @test -n "$(HADDOCK)" || \
1350 { echo 'haddock' not found during configure; exit 1; }
1351 rm -rf $(APIDOC_HS_DIR)/*
1352 @mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/HTools/Program
1353 @mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/Confd
1354 $(HSCOLOUR) -print-css > $(APIDOC_HS_DIR)/Ganeti/hscolour.css
1355 $(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css
1356 $(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/Confd/hscolour.css
1359 if [ "$(HTOOLS_NOCURL)" ]; \
1360 then OPTGHC="--optghc=$(HTOOLS_NOCURL)"; \
1363 if [ "$(HTOOLS_PARALLEL3)" ]; \
1364 then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_PARALLEL3)"; \
1366 RELSRCS="$(HS_LIB_SRCS:htools/%=%) $(HS_BUILT_SRCS:htools/%=%)"; \
1367 for file in $$RELSRCS; do \
1368 hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
1369 $(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \
1371 $(HADDOCK) --odir ../$(APIDOC_HS_DIR) --html --ignore-all-exports -w \
1372 -t ganeti-htools -p haddock-prologue \
1373 --source-module="%{MODULE/.//}.html" \
1374 --source-entity="%{MODULE/.//}.html#%{NAME}" \
1376 $(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
1379 TAGS: $(BUILT_SOURCES)
1381 find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
1382 -path './daemons/ganeti-*' -o -path './tools/*' -o \
1383 -path './qa/*.py' | \
1388 coverage: py-coverage hs-coverage
1390 coverage: py-coverage
1394 py-coverage: $(BUILT_SOURCES) $(python_tests)
1396 COVERAGE_FILE=$(CURDIR)/$(COVERAGE_PY_DIR)/data \
1397 TEXT_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR)/report.txt \
1398 HTML_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR) \
1399 $(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
1403 hs-coverage: $(haskell_tests) htools/htools-hpc
1404 rm -f *.tix && $(MAKE) hs-check
1405 @mkdir_p@ $(COVERAGE_HS_DIR)
1406 hpc combine $(HPCEXCL) test.tix htools-hpc.tix > htools-coverage.tix
1407 hpc markup --destdir=$(COVERAGE_HS_DIR) htools-coverage.tix
1408 hpc report htools-coverage.tix
1409 $(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html
1411 # Special "kind-of-QA" target for htools, needs special setup (all
1412 # tools compiled with -fhpc)
1417 rm -f .hpc; $(LN_S) ../.hpc .hpc; \
1418 rm -f *.tix *.mix; \
1420 hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:htools/%=%)) \
1421 --output=live-test.tix ; \
1422 @mkdir_p@ ../$(COVERAGE_HS_DIR) ; \
1423 hpc markup --destdir=../$(COVERAGE_HS_DIR) live-test \
1424 --srcdir=.. $(HPCEXCL) ; \
1425 hpc report --srcdir=.. live-test $(HPCEXCL)
1427 commit-check: distcheck lint apidoc
1429 -include ./Makefile.local