Commit 62142615 authored by Wlodzimierz Wencel's avatar Wlodzimierz Wencel Committed by Wlodzimierz Wencel

[986] manuals included to tarball, can be installed without rebuild

parent 3c9eeda2
......@@ -1553,10 +1553,18 @@ if test "x$enable_generate_docs" != xno ; then
else
generate_docs_report="html, man but no pdf"
fi
install_mans="no"
else
# now let's check if there are some existing manuals
# checking just one is sufficient
if test -f `pwd`/doc/sphinx/_build/man/kea-dhcp6.8; then
install_mans="yes"
else
install_mans="no"
fi
generate_docs_report="no"
fi
AM_CONDITIONAL(INSTALL_MANS, test "x$install_mans" == "xyes")
AM_CONDITIONAL(HAVE_PDFLATEX, test "x$PDFLATEX" != "xno")
AM_CONDITIONAL(GENERATE_DOCS, test x$enable_generate_docs != xno)
......@@ -2104,6 +2112,7 @@ Developer:
C++ Code Coverage: $USE_LCOV
Logger checks: $enable_logger_checks
Generate Documentation: $generate_docs_report
Install existing manuals: $install_mans
Generate Parser: $enable_generate_parser
Generate Messages Files: $enable_generate_messages
Perfdhcp: $enable_perfdhcp
......
EXTRA_DIST=
sphinxbuilddir=$(builddir)/_build
if GENERATE_DOCS
sphinxbuilddir=$(builddir)/_build
sphinxopts=
sphinxopts+=-v
sphinxopts+=-E
......@@ -70,7 +69,7 @@ rst_man_sources+=man/perfdhcp.8.rst
man_sources=$(rst_man_sources) conf.py
man8s=$(foreach rst,$(rst_man_sources), $(sphinxbuilddir)/$(basename $(rst)))
EXTRA_DIST+=$(main_sources) $(man_sources) mes2doc.py api2doc.py
EXTRA_DIST+=$(main_sources) $(man_sources) mes2doc.py api2doc.py $(man8s)
# list of messages files that are used to generate kea-messages.rst and then kea-messages.pdf
mes_files1=$(shell cat mes-files.txt)
......@@ -138,8 +137,25 @@ $(man8s): mans
mans: $(man_sources)
$(SPHINXBUILD) -M man $(srcdir) $(sphinxbuilddir) $(sphinxopts)
clean-local:
rm -rf $(sphinxbuilddir)
rm -f $(srcdir)/kea-messages.rst $(srcdir)/api.rst
.PHONY: all pdf html mans
# There are sometimes conflicts when more then one sphinx-build is run at a time.
# This target blocks running anything in parallel in this Makefile,
# all is run serially.
endif
# install and uninstall can occur with GENERATE_DOCS and without it
# so we want to install all when GENERATE_DOCS is and
# just mans when GENERATE_DOCS is not used, and when man files exists (e.g release tarball)
install-data-local:
mkdir -p $(DESTDIR)$(docdir)
mans_found:=$(wildcard $(sphinxbuilddir)/man/*.8)
if GENERATE_DOCS
cp -r $(sphinxbuilddir)/html $(DESTDIR)$(docdir)
if HAVE_PDFLATEX
${INSTALL_DATA} $(sphinxbuilddir)/latex/kea-arm.pdf $(DESTDIR)$(docdir)
......@@ -147,19 +163,13 @@ if HAVE_PDFLATEX
endif
${MKDIR_P} ${DESTDIR}${mandir}/man8
${INSTALL_DATA} $(man8s) ${DESTDIR}${mandir}/man8/
else
if INSTALL_MANS
${MKDIR_P} ${DESTDIR}${mandir}/man8
${INSTALL_DATA} $(mans_found) ${DESTDIR}${mandir}/man8/
endif
endif
uninstall-local:
rm -rf $(DESTDIR)$(docdir)
clean-local:
rm -rf $(sphinxbuilddir)
rm -f $(srcdir)/kea-messages.rst $(srcdir)/api.rst
.PHONY: all pdf html mans
# There are sometimes conflicts when more then one sphinx-build is run at a time.
# This target blocks running anything in parallel in this Makefile,
# all is run serially.
.NOTPARALLEL:
endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment