MAINTAINERCLEANFILES = \
$(docpng) \
- $(maninput)
+ $(maninput) \
+ doc/news.rst
maintainer-clean-local:
rm -rf doc/api doc/html
doc/install.rst \
doc/locking.rst \
doc/rapi.rst \
- doc/security.rst
+ doc/security.rst \
+ doc/news.rst
doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
@test -n "$(SPHINX)" || \
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 \
doc/design-2.1-lock-acquire.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)