MAINTAINERCLEANFILES = \
$(docpng) \
- $(maninput)
+ $(maninput) \
+ doc/news.rst
maintainer-clean-local:
- -rm -rf doc/api doc/build doc/html
+ rm -rf doc/api doc/html
CLEANFILES = \
autotools/replace_vars.sed \
doc/install.rst \
doc/locking.rst \
doc/rapi.rst \
- doc/security.rst
+ doc/security.rst \
+ doc/news.rst
-doc/html: $(docrst) $(docpng) doc/conf.py configure.ac
+doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
@test -n "$(SPHINX)" || \
{ echo 'sphinx-build' not found during configure; exit 1; }
- mkdir -p doc/build/doctrees
- PYTHONPATH=.:$(top_builddir) $(SPHINX) -q -b html \
- -d doc/build/doctrees \
+ PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -b html \
+ -d . \
-D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
-D release="$(PACKAGE_VERSION)" \
- $(top_srcdir)/doc doc/html
- touch "$@"
+ $(abs_top_srcdir)/doc $(CURDIR)/doc/html
+ rm -f doc/html/.buildinfo doc/html/objects.inv
+ touch $@
+
+doc/html: doc/html/.stamp
+
+doc/news.rst: NEWS
+ set -e; \
+ { echo '.. This file is automatically updated at build time from $<.'; \
+ echo '.. Do not edit.'; \
+ echo; \
+ cat $<; \
+ } > $@
docdot = \
doc/arch-2.0.dot \
docpng = $(patsubst %.dot,%.png,$(docdot))
-noinst_DATA = $(manhtml) doc/html
+# Things to build but not to install (add it to EXTRA_DIST if it should be
+# distributed)
+noinst_DATA = \
+ devel/upload \
+ doc/html \
+ doc/examples/bash_completion \
+ doc/examples/ganeti.cron \
+ doc/examples/ganeti.initd \
+ doc/examples/hooks/ipsec \
+ $(manhtml)
gnt_scripts = \
scripts/gnt-backup \
tools/lvmstrap
EXTRA_DIST = \
- $(MAINTAINERCLEANFILES) \
NEWS \
pylintrc \
autotools/build-bash-completion \
daemons/ganeti-cleaner.in \
devel/upload.in \
$(docdot) \
+ $(docpng) \
$(docrst) \
doc/conf.py \
doc/html \
$(dist_TESTS) \
$(TEST_FILES) \
man/footer.sgml \
- $(mansgml) $(maninput) \
+ $(mansgml) \
+ $(maninput) \
qa/ganeti-qa.py \
qa/qa-sample.json \
qa/qa_cluster.py \
mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS)))
manhtml = $(patsubst %.sgml,%.html,$(mansgml))
-maninput = $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) $(patsubst %.html,%.html.in,$(manhtml))
+maninput = \
+ $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
+ $(patsubst %.html,%.html.in,$(manhtml))
TEST_FILES = \
test/data/bdev-both.txt \
check_python_code = \
$(all_python_code)
-all-local: devel/upload \
- doc/examples/bash_completion \
- doc/examples/ganeti.initd doc/examples/ganeti.cron \
- doc/examples/hooks/ipsec
-
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
chmod u+x $@
$(DOT) -Tpng -o $@ $<
man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
- @test -n "$(DOCBOOK2MAN)" || { echo 'docbook2man' not found during configure; exit 1; }
+ @test -n "$(DOCBOOK2MAN)" || \
+ { echo 'docbook2man' not found during configure; exit 1; }
$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
- @test -n "$(DOCBOOK2HTML)" || { echo 'docbook2html' not found during configure; exit 1; }
+ @test -n "$(DOCBOOK2HTML)" || \
+ { echo 'docbook2html' not found during configure; exit 1; }
$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@
man/%.7: man/%.7.in $(REPLACE_VARS_SED)