$(docpng) \
$(maninput) \
doc/install-quick.rst \
- doc/news.rst
+ doc/news.rst \
+ vcs-version
maintainer-clean-local:
rm -rf $(BUILDTIME_DIRS)
tools/cluster-merge \
tools/lvmstrap \
tools/move-instance \
+ tools/setup-ssh \
tools/sanitize-config
pkglib_python_scripts = \
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 ''; \
echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \
echo "MASTERD_USER = '$(MASTERD_USER)'"; \
echo "RAPI_USER = '$(RAPI_USER)'"; \
+ echo "VCS_VERSION = '$$VCSVER'"; \
} > $@
$(REPLACE_VARS_SED): Makefile
@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; \
.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)