summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am109
1 files changed, 23 insertions, 86 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b26e298..71d561c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,18 +1,3 @@
-MANPAGES_IN = \
- man/knot.conf.5in \
- man/knotc.8in \
- man/knotd.8in \
- man/kcatalogprint.8in \
- man/keymgr.8in \
- man/kjournalprint.8in \
- man/kdig.1in \
- man/khost.1in \
- man/knsupdate.1in \
- man/knsec3hash.1in \
- man/kzonecheck.1in \
- man/kzonesign.1in \
- man/kxdpgun.8in
-
MANPAGES_RST = \
reference.rst \
man_knotc.rst \
@@ -44,7 +29,6 @@ EXTRA_DIST = \
troubleshooting.rst \
utilities.rst \
\
- $(MANPAGES_IN) \
$(MANPAGES_RST) \
\
logo.pdf \
@@ -66,27 +50,26 @@ SPHINXBUILDDIR = $(builddir)/_build
_SPHINXOPTS = -c $(srcdir) \
-a \
- $(SPHINX_V)
-
-ALLSPHINXOPTS = $(_SPHINXOPTS) \
+ $(SPHINX_V) \
-D version="$(VERSION)" \
-D today="$(RELEASE_DATE)" \
- -D release="$(VERSION)" \
+ -D release="$(VERSION)"
+
+ALLSPHINXOPTS = $(_SPHINXOPTS) \
$(SPHINXOPTS) \
$(srcdir)
man_SPHINXOPTS = $(_SPHINXOPTS) \
- -D version="@""VERSION@" \
- -D today="@""RELEASE_DATE@" \
- -D release="@""VERSION@" \
-D extensions="ignore_panels" \
$(SPHINXOPTS) \
$(srcdir)
-.PHONY: html-local singlehtml pdf-local info-local epub man install-html-local install-singlehtml install-pdf-local install-info-local install-epub
+.PHONY: html-local singlehtml pdf-local epub man install-html-local install-singlehtml install-pdf-local install-epub
man_MANS =
+if HAVE_DOCS
+
if HAVE_DAEMON
man_MANS += \
man/knot.conf.5 \
@@ -115,43 +98,8 @@ man_MANS += man/kxdpgun.8
endif # ENABLE_XDP
endif # HAVE_UTILS
-man/knot.conf.5: man/knot.conf.5in
-man/knotc.8: man/knotc.8in
-man/knotd.8: man/knotd.8in
-man/kcatalogprint.8: man/kcatalogprint.8in
-man/keymgr.8: man/keymgr.8in
-man/kjournalprint.8: man/kjournalprint.8in
-man/kdig.1: man/kdig.1in
-man/khost.1: man/khost.1in
-man/knsupdate.1: man/knsupdate.1in
-man/knsec3hash.1: man/knsec3hash.1in
-man/kzonecheck.1: man/kzonecheck.1in
-man/kzonesign.1: man/kzonesign.1in
-man/kxdpgun.8: man/kxdpgun.8in
-
-man_SUBST = $(AM_V_GEN)mkdir -p man; \
- sed -e 's,[@]VERSION@,$(VERSION),' \
- -e 's,[@]RELEASE_DATE@,$(RELEASE_DATE),' \
- -e 's,[@]config_dir@,$(config_dir),' \
- -e 's,[@]storage_dir@,$(storage_dir),' \
- -e 's,[@]run_dir@,$(run_dir),' \
- -e 's,[@]conf_mapsize@,$(conf_mapsize),' \
- $< > $@
-
-.1in.1:
- $(man_SUBST)
-
-.5in.5:
- $(man_SUBST)
-
-.8in.8:
- $(man_SUBST)
-
-if HAVE_DOCS
-
-if HAVE_SPHINXBUILD
html-local:
- $(AM_V_SPHINX)$(SPHINXBUILD) -b html -d $(SPHINXBUILDDIR)/doctrees $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
+ $(AM_V_SPHINX)$(SPHINXBUILD) -b html -d $(SPHINXBUILDDIR)/doctrees/html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
@echo "The HTML documentation has been built in $(SPHINXBUILDDIR)/html/"
install-html-local:
@@ -161,7 +109,7 @@ install-html-local:
$(INSTALL_DATA) $(SPHINXBUILDDIR)/html/_static/* $(DESTDIR)/$(docdir)/_static/
singlehtml:
- $(AM_V_SPHINX)$(SPHINXBUILD) -b singlehtml -d $(SPHINXBUILDDIR)/doctrees $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/singlehtml
+ $(AM_V_SPHINX)$(SPHINXBUILD) -b singlehtml -d $(SPHINXBUILDDIR)/doctrees/singlehtml $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/singlehtml
@echo "The single HTML documentation has been built in $(SPHINXBUILDDIR)/singlehtml/"
install-singlehtml: singlehtml
@@ -170,7 +118,7 @@ install-singlehtml: singlehtml
$(INSTALL_DATA) $(SPHINXBUILDDIR)/singlehtml/_static/* $(DESTDIR)/$(docdir)/_static/
epub:
- $(AM_V_SPHINX)$(SPHINXBUILD) -b epub -A today=$(RELEASE_DATE) -d $(SPHINXBUILDDIR)/doctrees $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/epub
+ $(AM_V_SPHINX)$(SPHINXBUILD) -b epub -A today=$(RELEASE_DATE) -d $(SPHINXBUILDDIR)/doctrees/epub $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/epub
@echo "The EPUB documentation has been built in $(SPHINXBUILDDIR)/epub/"
install-epub:
@@ -179,7 +127,7 @@ install-epub:
if HAVE_PDFLATEX
pdf-local:
- $(AM_V_SPHINX)$(SPHINXBUILD) -b latex -d $(SPHINXBUILDDIR)/doctrees $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/latex
+ $(AM_V_SPHINX)$(SPHINXBUILD) -b latex -d $(SPHINXBUILDDIR)/doctrees/latex $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/latex
$(MAKE) -C $(SPHINXBUILDDIR)/latex all-pdf
@echo "The PDF documentation has been built in $(SPHINXBUILDDIR)/latex/"
@@ -192,37 +140,26 @@ pdf-local install-pdf-local:
@echo "Install 'pdflatex' and re-run configure to be able to generate PDF documentation!"
endif # HAVE_PDFLATEX
-if HAVE_MAKEINFO
-info-local:
- $(AM_V_SPHINX)$(SPHINXBUILD) -b texinfo -d $(SPHINXBUILDDIR)/doctrees $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/texinfo
- $(MAKE) -C $(SPHINXBUILDDIR)/texinfo info
- @echo "The Info pages have been built in $(SPHINXBUILDDIR)/texinfo/"
-
-install-info-local:
- $(INSTALL) -d $(DESTDIR)/$(infodir)
- $(INSTALL_DATA) $(SPHINXBUILDDIR)/texinfo/knot.info $(DESTDIR)/$(infodir)/
-
-else
-info-local install-info-local:
- @echo "Install 'texinfo' and re-run configure to be able to generate Info pages!"
-endif # HAVE_MAKEINFO
-
-.NOTPARALLEL: man
man: $(man_MANS)
-$(MANPAGES_IN): $(MANPAGES_RST)
- $(AM_V_SPHINX)$(SPHINXBUILD) -b man -d $(SPHINXBUILDDIR)/doctrees $(man_SPHINXOPTS) $(SPHINXBUILDDIR)/man
- @mkdir -p $(srcdir)/man
+$(man_MANS)&: $(MANPAGES_RST)
+ $(AM_V_SPHINX)$(SPHINXBUILD) -b man -d $(SPHINXBUILDDIR)/doctrees/man $(man_SPHINXOPTS) $(SPHINXBUILDDIR)/man
+ @mkdir -p man
@for f in $(SPHINXBUILDDIR)/man/*; do \
- sed -e '/^\.TP$$/ {' -e 'n' -e 's/^\.B //' -e '}' "$$f" > "$(srcdir)/man/$$(basename $$f)in"; \
+ sed -e 's,[@]config_dir@,$(config_dir),' \
+ -e 's,[@]storage_dir@,$(storage_dir),' \
+ -e 's,[@]run_dir@,$(run_dir),' \
+ -e 's,[@]conf_mapsize@,$(conf_mapsize),' "$$f" > "man/$$(basename $$f)"; \
done
else
-html-local singlehtml pdf-local info-local epub man install-html-local install-singlehtml install-pdf-local install-info-local install-epub:
+html-local singlehtml pdf-local epub man install-html-local install-singlehtml install-pdf-local install-epub:
@echo "Install 'sphinx-build' and re-run configure to be able to generate documentation!"
-endif # HAVE_SPHINXBUILD
endif # HAVE_DOCS
+EXTRA_DIST += \
+ $(man_MANS)
+
clean-local:
-rm -rf $(SPHINXBUILDDIR)
- -rm -f man/*.1 man/*.5 man/*.8
+ -rm -rf man