Make htools/Ganeti/Constants.hs depend on errors.py
[ganeti-local] / Makefile.am
index a6a528a..08f1e5b 100644 (file)
@@ -332,6 +332,8 @@ server_PYTHON = \
 pytools_PYTHON = \
        lib/tools/__init__.py \
        lib/tools/ensure_dirs.py \
+       lib/tools/node_cleanup.py \
+       lib/tools/node_daemon_setup.py \
        lib/tools/prepare_node_join.py
 
 utils_PYTHON = \
@@ -460,6 +462,7 @@ HS_LIB_SRCS = \
        htools/Ganeti/HTools/Cluster.hs \
        htools/Ganeti/HTools/Container.hs \
        htools/Ganeti/HTools/ExtLoader.hs \
+       htools/Ganeti/HTools/Graph.hs \
        htools/Ganeti/HTools/Group.hs \
        htools/Ganeti/HTools/Instance.hs \
        htools/Ganeti/HTools/Loader.hs \
@@ -511,6 +514,7 @@ HS_TEST_SRCS = \
        htest/Test/Ganeti/HTools/CLI.hs \
        htest/Test/Ganeti/HTools/Cluster.hs \
        htest/Test/Ganeti/HTools/Container.hs \
+       htest/Test/Ganeti/HTools/Graph.hs \
        htest/Test/Ganeti/HTools/Instance.hs \
        htest/Test/Ganeti/HTools/Loader.hs \
        htest/Test/Ganeti/HTools/Node.hs \
@@ -614,6 +618,8 @@ PYTHON_BOOTSTRAP_SBIN = \
 PYTHON_BOOTSTRAP = \
        $(PYTHON_BOOTSTRAP_SBIN) \
        tools/ensure-dirs \
+       tools/node-cleanup \
+       tools/node-daemon-setup \
        tools/prepare-node-join
 
 qa_scripts = \
@@ -716,7 +722,11 @@ dist_tools_SCRIPTS = \
        tools/master-ip-setup \
        tools/xen-console-wrapper
 
+nodist_tools_python_scripts = \
+       tools/node-cleanup
+
 nodist_tools_SCRIPTS = \
+       $(nodist_tools_python_scripts) \
        tools/vcluster-setup
 
 pkglib_python_scripts = \
@@ -725,6 +735,7 @@ pkglib_python_scripts = \
 
 nodist_pkglib_python_scripts = \
        tools/ensure-dirs \
+       tools/node-daemon-setup \
        tools/prepare-node-join
 
 myexeclib_SCRIPTS = \
@@ -968,6 +979,7 @@ python_tests = \
        test/ganeti.ssh_unittest.py \
        test/ganeti.storage_unittest.py \
        test/ganeti.tools.ensure_dirs_unittest.py \
+       test/ganeti.tools.node_daemon_setup_unittest.py \
        test/ganeti.tools.prepare_node_join_unittest.py \
        test/ganeti.uidpool_unittest.py \
        test/ganeti.utils.algo_unittest.py \
@@ -1028,6 +1040,7 @@ all_python_code = \
        $(python_scripts) \
        $(pkglib_python_scripts) \
        $(nodist_pkglib_python_scripts) \
+       $(nodist_tools_python_scripts) \
        $(python_tests) \
        $(pkgpython_PYTHON) \
        $(client_PYTHON) \
@@ -1206,7 +1219,7 @@ htools/Ganeti/Version.hs: htools/Ganeti/Version.hs.in \
        sed -e "s/%ver%/$$VCSVER/" < $< > $@
 
 htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
-       lib/constants.py lib/_autoconf.py lib/luxi.py \
+       lib/constants.py lib/_autoconf.py lib/luxi.py lib/errors.py \
        $(CONVERT_CONSTANTS) $(built_base_sources) \
        | lib/_vcsversion.py
        set -e; \
@@ -1371,7 +1384,9 @@ daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@))
 daemons/ganeti-watcher: MODULE = ganeti.watcher
 scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@))
 tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs
+tools/node-daemon-setup: MODULE = ganeti.tools.node_daemon_setup
 tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join
+tools/node-cleanup: MODULE = ganeti.tools.node_cleanup
 $(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst htest/%,%,$@)
 
 $(PYTHON_BOOTSTRAP): Makefile | stamp-directories
@@ -1539,6 +1554,7 @@ pep8: $(GENERATED_FILES)
          --repeat $(pep8_python_code)
 
 # FIXME: remove ignore "Use void" when GHC 6.x is deprecated
+HLINT_EXCLUDES = htools/Ganeti/THH.hs htest/hpc-htools.hs
 .PHONY: hlint
 hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
        @test -n "$(HLINT)" || { echo 'hlint' not found during configure; exit 1; }
@@ -1551,7 +1567,7 @@ hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
          --ignore "Use &&&" \
          --ignore "Use void" \
          --hint htools/lint-hints \
-         $(filter-out htools/Ganeti/THH.hs,$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS))
+         $(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS))
 
 # a dist hook rule for updating the vcs-version file; this is
 # hardcoded due to where it needs to build the file...
@@ -1628,6 +1644,7 @@ endif
 
 .PHONY: py-apidoc
 py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(GENERATED_FILES)
+       env - PATH="$$PATH" PYTHONPATH="$$PYTHONPATH" \
        $(RUN_IN_TEMPDIR) epydoc -v \
          --conf $(CURDIR)/epydoc.conf \
          --output $(CURDIR)/$(APIDOC_PY_DIR)
@@ -1740,7 +1757,7 @@ gitignore-check:
 # Target that builds all binaries (including those that are not
 # rebuilt except when running the tests)
 .PHONY: really-all
-really-all: all $(check_SCRIPTS) $(haskell_tests)
+really-all: all $(check_SCRIPTS) $(haskell_tests) $(HS_ALL_PROGS)
 
 # we don't need the ancient implicit rules:
 %: %,v