abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+# Use bash in order to be able to use pipefail
+SHELL=/bin/bash
+
ACLOCAL_AMFLAGS = -I autotools
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
CHECK_MAN = $(top_srcdir)/autotools/check-man
CHECK_VERSION = $(top_srcdir)/autotools/check-version
CHECK_NEWS = $(top_srcdir)/autotools/check-news
+DOCPP = $(top_srcdir)/autotools/docpp
REPLACE_VARS_SED = autotools/replace_vars.sed
clientdir = $(pkgpythondir)/client
lib/_autoconf.py
noinst_PYTHON = \
- lib/build/__init__.py
+ lib/build/__init__.py \
+ lib/build/sphinx_ext.py
pkgpython_PYTHON = \
lib/__init__.py \
doc/design-2.2.rst \
doc/design-2.3.rst \
doc/design-2.4.rst \
+ doc/design-draft.rst \
doc/design-oob.rst \
doc/design-query2.rst \
doc/cluster-merge.rst \
+ doc/design-shared-storage.rst \
doc/devnotes.rst \
doc/glossary.rst \
doc/hooks.rst \
$(RUN_IN_TEMPDIR): | $(all_dirfiles)
+# Note: we use here an order-only prerequisite, as the contents of
+# _autoconf.py are not actually influencing the html build output: it
+# has to exist in order for the sphinx module to be loaded
+# successfully, but we certainly don't want the docs to be rebuilt if
+# it changes
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
- $(RUN_IN_TEMPDIR)
+ $(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
+ | lib/_autoconf.py
@test -n "$(SPHINX)" || \
{ echo 'sphinx-build' not found during configure; exit 1; }
@mkdir_p@ $(dir $@)
autotools/build-bash-completion \
autotools/check-python-code \
autotools/check-man \
+ autotools/check-news \
autotools/check-tar \
autotools/check-version \
+ autotools/docpp \
autotools/gen-coverage \
autotools/testrunner \
$(RUN_IN_TEMPDIR) \
doc/examples/ganeti-kvm-poweroff.initd.in \
doc/examples/ganeti.cron.in \
doc/examples/gnt-config-backup.in \
- doc/examples/dumb-allocator \
doc/examples/ganeti.default \
doc/examples/ganeti.default-debug \
doc/examples/hooks/ethers \
manrst = $(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS)))
manhtml = $(patsubst %.rst,%.html,$(manrst))
+mangen = $(patsubst %.rst,%.gen,$(manrst))
maninput = \
$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
$(patsubst %.html,%.html.in,$(manhtml)) \
- man/footer.man man/footer.html
+ man/footer.man man/footer.html $(mangen)
TEST_FILES = \
test/data/bdev-drbd-8.0.txt \
test/ganeti.backend_unittest.py \
test/ganeti.bdev_unittest.py \
test/ganeti.cli_unittest.py \
+ test/ganeti.client.gnt_cluster_unittest.py \
test/ganeti.client.gnt_instance_unittest.py \
test/ganeti.daemon_unittest.py \
test/ganeti.cmdlib_unittest.py \
test/ganeti.utils.filelock_unittest.py \
test/ganeti.utils.hash_unittest.py \
test/ganeti.utils.io_unittest.py \
+ test/ganeti.utils.log_unittest.py \
test/ganeti.utils.mlock_unittest.py \
test/ganeti.utils.nodesetup_unittest.py \
test/ganeti.utils.process_unittest.py \
check_python_code = \
$(BUILD_BASH_COMPLETION) \
+ $(DOCPP) \
$(all_python_code)
lint_python_code = \
$(dist_tools_SCRIPTS) \
$(pkglib_python_scripts) \
$(BUILD_BASH_COMPLETION) \
+ $(DOCPP) \
$(PYTHON_BOOTSTRAP)
test/daemon-util_unittest.bash: daemons/daemon-util
{ echo 'pandoc' not found during configure; exit 1; }
$(PANDOC) -f rst -t html -o $@ $<
-man/%.7.in man/%.8.in: man/%.rst man/footer.man
+man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py
+ PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(DOCPP) < $< > $@
+
+man/%.7.in man/%.8.in: man/%.gen man/footer.man
@test -n "$(PANDOC)" || \
{ echo 'pandoc' not found during configure; exit 1; }
+ set -o pipefail ; \
$(PANDOC) -s -f rst -t man -A man/footer.man $< | \
sed -e 's/\\@/@/g' > $@
if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
-man/%.html.in: man/%.rst man/footer.html
+man/%.html.in: man/%.gen man/footer.html
@test -n "$(PANDOC)" || \
{ echo 'pandoc' not found during configure; exit 1; }
+ set -o pipefail ; \
$(PANDOC) -s -f rst -t html -A man/footer.html $< | \
sed -e 's/\\@/@/g' > $@
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
-epydoc.conf: epydoc.conf.in
- sed -e 's#@MODULES@#$(lint_python_code)#g' < $< > $@
+epydoc.conf: epydoc.conf.in Makefile
+ sed -e 's#@MODULES@#$(strip $(lint_python_code))#g' < $< > $@
vcs-version:
if test -d .git; then \
echo "XEN_INITRD = '$(XEN_INITRD)'"; \
echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
+ echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
+ echo "ENABLE_SHARED_FILE_STORAGE = $(ENABLE_SHARED_FILE_STORAGE)"; \
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
echo "KVM_PATH = '$(KVM_PATH)'"; \
echo "SOCAT_PATH = '$(SOCAT)'"; \