From 9e53b31551844a02b3bb2bd359f0a389eddf0d50 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 15 Aug 2018 22:59:31 +0200 Subject: [PATCH] build: non-recursive doc + parallel sphinx Sphinx actually does work with a parallel build, if the doctree creation is a separate step (which the other builds will then just read unmodified.) This can be done with the "dummy" target. This also adds "-j6" to sphinx-build and adds a "--disable-doc-html" switch on ./configure to turn on/off building HTML docs separately. Also, HTML docs are now installed by "make install" to /usr/share/doc/frr/html. Signed-off-by: David Lamparter --- Makefile.am | 15 +- configure.ac | 16 +-- doc/.gitignore | 3 +- doc/Makefile | 18 +++ doc/Makefile.am | 293 -------------------------------------- doc/developer/Makefile | 16 +++ doc/developer/Makefile.am | 8 -- doc/developer/subdir.am | 72 ++++++++++ doc/frr-sphinx.mk | 229 ----------------------------- doc/manpages/Makefile | 12 ++ doc/manpages/Makefile.am | 48 ------- doc/manpages/subdir.am | 139 ++++++++++++++++++ doc/subdir.am | 176 +++++++++++++++++++++++ doc/user/Makefile | 16 +++ doc/user/Makefile.am | 55 ------- doc/user/subdir.am | 110 ++++++++++++++ lib/subdir.am | 5 +- 17 files changed, 581 insertions(+), 650 deletions(-) create mode 100644 doc/Makefile delete mode 100644 doc/Makefile.am create mode 100644 doc/developer/Makefile delete mode 100644 doc/developer/Makefile.am create mode 100644 doc/developer/subdir.am delete mode 100644 doc/frr-sphinx.mk create mode 100644 doc/manpages/Makefile delete mode 100644 doc/manpages/Makefile.am create mode 100644 doc/manpages/subdir.am create mode 100644 doc/subdir.am create mode 100644 doc/user/Makefile delete mode 100644 doc/user/Makefile.am create mode 100644 doc/user/subdir.am diff --git a/Makefile.am b/Makefile.am index 3e268f703d..9f15f838dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,11 +20,13 @@ sbin_SCRIPTS = noinst_PROGRAMS = noinst_HEADERS = noinst_LIBRARIES = +nodist_noinst_DATA = lib_LTLIBRARIES = module_LTLIBRARIES = pkginclude_HEADERS = nodist_pkginclude_HEADERS = dist_examples_DATA = +man_MANS = ## libtool, the self-made GNU scourge ## ... this should fix relinking @@ -34,6 +36,10 @@ $(AUTOMAKE_DUMMY)install-moduleLTLIBRARIES: install-libLTLIBRARIES $(AUTOMAKE_DUMMY)install-binPROGRAMS: install-libLTLIBRARIES $(AUTOMAKE_DUMMY)install-sbinPROGRAMS: install-libLTLIBRARIES +include doc/subdir.am +include doc/user/subdir.am +include doc/manpages/subdir.am +include doc/developer/subdir.am include include/subdir.am include lib/subdir.am include zebra/subdir.am @@ -60,11 +66,11 @@ include bfdd/subdir.am SUBDIRS = . @LIBRFP@ @RFPTEST@ \ @BGPD@ \ - @VTYSH@ @DOC@ \ + @VTYSH@ \ @SOLARIS@ tests DIST_SUBDIRS = . bgpd \ - vtysh doc tests \ + vtysh tests \ solaris bgpd/rfp-example/librfp \ bgpd/rfp-example/rfptest \ debianpkg \ @@ -108,6 +114,11 @@ EXTRA_DIST += \ \ vtysh/Makefile.am \ vtysh/Makefile.in \ + \ + doc/Makefile \ + doc/developer/Makefile \ + doc/manpages/Makefile \ + doc/user/Makefile \ # end ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index be1c2763a1..d8df936750 100755 --- a/configure.ac +++ b/configure.ac @@ -343,6 +343,8 @@ AC_ARG_ENABLE(vtysh, AS_HELP_STRING([--disable-vtysh], [do not build integrated vty shell for FRR])) AC_ARG_ENABLE(doc, AS_HELP_STRING([--disable-doc], [do not build docs])) +AC_ARG_ENABLE(doc-html, + AS_HELP_STRING([--disable-doc-html], [do not build HTML docs])) AC_ARG_ENABLE(zebra, AS_HELP_STRING([--disable-zebra], [do not build zebra daemon])) AC_ARG_ENABLE(bgpd, @@ -1313,12 +1315,9 @@ FRR_INCLUDES ])dnl dnl disable doc check -if test "${enable_doc}" = "no";then - DOC="" -else - AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build sphinx-build3 sphinx-build2], [no]) - DOC="doc" -fi +AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build sphinx-build3 sphinx-build2], [no]) +AM_CONDITIONAL(DOC, test "${enable_doc}" != "no") +AM_CONDITIONAL(DOC_HTML, test "${enable_doc_html}" != "no") dnl -------------------- dnl Daemon disable check @@ -1434,7 +1433,6 @@ fi # set AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno]) -AC_SUBST(DOC) AC_SUBST(RFPTEST) AC_SUBST(LIBRFP) AC_SUBST(RFPINC) @@ -1986,10 +1984,6 @@ AC_MSG_RESULT($ac_cv_htonl_works) AC_CONFIG_FILES([Makefile bgpd/Makefile vtysh/Makefile - doc/Makefile - doc/user/Makefile - doc/manpages/Makefile - doc/developer/Makefile tests/Makefile bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile diff --git a/doc/.gitignore b/doc/.gitignore index e539d9a97b..d99a6a5b2d 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,5 +1,4 @@ -Makefile -Makefile.in +!Makefile mdate-sh draft-zebra-00.txt *.pdf diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000000..3b4d3d24ab --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,18 @@ +all: ALWAYS + @$(MAKE) -s -C .. doc +%: ALWAYS + @$(MAKE) -s -C .. doc/$@ +html: + @$(MAKE) -s -C .. doc/user/_build/html/.buildinfo +info: + @$(MAKE) -s -C .. doc/user/_build/texinfo/frr.info +pdf: + @$(MAKE) -s -C .. doc/user/_build/latexpdf +frr.info: info +frr.pdf: pdf + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles html info frr.info pdf frr.pdf +.SUFFIXES: diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index a2f2f19414..0000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,293 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -# Pass down make invocation to each subdirectory. -# -# Each of these directories contains a Sphinx-generated Makefile that has been -# modified to implement all the targets required by Automake, as documented in -# the 'Third-Party Makefiles' section of the Automake docs. -# -# Note the absence of the 'developer' directory here; development docs are -# never built as part of a regular build. They are only built when explicitly -# asked for. See comment further down. - -# Sphinx is not designed to be invoked multiple times against the same toctree. -.NOTPARALLEL: - -SUBDIRS = manpages user -AM_MAKEFLAGS = DESTDIR=${DESTDIR} infodir=${infodir} - -MANPAGE_BUILDDIR = manpages/_build/man - -# This is a hack, see comment further down. -man_MANS = $(MANPAGE_BUILDDIR)/frr.1 - -if PIMD -man_MANS += $(MANPAGE_BUILDDIR)/pimd.8 -man_MANS += $(MANPAGE_BUILDDIR)/mtracebis.8 -endif - -if PBRD -man_MANS += $(MANPAGE_BUILDDIR)/pbrd.8 -endif - -if BGPD -man_MANS += $(MANPAGE_BUILDDIR)/bgpd.8 -endif - -if ISISD -man_MANS += $(MANPAGE_BUILDDIR)/isisd.8 -endif - -if OSPF6D -man_MANS += $(MANPAGE_BUILDDIR)/ospf6d.8 -endif - -if OSPFCLIENT -man_MANS += $(MANPAGE_BUILDDIR)/ospfclient.8 -endif - -if OSPFD -man_MANS += $(MANPAGE_BUILDDIR)/ospfd.8 -endif - -if LDPD -man_MANS += $(MANPAGE_BUILDDIR)/ldpd.8 -endif - -if RIPD -man_MANS += $(MANPAGE_BUILDDIR)/ripd.8 -endif - -if RIPNGD -man_MANS += $(MANPAGE_BUILDDIR)/ripngd.8 -endif - -if NHRPD -man_MANS += $(MANPAGE_BUILDDIR)/nhrpd.8 -endif - -if VTYSH -man_MANS += $(MANPAGE_BUILDDIR)/vtysh.1 -endif - -if WATCHFRR -man_MANS += $(MANPAGE_BUILDDIR)/watchfrr.8 -endif - -if ZEBRA -man_MANS += $(MANPAGE_BUILDDIR)/zebra.8 -endif - -if EIGRPD -man_MANS += $(MANPAGE_BUILDDIR)/eigrpd.8 -endif - -if SHARPD -man_MANS += $(MANPAGE_BUILDDIR)/sharpd.8 -endif - -if STATICD -man_MANS += $(MANPAGE_BUILDDIR)/staticd.8 -endif - -if BFDD -man_MANS += $(MANPAGE_BUILDDIR)/bfdd.8 -endif - -# Automake is particular about manpages. It is aware of them and has some -# special facilities for handling them, but it assumes that manpages are always -# given in groff source and so these facilities are limited to simply -# specifying the path to the groff sources in a special variable. There is no -# target for building manpages that can be extended, as there are for pdf, -# html, dvi, etc. Unfortunately this leaves us with hijacking the -# 'install-data' and 'all' targets in the 3rd-party Makefile in manpages/ to -# make sure manpages are always built, and then using the special Automake -# variable defined above in order to take advantage of automatic installation. -# -# However, it is conceivable that someone may want to build just the manpages, -# so here's an explicit target for that. -man: - $(MAKE) -C manpages man - -# Automake automatically defines targets for various document formats. All of -# the child 3rd-party Makefiles are aware of all Automake targets and implement -# the ones we are interested in. -# -# The SUBDIRS variable at the top of this Makefile.am causes the following -# implicit Automake targets to only build user documentation, and not developer -# documentation: -# - info -# - html -# - pdf -# -# If you wish to build developer documentation, use these targets: -developer-info: - $(MAKE) -C developer info - -developer-pdf: - $(MAKE) -C developer latexpdf - -developer-html: - $(MAKE) -C developer html - -# If you want to build the developer's docs in other formats, try the -# following: -# -# $ cd developer -# $ make help - -# dist tarballs want doc sources -EXTRA_DIST = frr-sphinx.mk \ - manpages/bgpd.rst \ - manpages/common-options.rst \ - manpages/conf.py \ - manpages/defines.rst \ - manpages/eigrpd.rst \ - manpages/epilogue.rst \ - manpages/frr.rst \ - manpages/index.rst \ - manpages/isisd.rst \ - manpages/ldpd.rst \ - manpages/Makefile.am \ - manpages/mtracebis.rst \ - manpages/nhrpd.rst \ - manpages/ospf6d.rst \ - manpages/ospfclient.rst \ - manpages/ospfd.rst \ - manpages/pimd.rst \ - manpages/ripd.rst \ - manpages/pbrd.rst \ - manpages/ripngd.rst \ - manpages/sharpd.rst \ - manpages/staticd.rst \ - manpages/vtysh.rst \ - manpages/watchfrr.rst \ - manpages/zebra.rst \ - manpages/bfdd.rst \ - manpages/bfd-options.rst \ - developer/bgpd.rst \ - developer/bgp-typecodes.rst \ - developer/building-frr-for-openwrt.rst \ - developer/building-frr-on-alpine.rst \ - developer/building-frr-on-centos6.rst \ - developer/building-frr-on-centos7.rst \ - developer/building-frr-on-debian8.rst \ - developer/building-frr-on-debian9.rst \ - developer/building-frr-on-fedora24.rst \ - developer/building-frr-on-freebsd10.rst \ - developer/building-frr-on-freebsd11.rst \ - developer/building-frr-on-freebsd9.rst \ - developer/building-frr-on-netbsd6.rst \ - developer/building-frr-on-netbsd7.rst \ - developer/building-frr-on-omnios.rst \ - developer/building-frr-on-openbsd6.rst \ - developer/building-frr-on-ubuntu1204.rst \ - developer/building-frr-on-ubuntu1404.rst \ - developer/building-frr-on-ubuntu1604.rst \ - developer/building-frr-on-ubuntu1804.rst \ - developer/building.rst \ - developer/cli.rst \ - developer/conf.py \ - developer/draft-zebra-00.ms \ - developer/hooks.rst \ - developer/index.rst \ - developer/ldpd-basic-test-setup.md \ - developer/library.rst \ - developer/logging.rst \ - developer/Makefile.in \ - developer/maintainer-release-build.rst \ - developer/memtypes.rst \ - developer/modules.rst \ - developer/next-hop-tracking.rst \ - developer/ospf-api.rst \ - developer/ospf.rst \ - developer/ospf-sr.rst \ - developer/workflow.rst \ - developer/zebra.rst \ - user/babeld.rst \ - user/ldpd.rst \ - user/basic.rst \ - user/bgp.rst \ - user/bugs.rst \ - user/conf.py \ - user/eigrpd.rst \ - user/filter.rst \ - user/glossary.rst \ - user/index.rst \ - user/installation.rst \ - user/ipv6.rst \ - user/isisd.rst \ - user/kernel.rst \ - user/Makefile.am \ - user/nhrpd.rst \ - user/ospf6d.rst \ - user/ospfd.rst \ - user/ospf_fundamentals.rst \ - user/overview.rst \ - user/packet-dumps.rst \ - user/pim.rst \ - user/ripd.rst \ - user/pbr.rst \ - user/ripngd.rst \ - user/routemap.rst \ - user/routeserver.rst \ - user/rpki.rst \ - user/setup.rst \ - user/sharp.rst \ - user/snmp.rst \ - user/snmptrap.rst \ - user/static.rst \ - user/Useful_Sysctl_Settings.md \ - user/vnc.rst \ - user/vtysh.rst \ - user/zebra.rst \ - user/bfd.rst \ - user/flowspec.rst \ - mpls/ChangeLog.opaque.txt \ - mpls/ospfd.conf \ - mpls/cli_summary.txt \ - mpls/opaque_lsa.txt \ - figures/cligraph.png \ - figures/cligraph.svg \ - figures/fig-normal-processing.dia \ - figures/fig-normal-processing.png \ - figures/fig-normal-processing.txt \ - figures/fig-rs-processing.dia \ - figures/fig-rs-processing.png \ - figures/fig-rs-processing.txt \ - figures/fig_topologies_full.dia \ - figures/fig_topologies_full.png \ - figures/fig_topologies_full.txt \ - figures/fig_topologies_rs.dia \ - figures/fig_topologies_rs.png \ - figures/fig_topologies_rs.txt \ - figures/fig-vnc-commercial-route-reflector.dia \ - figures/fig-vnc-commercial-route-reflector.png \ - figures/fig-vnc-commercial-route-reflector.txt \ - figures/fig-vnc-frr-route-reflector.dia \ - figures/fig-vnc-frr-route-reflector.png \ - figures/fig-vnc-frr-route-reflector.txt \ - figures/fig-vnc-gw.dia \ - figures/fig-vnc-gw.png \ - figures/fig-vnc-gw-rr.dia \ - figures/fig-vnc-gw-rr.png \ - figures/fig-vnc-gw-rr.txt \ - figures/fig-vnc-gw.txt \ - figures/fig-vnc-mesh.dia \ - figures/fig-vnc-mesh.png \ - figures/fig-vnc-mesh.txt \ - figures/fig-vnc-redundant-route-reflectors.dia \ - figures/fig-vnc-redundant-route-reflectors.png \ - figures/fig-vnc-redundant-route-reflectors.txt \ - figures/frr-icon.svg \ - figures/frr-logo-icon.png \ - figures/frr-logo-medium.png \ - figures/frr-logo.png \ - figures/frr-logo-small.png \ - figures/git_branches.png \ - figures/git_branches.svg \ - figures/ospf_api_architecture.png \ - figures/ospf_api_msghdr.png \ - figures/ospf_api_msgs1.png \ - figures/ospf_api_msgs2.png \ - extra/frrlexer.py diff --git a/doc/developer/Makefile b/doc/developer/Makefile new file mode 100644 index 0000000000..38afb43a70 --- /dev/null +++ b/doc/developer/Makefile @@ -0,0 +1,16 @@ +all: ALWAYS + @$(MAKE) -s -C ../.. developer-html +help: ALWAYS + @$(MAKE) -s -C ../.. doc/help +pdf: ALWAYS + @$(MAKE) -s -C ../.. doc/developer/_build/latexpdf +info: ALWAYS + @$(MAKE) -s -C ../.. doc/developer/_build/texinfo/frr.info +%: ALWAYS + @$(MAKE) -s -C ../.. doc/developer/_build/$@ + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles +.SUFFIXES: diff --git a/doc/developer/Makefile.am b/doc/developer/Makefile.am deleted file mode 100644 index 76758f9242..0000000000 --- a/doc/developer/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk diff --git a/doc/developer/subdir.am b/doc/developer/subdir.am new file mode 100644 index 0000000000..3e9f379af3 --- /dev/null +++ b/doc/developer/subdir.am @@ -0,0 +1,72 @@ +# +# doc/developer +# + +dev_RSTFILES = \ + doc/developer/bgp-typecodes.rst \ + doc/developer/bgpd.rst \ + doc/developer/building-frr-for-openwrt.rst \ + doc/developer/building-frr-on-alpine.rst \ + doc/developer/building-frr-on-centos6.rst \ + doc/developer/building-frr-on-centos7.rst \ + doc/developer/building-frr-on-debian8.rst \ + doc/developer/building-frr-on-debian9.rst \ + doc/developer/building-frr-on-fedora24.rst \ + doc/developer/building-frr-on-freebsd10.rst \ + doc/developer/building-frr-on-freebsd11.rst \ + doc/developer/building-frr-on-freebsd9.rst \ + doc/developer/building-frr-on-netbsd6.rst \ + doc/developer/building-frr-on-netbsd7.rst \ + doc/developer/building-frr-on-omnios.rst \ + doc/developer/building-frr-on-openbsd6.rst \ + doc/developer/building-frr-on-ubuntu1204.rst \ + doc/developer/building-frr-on-ubuntu1404.rst \ + doc/developer/building-frr-on-ubuntu1604.rst \ + doc/developer/building-frr-on-ubuntu1804.rst \ + doc/developer/building.rst \ + doc/developer/cli.rst \ + doc/developer/conf.py \ + doc/developer/hooks.rst \ + doc/developer/index.rst \ + doc/developer/library.rst \ + doc/developer/logging.rst \ + doc/developer/maintainer-release-build.rst \ + doc/developer/memtypes.rst \ + doc/developer/modules.rst \ + doc/developer/next-hop-tracking.rst \ + doc/developer/ospf-api.rst \ + doc/developer/ospf-sr.rst \ + doc/developer/ospf.rst \ + doc/developer/workflow.rst \ + doc/developer/zebra.rst \ + # end + +EXTRA_DIST += \ + $(dev_RSTFILES) \ + doc/developer/draft-zebra-00.ms \ + doc/developer/ldpd-basic-test-setup.md \ + # end + +DEVBUILD = doc/developer/_build +$(DEVBUILD)/.doctrees/environment.pickle: $(dev_RSTFILES) + +# +# nothing built automatically for "all" target. +# + +# +# standard targets +# + +developer-info: $(DEVBUILD)/texinfo/frr.info +developer-html: $(DEVBUILD)/html/.buildinfo +developer-pdf: $(DEVBUILD)/latexpdf + +# +# hook-in for clean +# + +.PHONY: clean-devdocs +clean-local: clean-devdocs +clean-devdocs: + -rm -rf "$(DEVBUILD)" diff --git a/doc/frr-sphinx.mk b/doc/frr-sphinx.mk deleted file mode 100644 index 3e4c67d374..0000000000 --- a/doc/frr-sphinx.mk +++ /dev/null @@ -1,229 +0,0 @@ -# Makefile for Sphinx documentation -# - -# Sphinx is not designed to be invoked multiple times against the same toctree. -.NOTPARALLEL: - -# You can set these variables from the command line. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -PAPER ?= -BUILDDIR = _build - -# This is a custom FRR variable just for this docs subdirectory used to support -# VPATH builds. Makefiles which include this file should override it to point -# to the correct sources path. -SOURCESDIR ?= . - -# User-friendly check for sphinx-build -ifneq ($(MAKECMDGOALS), clean) - ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) - SPHINXBUILD = sphinx-1.0-build - endif - ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) - $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/") - endif -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCESDIR) -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCESDIR) - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FRR.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FRR.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/FRR" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FRR" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - $(MAKE) -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/doc/manpages/Makefile b/doc/manpages/Makefile new file mode 100644 index 0000000000..7cccfa2a3d --- /dev/null +++ b/doc/manpages/Makefile @@ -0,0 +1,12 @@ +all: ALWAYS + @$(MAKE) -s -C ../.. doc/manpages/man.stamp +help: ALWAYS + @$(MAKE) -s -C ../.. doc/help +%: ALWAYS + @$(MAKE) -s -C ../.. doc/manpages/_build/$@ + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles +.SUFFIXES: diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am deleted file mode 100644 index 009c723823..0000000000 --- a/doc/manpages/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk - -# ----------------------------------------------------------------------------- -# Automake requires that 3rd-party Makefiles recognize these targets. -# ----------------------------------------------------------------------------- -# install -# install-data -# install-exec -# uninstall -# install-dvi -# install-html -# install-info -# install-ps -# install-pdf -# installdirs -# check -# installcheck -# mostlyclean -# clean -# distclean -# maintainer-clean -# dvi -# pdf -# ps -# info -# html -# tags -# ctags - -# These targets are automatically generated by Sphinx but conflict with -# implicitly defined Automake rules, so we manually override them to nothing. -# The other option is deleting the Sphinx-generated rules, which suppresses the -# warning but kinda screws up the symmetry between Makefiles. -info: ; -html: ; - -all: man - -install-data: man - -install: install-data diff --git a/doc/manpages/subdir.am b/doc/manpages/subdir.am new file mode 100644 index 0000000000..24f47fc7a5 --- /dev/null +++ b/doc/manpages/subdir.am @@ -0,0 +1,139 @@ +# +# doc/manpages +# + +man_RSTFILES = \ + doc/manpages/bgpd.rst \ + doc/manpages/common-options.rst \ + doc/manpages/conf.py \ + doc/manpages/defines.rst \ + doc/manpages/eigrpd.rst \ + doc/manpages/epilogue.rst \ + doc/manpages/frr.rst \ + doc/manpages/index.rst \ + doc/manpages/isisd.rst \ + doc/manpages/ldpd.rst \ + doc/manpages/mtracebis.rst \ + doc/manpages/nhrpd.rst \ + doc/manpages/ospf6d.rst \ + doc/manpages/ospfclient.rst \ + doc/manpages/ospfd.rst \ + doc/manpages/pimd.rst \ + doc/manpages/ripd.rst \ + doc/manpages/pbrd.rst \ + doc/manpages/ripngd.rst \ + doc/manpages/sharpd.rst \ + doc/manpages/staticd.rst \ + doc/manpages/vtysh.rst \ + doc/manpages/watchfrr.rst \ + doc/manpages/zebra.rst \ + doc/manpages/bfdd.rst \ + doc/manpages/bfd-options.rst \ + # end + +EXTRA_DIST += $(man_RSTFILES) + +MANBUILD = doc/manpages/_build/man +doc/manpages/_build/.doctrees/environment.pickle: $(man_RSTFILES) + +# +# automake integration +# + +rstman1dir = $(mandir)/man1 +rstman8dir = $(mandir)/man8 + +rstman1_DATA = +rstman8_DATA = + +rstman1_DATA += $(MANBUILD)/frr.1 + +if PIMD +rstman8_DATA += $(MANBUILD)/pimd.8 +rstman8_DATA += $(MANBUILD)/mtracebis.8 +endif + +if PBRD +rstman8_DATA += $(MANBUILD)/pbrd.8 +endif + +if BGPD +rstman8_DATA += $(MANBUILD)/bgpd.8 +endif + +if ISISD +rstman8_DATA += $(MANBUILD)/isisd.8 +endif + +if OSPF6D +rstman8_DATA += $(MANBUILD)/ospf6d.8 +endif + +if OSPFCLIENT +rstman8_DATA += $(MANBUILD)/ospfclient.8 +endif + +if OSPFD +rstman8_DATA += $(MANBUILD)/ospfd.8 +endif + +if LDPD +rstman8_DATA += $(MANBUILD)/ldpd.8 +endif + +if RIPD +rstman8_DATA += $(MANBUILD)/ripd.8 +endif + +if RIPNGD +rstman8_DATA += $(MANBUILD)/ripngd.8 +endif + +if NHRPD +rstman8_DATA += $(MANBUILD)/nhrpd.8 +endif + +if VTYSH +rstman1_DATA += $(MANBUILD)/vtysh.1 +endif + +if WATCHFRR +rstman8_DATA += $(MANBUILD)/watchfrr.8 +endif + +if ZEBRA +rstman8_DATA += $(MANBUILD)/zebra.8 +endif + +if EIGRPD +rstman8_DATA += $(MANBUILD)/eigrpd.8 +endif + +if SHARPD +rstman8_DATA += $(MANBUILD)/sharpd.8 +endif + +if STATICD +rstman8_DATA += $(MANBUILD)/staticd.8 +endif + +if BFDD +rstman8_DATA += $(MANBUILD)/bfdd.8 +endif + +# dependency +$(rstman8_DATA) $(rstman1_DATA): $(MANBUILD)/man.stamp + +# +# hook-ins for clean / doc +# (install is handled by automake _DATA) +# + +clean-local: clean-manpages +.PHONY: clean-manpages +clean-manpages: + -rm -rf $(MANBUILD) + +doc: doc-man +.PHONY: doc-man +doc-man: $(rstman8_DATA) $(rstman1_DATA) diff --git a/doc/subdir.am b/doc/subdir.am new file mode 100644 index 0000000000..4170101655 --- /dev/null +++ b/doc/subdir.am @@ -0,0 +1,176 @@ +# +# doc +# + +# You can set these variables from the command line. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +PAPER ?= + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) + +### + +AM_V_SPHINX = $(am__v_SPHINX_$(V)) +am__v_SPHINX_ = $(am__v_SPHINX_$(AM_DEFAULT_VERBOSITY)) +am__v_SPHINX_0 = @echo " SPHINX " $@; +am__v_SPHINX_1 = +AM_V_MAKEINFO = $(am__v_MAKEINFO_$(V)) +am__v_MAKEINFO_ = $(am__v_MAKEINFO_$(AM_DEFAULT_VERBOSITY)) +am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; +am__v_MAKEINFO_1 = + +# +# real-file sphinx targets that work for dependencies +# + +doc/%/_build/.doctrees/environment.pickle: + $(AM_V_SPHINX) ( \ + subdoc="$@"; subdoc="$${subdoc#doc/}"; subdoc="doc/$${subdoc%%/*}"; \ + $(SPHINXBUILD) -a -q -b text -d "$${subdoc}/_build/.doctrees" \ + $(ALLSPHINXOPTS) "$(top_srcdir)/$${subdoc}" "$${subdoc}/_build/text" \ + ) +doc/%/_build/html/.buildinfo: doc/%/_build/.doctrees/environment.pickle + $(AM_V_SPHINX) ( \ + subdoc="$@"; subdoc="$${subdoc#doc/}"; subdoc="doc/$${subdoc%%/*}"; \ + $(SPHINXBUILD) -q -b html -d "$${subdoc}/_build/.doctrees" \ + $(ALLSPHINXOPTS) "$(top_srcdir)/$${subdoc}" "$${subdoc}/_build/html" \ + ) +.PRECIOUS: doc/%/_build/texinfo/frr.texi +doc/%/_build/texinfo/frr.texi: doc/%/_build/.doctrees/environment.pickle + $(AM_V_SPHINX) ( \ + subdoc="$@"; subdoc="$${subdoc#doc/}"; subdoc="doc/$${subdoc%%/*}"; \ + $(SPHINXBUILD) -q -b texinfo -d "$${subdoc}/_build/.doctrees" \ + $(ALLSPHINXOPTS) "$(top_srcdir)/$${subdoc}" "$${subdoc}/_build/texinfo" \ + ) +doc/%/_build/texinfo/frr.info: doc/%/_build/texinfo/frr.texi + $(AM_V_MAKEINFO)$(MAKEINFO) --no-split -o '$@' '$<' +doc/%/_build/man/man.stamp: doc/%/_build/.doctrees/environment.pickle + $(AM_V_SPHINX) ( \ + subdoc="$@"; subdoc="$${subdoc#doc/}"; subdoc="doc/$${subdoc%%/*}"; \ + $(MKDIR_P) "$${subdoc}/_build/man"; touch $@.tmp; \ + $(SPHINXBUILD) -a -q -b man -d "$${subdoc}/_build/.doctrees" \ + $(ALLSPHINXOPTS) "$(top_srcdir)/$${subdoc}" "$${subdoc}/_build/man" && \ + mv $@.tmp $@ \ + ) + +# +# auxiliary sphinx targets (output name = directory, +# deps will not work very well) +# + +SPHINXTARGETS = \ + html dirhtml singlehtml pickle json \ + htmlhelp qthelp applehelp devhelp \ + epub latex text man texinfo gettext \ + changes linkcheck doctest coverage \ + xml pseudoxml \ + # end + +M_SPHINXTARGETS = $(addprefix doc/%/_build/,$(SPHINXTARGETS)) +.PRECIOUS: $(M_SPHINXTARGETS) +$(M_SPHINXTARGETS): doc/%/_build/.doctrees/environment.pickle + $(AM_V_SPHINX) ( \ + target="$@"; \ + builder="$${target##*/}"; \ + subdoc="$${target#doc/}"; subdoc="doc/$${subdoc%%/*}"; \ + rm -rf "$@"; \ + $(SPHINXBUILD) -q -b $${builder} -d $${subdoc}/_build/.doctrees \ + $(ALLSPHINXOPTS) $(top_srcdir)/$${subdoc} $@ \ + ) + +.PHONY: doc/%/_build/latexpdf +doc/%/_build/latexpdf: doc/%/_build/latex + @make -C $< all-pdf + +# If you want to build the developer's docs in other formats, try the +# following: +# +# $ cd developer +# $ make help + +# dist tarballs want doc sources +EXTRA_DIST += \ + doc/mpls/ChangeLog.opaque.txt \ + doc/mpls/ospfd.conf \ + doc/mpls/cli_summary.txt \ + doc/mpls/opaque_lsa.txt \ + doc/figures/cligraph.png \ + doc/figures/cligraph.svg \ + doc/figures/fig-normal-processing.dia \ + doc/figures/fig-normal-processing.png \ + doc/figures/fig-normal-processing.txt \ + doc/figures/fig-rs-processing.dia \ + doc/figures/fig-rs-processing.png \ + doc/figures/fig-rs-processing.txt \ + doc/figures/fig_topologies_full.dia \ + doc/figures/fig_topologies_full.png \ + doc/figures/fig_topologies_full.txt \ + doc/figures/fig_topologies_rs.dia \ + doc/figures/fig_topologies_rs.png \ + doc/figures/fig_topologies_rs.txt \ + doc/figures/fig-vnc-commercial-route-reflector.dia \ + doc/figures/fig-vnc-commercial-route-reflector.png \ + doc/figures/fig-vnc-commercial-route-reflector.txt \ + doc/figures/fig-vnc-frr-route-reflector.dia \ + doc/figures/fig-vnc-frr-route-reflector.png \ + doc/figures/fig-vnc-frr-route-reflector.txt \ + doc/figures/fig-vnc-gw.dia \ + doc/figures/fig-vnc-gw.png \ + doc/figures/fig-vnc-gw-rr.dia \ + doc/figures/fig-vnc-gw-rr.png \ + doc/figures/fig-vnc-gw-rr.txt \ + doc/figures/fig-vnc-gw.txt \ + doc/figures/fig-vnc-mesh.dia \ + doc/figures/fig-vnc-mesh.png \ + doc/figures/fig-vnc-mesh.txt \ + doc/figures/fig-vnc-redundant-route-reflectors.dia \ + doc/figures/fig-vnc-redundant-route-reflectors.png \ + doc/figures/fig-vnc-redundant-route-reflectors.txt \ + doc/figures/frr-icon.svg \ + doc/figures/frr-logo-icon.png \ + doc/figures/frr-logo-medium.png \ + doc/figures/frr-logo.png \ + doc/figures/frr-logo-small.png \ + doc/figures/git_branches.png \ + doc/figures/git_branches.svg \ + doc/figures/ospf_api_architecture.png \ + doc/figures/ospf_api_msghdr.png \ + doc/figures/ospf_api_msgs1.png \ + doc/figures/ospf_api_msgs2.png \ + doc/extra/frrlexer.py \ + # end + + +.PHONY: doc/help +doc/help: + @echo "Please use \`make doc/{user,manpages,developer}/' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" diff --git a/doc/user/Makefile b/doc/user/Makefile new file mode 100644 index 0000000000..840ee5b8a9 --- /dev/null +++ b/doc/user/Makefile @@ -0,0 +1,16 @@ +all: ALWAYS + @$(MAKE) -s -C ../.. doc-user +help: ALWAYS + @$(MAKE) -s -C ../.. doc/help +pdf: ALWAYS + @$(MAKE) -s -C ../.. doc/user/_build/latexpdf +info: ALWAYS + @$(MAKE) -s -C ../.. doc/user/_build/texinfo/frr.info +%: ALWAYS + @$(MAKE) -s -C ../.. doc/user/_build/$@ + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles +.SUFFIXES: diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am deleted file mode 100644 index 64af2ff145..0000000000 --- a/doc/user/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk - -# ----------------------------------------------------------------------------- -# Automake requires that 3rd-party Makefiles recognize these targets. -# ----------------------------------------------------------------------------- -# install -# install-data -# install-exec -# uninstall -# install-dvi -# install-html -# install-info -# install-ps -# install-pdf -# installdirs -# check -# installcheck -# mostlyclean -# clean -# distclean -# maintainer-clean -# dvi -# pdf -# ps -# info -# html -# tags -# ctags - -# When building 'all', the logic is that we want to make docs that are easily -# readable by the person that just built them. Technically the reST source is -# readable in its own right, but we'll also build info and html because those -# offer sequentially better reading experiences. PDF is not built by default -# because it takes quite a while. -all: info - -# info and html already have built-in sphinx rules; pdf goes to latexpdf -pdf: latexpdf - -# install user manual as info file -install-info: info - install -d ${DESTDIR}${infodir} - gzip < _build/texinfo/frr.info > ${DESTDIR}${infodir}/frr.info.gz - install-info _build/texinfo/frr.info ${DESTDIR}${infodir}/dir - -install-data: install-info - -install: install-data diff --git a/doc/user/subdir.am b/doc/user/subdir.am new file mode 100644 index 0000000000..6e51eed9d1 --- /dev/null +++ b/doc/user/subdir.am @@ -0,0 +1,110 @@ +# +# doc/user +# + +user_RSTFILES = \ + doc/user/babeld.rst \ + doc/user/ldpd.rst \ + doc/user/basic.rst \ + doc/user/bgp.rst \ + doc/user/bugs.rst \ + doc/user/conf.py \ + doc/user/eigrpd.rst \ + doc/user/filter.rst \ + doc/user/glossary.rst \ + doc/user/index.rst \ + doc/user/installation.rst \ + doc/user/ipv6.rst \ + doc/user/isisd.rst \ + doc/user/kernel.rst \ + doc/user/nhrpd.rst \ + doc/user/ospf6d.rst \ + doc/user/ospfd.rst \ + doc/user/ospf_fundamentals.rst \ + doc/user/overview.rst \ + doc/user/packet-dumps.rst \ + doc/user/pim.rst \ + doc/user/ripd.rst \ + doc/user/pbr.rst \ + doc/user/ripngd.rst \ + doc/user/routemap.rst \ + doc/user/routeserver.rst \ + doc/user/rpki.rst \ + doc/user/setup.rst \ + doc/user/sharp.rst \ + doc/user/snmp.rst \ + doc/user/snmptrap.rst \ + doc/user/static.rst \ + doc/user/vnc.rst \ + doc/user/vtysh.rst \ + doc/user/zebra.rst \ + doc/user/bfd.rst \ + doc/user/flowspec.rst \ + # end + +EXTRA_DIST += \ + $(user_RSTFILES) \ + doc/user/Useful_Sysctl_Settings.md \ + # end + +USERBUILD = doc/user/_build +$(USERBUILD)/.doctrees/environment.pickle: $(user_RSTFILES) + +# +# automake integration (things that should be built in "all") +# + +if DOC +nodist_noinst_DATA += $(USERBUILD)/texinfo/frr.info +endif +if DOC_HTML +nodist_noinst_DATA += $(USERBUILD)/html/.buildinfo +endif + +# +# standard targets +# + +.PHONY: info html pdf +info: $(USERBUILD)/texinfo/frr.info +html: $(USERBUILD)/html/.buildinfo +pdf: $(USERBUILD)/latexpdf + +# +# hook-ins for clean / install / doc +# + +.PHONY: clean-userdocs +clean-local: clean-userdocs +clean-userdocs: + -rm -rf "$(USERBUILD)" + +# INSTALL_INFO=install-info +.PHONY: install-info uninstall-info install-html uninstall-html + +install-info: $(USERBUILD)/texinfo/frr.info + $(MKDIR_P) "$(DESTDIR)$(infodir)" + $(INSTALL_DATA) "$<" "$(DESTDIR)$(infodir)" + [ -z "${DESTDIR}" ] && $(INSTALL_INFO) --info-dir="$(DESTDIR)$(infodir)" "$<" || true +uninstall-info: $(USERBUILD)/texinfo/frr.info + -rm -f "$(DESTDIR)$(infodir)/$<" + [ -z "${DESTDIR}" ] && $(INSTALL_INFO) --delete --info-dir="$(DESTDIR)$(infodir)" "$<" || true + +install-html: $(USERBUILD)/html/.buildinfo + $(MKDIR_P) "$(DESTDIR)$(htmldir)" + cp -r "$(USERBUILD)/html" "$(DESTDIR)$(htmldir)" +uninstall-html: + -rm -rf "$(DESTDIR)$(htmldir)/html" + +.PHONY: install-data-local uninstall-local +if DOC +DOC_INFO=info +install-data-local: install-info +uninstall-local: uninstall-info +endif +if DOC_HTML +DOC_HTML=html +install-data-local: install-html +uninstall-local: uninstall-html +endif +doc: $(DOC_INFO) $(DOC_HTML) diff --git a/lib/subdir.am b/lib/subdir.am index 50cfd70a57..8f1fad0a22 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -291,7 +291,7 @@ if GIT_VERSION # (even if gitversion.h's file timestamp doesn't change, make will think it # did, because of .PHONY...) -.PHONY: lib/gitversion.h.tmp +PHONY_GITVERSION=lib/gitversion.h.tmp .SILENT: lib/gitversion.h lib/gitversion.h.tmp GITH=lib/gitversion.h lib/gitversion.h.tmp: $(top_srcdir)/.git @@ -300,7 +300,8 @@ lib/gitversion.h: lib/gitversion.h.tmp { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH} else -.PHONY: lib/gitversion.h +PHONY_GITVERSION=lib/gitversion.h lib/gitversion.h: true endif +.PHONY: $(PHONY_GITVERSION) -- 2.39.5