Revision 3add7574 Makefile.am
b/Makefile.am | ||
---|---|---|
55 | 55 |
.DELETE_ON_ERROR: |
56 | 56 |
|
57 | 57 |
HTOOLS_DIRS = \ |
58 |
htools \
|
|
59 |
htools/Ganeti \
|
|
60 |
htools/Ganeti/Block \
|
|
61 |
htools/Ganeti/Block/Drbd \
|
|
62 |
htools/Ganeti/Confd \
|
|
63 |
htools/Ganeti/DataCollectors \
|
|
64 |
htools/Ganeti/HTools \
|
|
65 |
htools/Ganeti/HTools/Backend \
|
|
66 |
htools/Ganeti/HTools/Program \
|
|
67 |
htools/Ganeti/Query \
|
|
58 |
src \
|
|
59 |
src/Ganeti \
|
|
60 |
src/Ganeti/Block \
|
|
61 |
src/Ganeti/Block/Drbd \
|
|
62 |
src/Ganeti/Confd \
|
|
63 |
src/Ganeti/DataCollectors \
|
|
64 |
src/Ganeti/HTools \
|
|
65 |
src/Ganeti/HTools/Backend \
|
|
66 |
src/Ganeti/HTools/Program \
|
|
67 |
src/Ganeti/Query \
|
|
68 | 68 |
htest \ |
69 | 69 |
htest/Test \ |
70 | 70 |
htest/Test/Ganeti \ |
... | ... | |
182 | 182 |
$(nodist_pkgpython_PYTHON) \ |
183 | 183 |
$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \ |
184 | 184 |
$(HS_BUILT_TEST_HELPERS) \ |
185 |
htools/ganeti-confd \
|
|
186 |
.hpc/*.mix htools/*.tix htest/*.tix \
|
|
185 |
src/ganeti-confd \
|
|
186 |
.hpc/*.mix src/*.tix htest/*.tix \
|
|
187 | 187 |
doc/hs-lint.html |
188 | 188 |
|
189 | 189 |
GENERATED_FILES = \ |
... | ... | |
195 | 195 |
if WANT_HTOOLS |
196 | 196 |
HTOOLS_GENERATED_FILES += $(HS_PROGS) |
197 | 197 |
if ENABLE_CONFD |
198 |
HTOOLS_GENERATED_FILES += htools/hconfd htools/ganeti-confd
|
|
198 |
HTOOLS_GENERATED_FILES += src/hconfd src/ganeti-confd
|
|
199 | 199 |
endif |
200 | 200 |
endif |
201 | 201 |
|
... | ... | |
408 | 408 |
doc/virtual-cluster.rst \ |
409 | 409 |
doc/walkthrough.rst |
410 | 410 |
|
411 |
HS_PROGS = htools/htools htools/mon-collector
|
|
411 |
HS_PROGS = src/htools src/mon-collector
|
|
412 | 412 |
HS_BIN_ROLES = hbal hscan hspace hinfo hcheck hroller |
413 | 413 |
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail |
414 | 414 |
|
... | ... | |
417 | 417 |
htest/hpc-htools \ |
418 | 418 |
htest/hpc-mon-collector \ |
419 | 419 |
htest/test \ |
420 |
htools/hconfd \
|
|
421 |
htools/rpc-test
|
|
420 |
src/hconfd \
|
|
421 |
src/rpc-test
|
|
422 | 422 |
|
423 | 423 |
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS)) |
424 | 424 |
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=htest/%) htest/hail |
425 | 425 |
|
426 | 426 |
HFLAGS = \ |
427 |
-O -Wall -Werror -ihtools \
|
|
427 |
-O -Wall -Werror -isrc \
|
|
428 | 428 |
-fwarn-monomorphism-restriction \ |
429 | 429 |
-fwarn-tabs \ |
430 | 430 |
$(GHC_BYVERSION_FLAGS) |
... | ... | |
444 | 444 |
--exclude Test.Ganeti.TestHTools \ |
445 | 445 |
--exclude Test.Ganeti.TestHelper \ |
446 | 446 |
--exclude Test.Ganeti.TestImports \ |
447 |
$(patsubst htools.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(HS_LIB_SRCS))))
|
|
447 |
$(patsubst src.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(HS_LIB_SRCS))))
|
|
448 | 448 |
|
449 | 449 |
HS_LIB_SRCS = \ |
450 |
htools/Ganeti/Block/Drbd/Types.hs \
|
|
451 |
htools/Ganeti/Block/Drbd/Parser.hs \
|
|
452 |
htools/Ganeti/BasicTypes.hs \
|
|
453 |
htools/Ganeti/Common.hs \
|
|
454 |
htools/Ganeti/Compat.hs \
|
|
455 |
htools/Ganeti/Confd/Client.hs \
|
|
456 |
htools/Ganeti/Confd/Server.hs \
|
|
457 |
htools/Ganeti/Confd/Types.hs \
|
|
458 |
htools/Ganeti/Confd/Utils.hs \
|
|
459 |
htools/Ganeti/Config.hs \
|
|
460 |
htools/Ganeti/Daemon.hs \
|
|
461 |
htools/Ganeti/DataCollectors/CLI.hs \
|
|
462 |
htools/Ganeti/DataCollectors/Drbd.hs \
|
|
463 |
htools/Ganeti/DataCollectors/Program.hs \
|
|
464 |
htools/Ganeti/Errors.hs \
|
|
465 |
htools/Ganeti/HTools/Backend/IAlloc.hs \
|
|
466 |
htools/Ganeti/HTools/Backend/Luxi.hs \
|
|
467 |
htools/Ganeti/HTools/Backend/Rapi.hs \
|
|
468 |
htools/Ganeti/HTools/Backend/Simu.hs \
|
|
469 |
htools/Ganeti/HTools/Backend/Text.hs \
|
|
470 |
htools/Ganeti/HTools/CLI.hs \
|
|
471 |
htools/Ganeti/HTools/Cluster.hs \
|
|
472 |
htools/Ganeti/HTools/Container.hs \
|
|
473 |
htools/Ganeti/HTools/ExtLoader.hs \
|
|
474 |
htools/Ganeti/HTools/Graph.hs \
|
|
475 |
htools/Ganeti/HTools/Group.hs \
|
|
476 |
htools/Ganeti/HTools/Instance.hs \
|
|
477 |
htools/Ganeti/HTools/Loader.hs \
|
|
478 |
htools/Ganeti/HTools/Node.hs \
|
|
479 |
htools/Ganeti/HTools/PeerMap.hs \
|
|
480 |
htools/Ganeti/HTools/Program.hs \
|
|
481 |
htools/Ganeti/HTools/Program/Hail.hs \
|
|
482 |
htools/Ganeti/HTools/Program/Hbal.hs \
|
|
483 |
htools/Ganeti/HTools/Program/Hcheck.hs \
|
|
484 |
htools/Ganeti/HTools/Program/Hinfo.hs \
|
|
485 |
htools/Ganeti/HTools/Program/Hscan.hs \
|
|
486 |
htools/Ganeti/HTools/Program/Hspace.hs \
|
|
487 |
htools/Ganeti/HTools/Program/Hroller.hs \
|
|
488 |
htools/Ganeti/HTools/Types.hs \
|
|
489 |
htools/Ganeti/Hash.hs \
|
|
490 |
htools/Ganeti/JQueue.hs \
|
|
491 |
htools/Ganeti/JSON.hs \
|
|
492 |
htools/Ganeti/Jobs.hs \
|
|
493 |
htools/Ganeti/Logging.hs \
|
|
494 |
htools/Ganeti/Luxi.hs \
|
|
495 |
htools/Ganeti/Network.hs \
|
|
496 |
htools/Ganeti/Objects.hs \
|
|
497 |
htools/Ganeti/OpCodes.hs \
|
|
498 |
htools/Ganeti/OpParams.hs \
|
|
499 |
htools/Ganeti/Path.hs \
|
|
500 |
htools/Ganeti/Query/Common.hs \
|
|
501 |
htools/Ganeti/Query/Filter.hs \
|
|
502 |
htools/Ganeti/Query/Group.hs \
|
|
503 |
htools/Ganeti/Query/Job.hs \
|
|
504 |
htools/Ganeti/Query/Language.hs \
|
|
505 |
htools/Ganeti/Query/Node.hs \
|
|
506 |
htools/Ganeti/Query/Query.hs \
|
|
507 |
htools/Ganeti/Query/Server.hs \
|
|
508 |
htools/Ganeti/Query/Types.hs \
|
|
509 |
htools/Ganeti/Rpc.hs \
|
|
510 |
htools/Ganeti/Runtime.hs \
|
|
511 |
htools/Ganeti/Ssconf.hs \
|
|
512 |
htools/Ganeti/THH.hs \
|
|
513 |
htools/Ganeti/Types.hs \
|
|
514 |
htools/Ganeti/Utils.hs
|
|
450 |
src/Ganeti/Block/Drbd/Types.hs \
|
|
451 |
src/Ganeti/Block/Drbd/Parser.hs \
|
|
452 |
src/Ganeti/BasicTypes.hs \
|
|
453 |
src/Ganeti/Common.hs \
|
|
454 |
src/Ganeti/Compat.hs \
|
|
455 |
src/Ganeti/Confd/Client.hs \
|
|
456 |
src/Ganeti/Confd/Server.hs \
|
|
457 |
src/Ganeti/Confd/Types.hs \
|
|
458 |
src/Ganeti/Confd/Utils.hs \
|
|
459 |
src/Ganeti/Config.hs \
|
|
460 |
src/Ganeti/Daemon.hs \
|
|
461 |
src/Ganeti/DataCollectors/CLI.hs \
|
|
462 |
src/Ganeti/DataCollectors/Drbd.hs \
|
|
463 |
src/Ganeti/DataCollectors/Program.hs \
|
|
464 |
src/Ganeti/Errors.hs \
|
|
465 |
src/Ganeti/HTools/Backend/IAlloc.hs \
|
|
466 |
src/Ganeti/HTools/Backend/Luxi.hs \
|
|
467 |
src/Ganeti/HTools/Backend/Rapi.hs \
|
|
468 |
src/Ganeti/HTools/Backend/Simu.hs \
|
|
469 |
src/Ganeti/HTools/Backend/Text.hs \
|
|
470 |
src/Ganeti/HTools/CLI.hs \
|
|
471 |
src/Ganeti/HTools/Cluster.hs \
|
|
472 |
src/Ganeti/HTools/Container.hs \
|
|
473 |
src/Ganeti/HTools/ExtLoader.hs \
|
|
474 |
src/Ganeti/HTools/Graph.hs \
|
|
475 |
src/Ganeti/HTools/Group.hs \
|
|
476 |
src/Ganeti/HTools/Instance.hs \
|
|
477 |
src/Ganeti/HTools/Loader.hs \
|
|
478 |
src/Ganeti/HTools/Node.hs \
|
|
479 |
src/Ganeti/HTools/PeerMap.hs \
|
|
480 |
src/Ganeti/HTools/Program.hs \
|
|
481 |
src/Ganeti/HTools/Program/Hail.hs \
|
|
482 |
src/Ganeti/HTools/Program/Hbal.hs \
|
|
483 |
src/Ganeti/HTools/Program/Hcheck.hs \
|
|
484 |
src/Ganeti/HTools/Program/Hinfo.hs \
|
|
485 |
src/Ganeti/HTools/Program/Hscan.hs \
|
|
486 |
src/Ganeti/HTools/Program/Hspace.hs \
|
|
487 |
src/Ganeti/HTools/Program/Hroller.hs \
|
|
488 |
src/Ganeti/HTools/Types.hs \
|
|
489 |
src/Ganeti/Hash.hs \
|
|
490 |
src/Ganeti/JQueue.hs \
|
|
491 |
src/Ganeti/JSON.hs \
|
|
492 |
src/Ganeti/Jobs.hs \
|
|
493 |
src/Ganeti/Logging.hs \
|
|
494 |
src/Ganeti/Luxi.hs \
|
|
495 |
src/Ganeti/Network.hs \
|
|
496 |
src/Ganeti/Objects.hs \
|
|
497 |
src/Ganeti/OpCodes.hs \
|
|
498 |
src/Ganeti/OpParams.hs \
|
|
499 |
src/Ganeti/Path.hs \
|
|
500 |
src/Ganeti/Query/Common.hs \
|
|
501 |
src/Ganeti/Query/Filter.hs \
|
|
502 |
src/Ganeti/Query/Group.hs \
|
|
503 |
src/Ganeti/Query/Job.hs \
|
|
504 |
src/Ganeti/Query/Language.hs \
|
|
505 |
src/Ganeti/Query/Node.hs \
|
|
506 |
src/Ganeti/Query/Query.hs \
|
|
507 |
src/Ganeti/Query/Server.hs \
|
|
508 |
src/Ganeti/Query/Types.hs \
|
|
509 |
src/Ganeti/Rpc.hs \
|
|
510 |
src/Ganeti/Runtime.hs \
|
|
511 |
src/Ganeti/Ssconf.hs \
|
|
512 |
src/Ganeti/THH.hs \
|
|
513 |
src/Ganeti/Types.hs \
|
|
514 |
src/Ganeti/Utils.hs
|
|
515 | 515 |
|
516 | 516 |
HS_TEST_SRCS = \ |
517 | 517 |
htest/Test/Ganeti/Attoparsec.hs \ |
... | ... | |
557 | 557 |
|
558 | 558 |
HS_BUILT_SRCS = \ |
559 | 559 |
htest/Test/Ganeti/TestImports.hs \ |
560 |
htools/Ganeti/Constants.hs \
|
|
561 |
htools/Ganeti/Version.hs
|
|
560 |
src/Ganeti/Constants.hs \
|
|
561 |
src/Ganeti/Version.hs
|
|
562 | 562 |
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS)) |
563 | 563 |
|
564 | 564 |
$(RUN_IN_TEMPDIR): | stamp-directories |
... | ... | |
658 | 658 |
|
659 | 659 |
bin_SCRIPTS = |
660 | 660 |
if WANT_HTOOLS |
661 |
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
|
|
661 |
bin_SCRIPTS += $(filter-out src/hail,$(HS_PROGS))
|
|
662 | 662 |
install-exec-hook: |
663 | 663 |
@mkdir_p@ $(DESTDIR)$(iallocatorsdir) |
664 | 664 |
# FIXME: this is a hardcoded logic, instead of auto-resolving |
... | ... | |
725 | 725 |
daemons/ganeti-cleaner |
726 | 726 |
|
727 | 727 |
if ENABLE_CONFD |
728 |
htools/ganeti-confd: htools/hconfd
|
|
728 |
src/ganeti-confd: src/hconfd
|
|
729 | 729 |
cp -f $< $@ |
730 | 730 |
|
731 |
nodist_sbin_SCRIPTS += htools/ganeti-confd
|
|
731 |
nodist_sbin_SCRIPTS += src/ganeti-confd
|
|
732 | 732 |
endif |
733 | 733 |
|
734 | 734 |
python_scripts = \ |
... | ... | |
770 | 770 |
daemons/daemon-util \ |
771 | 771 |
tools/kvm-ifup \ |
772 | 772 |
$(pkglib_python_scripts) \ |
773 |
htools/mon-collector
|
|
773 |
src/mon-collector
|
|
774 | 774 |
|
775 | 775 |
nodist_myexeclib_SCRIPTS = \ |
776 | 776 |
$(nodist_pkglib_python_scripts) |
... | ... | |
826 | 826 |
$(qa_scripts) \ |
827 | 827 |
$(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS_IN) \ |
828 | 828 |
$(HS_PROG_SRCS) \ |
829 |
htools/lint-hints.hs \
|
|
829 |
src/lint-hints.hs \
|
|
830 | 830 |
htest/cli-tests-defs.sh \ |
831 | 831 |
htest/offline-test.sh \ |
832 | 832 |
.ghci |
... | ... | |
1252 | 1252 |
fi; \ |
1253 | 1253 |
fi |
1254 | 1254 |
|
1255 |
htools/Ganeti/Version.hs: htools/Ganeti/Version.hs.in \
|
|
1255 |
src/Ganeti/Version.hs: src/Ganeti/Version.hs.in \
|
|
1256 | 1256 |
vcs-version $(built_base_sources) |
1257 | 1257 |
set -e; \ |
1258 | 1258 |
VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \ |
1259 | 1259 |
sed -e "s/%ver%/$$VCSVER/" < $< > $@ |
1260 | 1260 |
|
1261 |
htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
|
|
1261 |
src/Ganeti/Constants.hs: src/Ganeti/Constants.hs.in \
|
|
1262 | 1262 |
lib/constants.py lib/_autoconf.py lib/luxi.py lib/errors.py \ |
1263 | 1263 |
lib/jstore.py $(RUN_IN_TEMPDIR)\ |
1264 | 1264 |
$(CONVERT_CONSTANTS) $(built_base_sources) \ |
... | ... | |
1273 | 1273 |
set -e; \ |
1274 | 1274 |
{ cat $< ; \ |
1275 | 1275 |
echo ; \ |
1276 |
for name in $(filter-out Ganeti.THH,$(subst /,.,$(patsubst %.hs,%,$(patsubst htools/%,%,$(HS_LIB_SRCS))))) ; do \
|
|
1276 |
for name in $(filter-out Ganeti.THH,$(subst /,.,$(patsubst %.hs,%,$(patsubst src/%,%,$(HS_LIB_SRCS))))) ; do \
|
|
1277 | 1277 |
echo "import $$name ()" ; \ |
1278 | 1278 |
done ; \ |
1279 | 1279 |
} > $@ |
... | ... | |
1604 | 1604 |
--repeat $(pep8_python_code) |
1605 | 1605 |
|
1606 | 1606 |
# FIXME: remove ignore "Use void" when GHC 6.x is deprecated |
1607 |
HLINT_EXCLUDES = htools/Ganeti/THH.hs htest/hpc-htools.hs
|
|
1607 |
HLINT_EXCLUDES = src/Ganeti/THH.hs htest/hpc-htools.hs
|
|
1608 | 1608 |
.PHONY: hlint |
1609 |
hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
|
|
1609 |
hlint: $(HS_BUILT_SRCS) src/lint-hints.hs
|
|
1610 | 1610 |
@test -n "$(HLINT)" || { echo 'hlint' not found during configure; exit 1; } |
1611 | 1611 |
if tty -s; then C="-c"; else C=""; fi; \ |
1612 | 1612 |
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \ |
... | ... | |
1614 | 1614 |
--ignore "Use &&&" \ |
1615 | 1615 |
--ignore "Use void" \ |
1616 | 1616 |
--ignore "Reduce duplication" \ |
1617 |
--hint htools/lint-hints \
|
|
1617 |
--hint src/lint-hints \
|
|
1618 | 1618 |
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)) |
1619 | 1619 |
|
1620 | 1620 |
# a dist hook rule for updating the vcs-version file; this is |
... | ... | |
1711 | 1711 |
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/HTools/hscolour.css |
1712 | 1712 |
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/Confd/hscolour.css |
1713 | 1713 |
set -e ; \ |
1714 |
cd htools; \
|
|
1714 |
cd src; \
|
|
1715 | 1715 |
if [ "$(HTOOLS_NOCURL)" ]; \ |
1716 | 1716 |
then OPTGHC="--optghc=$(HTOOLS_NOCURL)"; \ |
1717 | 1717 |
else OPTGHC=""; \ |
... | ... | |
1722 | 1722 |
if [ "$(HTOOLS_REGEX_PCRE)" ]; \ |
1723 | 1723 |
then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_REGEX_PCRE)"; \ |
1724 | 1724 |
fi; \ |
1725 |
RELSRCS="$(HS_LIB_SRCS:htools/%=%) $(patsubst htools/%,%,$(filter htools/%,$(HS_BUILT_SRCS)))"; \
|
|
1725 |
RELSRCS="$(HS_LIB_SRCS:src/%=%) $(patsubst src/%,%,$(filter src/%,$(HS_BUILT_SRCS)))"; \
|
|
1726 | 1726 |
for file in $$RELSRCS; do \ |
1727 | 1727 |
hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \ |
1728 | 1728 |
$(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \ |
... | ... | |
1732 | 1732 |
--source-module="%{MODULE/.//}.html" \ |
1733 | 1733 |
--source-entity="%{MODULE/.//}.html#%{NAME}" \ |
1734 | 1734 |
$$OPTGHC \ |
1735 |
$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:htools/%=%))
|
|
1735 |
$(filter-out Ganeti/HTools/ExtLoader.hs,$(HS_LIB_SRCS:src/%=%))
|
|
1736 | 1736 |
|
1737 | 1737 |
.PHONY: TAGS |
1738 | 1738 |
TAGS: $(GENERATED_FILES) |
... | ... | |
1781 | 1781 |
.PHONY: live-test |
1782 | 1782 |
live-test: all |
1783 | 1783 |
set -e ; \ |
1784 |
cd htools; \
|
|
1784 |
cd src; \
|
|
1785 | 1785 |
rm -f .hpc; $(LN_S) ../.hpc .hpc; \ |
1786 | 1786 |
rm -f *.tix *.mix; \ |
1787 | 1787 |
./live-test.sh; \ |
1788 |
hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:htools/%=%)) \
|
|
1788 |
hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:src/%=%)) \
|
|
1789 | 1789 |
--output=live-test.tix ; \ |
1790 | 1790 |
@mkdir_p@ ../$(COVERAGE_HS_DIR) ; \ |
1791 | 1791 |
hpc markup --destdir=../$(COVERAGE_HS_DIR) live-test \ |
Also available in: Unified diff