Skip to content

Commit

Permalink
build: non-recursive doc + parallel sphinx
Browse files Browse the repository at this point in the history
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 <equinox@diac24.net>
  • Loading branch information
eqvinox committed Aug 30, 2018
1 parent f177317 commit 9e53b31
Show file tree
Hide file tree
Showing 17 changed files with 581 additions and 650 deletions.
15 changes: 13 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
16 changes: 5 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Makefile
Makefile.in
!Makefile
mdate-sh
draft-zebra-00.txt
*.pdf
Expand Down
18 changes: 18 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -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:
Loading

0 comments on commit 9e53b31

Please sign in to comment.