Show list of pending acquires in “gnt-debug locks”
[ganeti-local] / Makefile.am
index 1760479..859339c 100644 (file)
@@ -66,7 +66,8 @@ MAINTAINERCLEANFILES = \
        $(docpng) \
        $(maninput) \
        doc/install-quick.rst \
-       doc/news.rst
+       doc/news.rst \
+       vcs-version
 
 maintainer-clean-local:
        rm -rf $(BUILDTIME_DIRS)
@@ -263,6 +264,7 @@ dist_tools_SCRIPTS = \
        tools/cluster-merge \
        tools/lvmstrap \
        tools/move-instance \
+       tools/setup-ssh \
        tools/sanitize-config
 
 pkglib_python_scripts = \
@@ -376,7 +378,9 @@ python_tests = \
        test/ganeti.errors_unittest.py \
        test/ganeti.hooks_unittest.py \
        test/ganeti.http_unittest.py \
+       test/ganeti.hypervisor.hv_kvm_unittest.py \
        test/ganeti.impexpd_unittest.py \
+       test/ganeti.jqueue_unittest.py \
        test/ganeti.locking_unittest.py \
        test/ganeti.luxi_unittest.py \
        test/ganeti.masterd.instance_unittest.py \
@@ -387,6 +391,7 @@ python_tests = \
        test/ganeti.rapi.client_unittest.py \
        test/ganeti.rapi.resources_unittest.py \
        test/ganeti.rapi.rlib2_unittest.py \
+       test/ganeti.rpc_unittest.py \
        test/ganeti.serializer_unittest.py \
        test/ganeti.ssh_unittest.py \
        test/ganeti.uidpool_unittest.py \
@@ -482,7 +487,7 @@ man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
        @test -n "$(DOCBOOK2MAN)" || \
          { echo 'docbook2man' not found during configure; exit 1; }
        $(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
-       $(CHECK_MAN) $@
+       if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
 
 man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
        @test -n "$(DOCBOOK2HTML)" || \
@@ -498,8 +503,25 @@ man/%.8: man/%.8.in $(REPLACE_VARS_SED)
 man/%.html: man/%.html.in $(REPLACE_VARS_SED)
        sed -f $(REPLACE_VARS_SED) < $< > $@
 
-lib/_autoconf.py: Makefile stamp-directories
+vcs-version:
+       if test -d .git; then \
+         git describe > $@; \
+       elif test ! -f $@ ; then \
+         echo "Cannot auto-generate $@ file"; exit 1; \
+       fi
+
+.PHONY: regen-vcs-version
+regen-vcs-version:
        set -e; \
+       cd $(srcdir); \
+       if test -d .git; then \
+         rm -f vcs-version; \
+         $(MAKE) vcs-version; \
+       fi
+
+lib/_autoconf.py: Makefile stamp-directories vcs-version
+       set -e; \
+       VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
        { echo '# This file is automatically generated, do not edit!'; \
          echo '#'; \
          echo ''; \
@@ -544,6 +566,7 @@ lib/_autoconf.py: Makefile stamp-directories
          echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
          echo "MASTERD_USER = '$(MASTERD_USER)'"; \
          echo "RAPI_USER = '$(RAPI_USER)'"; \
+         echo "VCS_VERSION = '$$VCSVER'"; \
        } > $@
 
 $(REPLACE_VARS_SED): Makefile
@@ -617,7 +640,14 @@ lint: ganeti $(BUILT_SOURCES)
        @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
        $(PYLINT) $(LINT_OPTS) $(lint_python_code)
 
-# a dist hook rule for catching revision control directories
+# a dist hook rule for updating the vcs-version file; this is
+# hardcoded due to where it needs to build the file...
+dist-hook:
+       $(MAKE) regen-vcs-version && \
+       rm -f $(top_distdir)/vcs-version && \
+       cp -p $(srcdir)/vcs-version $(top_distdir)
+
+# a distcheck hook rule for catching revision control directories
 distcheck-hook:
        if find $(top_distdir) -name .svn -or -name .git | grep .; then \
                echo "Found revision control files in final archive." 1>&2; \
@@ -651,9 +681,10 @@ apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES)
 .PHONY: TAGS
 TAGS: $(BUILT_SOURCES)
        rm -f TAGS
-       find . -path './lib/*.py' -o -path 'scripts/gnt-*' -o \
-         -path 'daemons/ganeti-*' -o -path 'tools/*' | \
-         etags -
+       find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
+         -path './daemons/ganeti-*' -o -path './tools/*' -o \
+         -path './qa/*.py' | \
+         etags -l python -
 
 .PHONY: coverage
 coverage: $(BUILT_SOURCES) $(python_tests)