Skip to content

Commit

Permalink
Merge pull request #2977 from opensourcerouting/doc-fix
Browse files Browse the repository at this point in the history
build: fix not building docs w/o sphinx
  • Loading branch information
donaldsharp committed Sep 9, 2018
2 parents 5381b93 + a214288 commit eac04cf
Show file tree
Hide file tree
Showing 23 changed files with 49 additions and 35 deletions.
2 changes: 1 addition & 1 deletion bfdd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noinst_LIBRARIES += bfdd/libbfd.a
sbin_PROGRAMS += bfdd/bfdd
dist_examples_DATA += bfdd/bfdd.conf.sample
vtysh_scan += $(top_srcdir)/bfdd/bfdd_vty.c
rstman8_DATA += $(MANBUILD)/bfdd.8
man8 += $(MANBUILD)/bfdd.8
endif

bfdd_libbfd_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion bgpd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ endif
if RPKI
module_LTLIBRARIES += bgpd/bgpd_rpki.la
endif
rstman8_DATA += $(MANBUILD)/bgpd.8
man8 += $(MANBUILD)/bgpd.8
endif

bgpd_libbgp_a_SOURCES = \
Expand Down
11 changes: 8 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,13 @@ FRR_INCLUDES
])dnl

dnl disable doc check
AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build sphinx-build3 sphinx-build2], [no])
AM_CONDITIONAL(DOC, test "${enable_doc}" != "no")
AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build sphinx-build3 sphinx-build2], [/bin/false])
if test "$SPHINXBUILD" = "/bin/false"; then
if test "${enable_doc}" = "yes"; then
AC_MSG_ERROR([Documentation was explicitly requested with --enable-doc but sphinx-build is not available. Please disable docs or install sphinx.])
fi
fi
AM_CONDITIONAL(DOC, test "${enable_doc}" != "no" -a "$SPHINXBUILD" != "/bin/false")
AM_CONDITIONAL(DOC_HTML, test "${enable_doc_html}" = "yes")

dnl --------------------
Expand Down Expand Up @@ -2044,6 +2049,6 @@ The above user and group must have read/write access to the state file
directory and to the config files in the config file directory."

if test "${enable_doc}" != "no";then
AS_IF([test "x$SPHINXBUILD" = xno],
AS_IF([test "$SPHINXBUILD" = /bin/false],
AC_MSG_WARN(sphinx-build is missing but required to build documentation))
fi
9 changes: 5 additions & 4 deletions doc/developer/building-frr-for-centos6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ an example.)
--enable-eigrpd \
--enable-babeld \
--with-pkg-git-version \
--with-pkg-extra-version=-MyOwnFRRVersion
make SPHINXBUILD=sphinx-build2.7
make check PYTHON=/usr/bin/python2.7 SPHINXBUILD=sphinx-build2.7
sudo make SPHINXBUILD=sphinx-build2.7 install
--with-pkg-extra-version=-MyOwnFRRVersion \
SPHINXBUILD=sphinx-build2.7
make
make check PYTHON=/usr/bin/python2.7
sudo make install
Create empty FRR configuration files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
10 changes: 8 additions & 2 deletions doc/manpages/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ rstman8dir = $(mandir)/man8
rstman1_DATA =
rstman8_DATA =

rstman1_DATA += $(MANBUILD)/frr.1
if DOC
rstman1_DATA += $(man1)
rstman8_DATA += $(man8)
endif # DOC

man1 = $(MANBUILD)/frr.1
man8 =

# dependency
$(rstman8_DATA) $(rstman1_DATA): $(MANBUILD)/man.stamp
$(man8) $(man1): $(MANBUILD)/man.stamp

#
# hook-ins for clean / doc
Expand Down
2 changes: 1 addition & 1 deletion eigrpd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vtysh_scan += \
$(top_srcdir)/eigrpd/eigrp_vty.c \
# end
# $(top_srcdir)/eigrpd/eigrp_routemap.c
rstman8_DATA += $(MANBUILD)/eigrpd.8
man8 += $(MANBUILD)/eigrpd.8
endif

eigrpd_libeigrp_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion isisd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vtysh_scan += \
$(top_srcdir)/isisd/isis_vty_isisd.c \
$(top_srcdir)/isisd/isisd.c \
# end
rstman8_DATA += $(MANBUILD)/isisd.8
man8 += $(MANBUILD)/isisd.8
endif

if FABRICD
Expand Down
2 changes: 1 addition & 1 deletion ldpd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noinst_LIBRARIES += ldpd/libldp.a
sbin_PROGRAMS += ldpd/ldpd
dist_examples_DATA += ldpd/ldpd.conf.sample
vtysh_scan += $(top_srcdir)/ldpd/ldp_vty_cmds.c
rstman8_DATA += $(MANBUILD)/ldpd.8
man8 += $(MANBUILD)/ldpd.8
endif

ldpd_libldp_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion nhrpd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if NHRPD
sbin_PROGRAMS += nhrpd/nhrpd
vtysh_scan += $(top_srcdir)/nhrpd/nhrp_vty.c
rstman8_DATA += $(MANBUILD)/nhrpd.8
man8 += $(MANBUILD)/nhrpd.8
endif

nhrpd_nhrpd_LDADD = lib/libfrr.la @LIBCAP@ @CARES_LIBS@
Expand Down
2 changes: 1 addition & 1 deletion ospf6d/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ vtysh_scan += \
if SNMP
module_LTLIBRARIES += ospf6d/ospf6d_snmp.la
endif
rstman8_DATA += $(MANBUILD)/ospf6d.8
man8 += $(MANBUILD)/ospf6d.8
endif

ospf6d_libospf6_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion ospfclient/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if OSPFCLIENT
lib_LTLIBRARIES += ospfclient/libfrrospfapiclient.la
sbin_PROGRAMS += ospfclient/ospfclient
rstman8_DATA += $(MANBUILD)/ospfclient.8
man8 += $(MANBUILD)/ospfclient.8
endif

ospfclient_libfrrospfapiclient_la_LDFLAGS = -version-info 0:0:0
Expand Down
2 changes: 1 addition & 1 deletion ospfd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ vtysh_scan += \
if SNMP
module_LTLIBRARIES += ospfd/ospfd_snmp.la
endif
rstman8_DATA += $(MANBUILD)/ospfd.8
man8 += $(MANBUILD)/ospfd.8
endif

ospfd_libfrrospf_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion pbrd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vtysh_scan += \
$(top_srcdir)/pbrd/pbr_vty.c \
$(top_srcdir)/pbrd/pbr_debug.c \
# end
rstman8_DATA += $(MANBUILD)/pbrd.8
man8 += $(MANBUILD)/pbrd.8
endif

pbrd_libpbr_a_SOURCES = \
Expand Down
4 changes: 2 additions & 2 deletions pimd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ bin_PROGRAMS += pimd/mtracebis
noinst_PROGRAMS += pimd/test_igmpv3_join
dist_examples_DATA += pimd/pimd.conf.sample
vtysh_scan += $(top_srcdir)/pimd/pim_cmd.c
rstman8_DATA += $(MANBUILD)/pimd.8
rstman8_DATA += $(MANBUILD)/mtracebis.8
man8 += $(MANBUILD)/pimd.8
man8 += $(MANBUILD)/mtracebis.8
endif

pimd_libpim_a_SOURCES = \
Expand Down
5 changes: 3 additions & 2 deletions redhat/README.rpm_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ Building your own FRRouting RPM

cd frr
./bootstrap.sh
./configure --with-pkg-extra-version=-MyRPMVersion
make SPHINXBUILD=sphinx-build2.7 dist
./configure --with-pkg-extra-version=-MyRPMVersion \
SPHINXBUILD=sphinx-build2.7
make dist
Note: configure parameters are not important for the RPM building - except the `with-pkg-extra-version` if you want to give the RPM a specific name to
mark your own unoffical build
Expand Down
11 changes: 6 additions & 5 deletions redhat/frr.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -343,22 +343,23 @@ developing OSPF-API and frr applications.
--disable-rpki \
%endif
%if %{with_bfdd}
--enable-bfdd
--enable-bfdd \
%else
--disable-bfdd
--disable-bfdd \
%endif
SPHINXBUILD=%{sphinx}

make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" SPHINXBUILD=%{sphinx}
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"

pushd doc
make SPHINXBUILD=%{sphinx} info
make info
popd


%install
mkdir -p %{buildroot}%{_sysconfdir}/{frr,sysconfig,logrotate.d,pam.d,default} \
%{buildroot}%{_localstatedir}/log/frr %{buildroot}%{_infodir}
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" SPHINXBUILD=%{sphinx} install
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install

# Remove this file, as it is uninstalled and causes errors when building on RH9
rm -rf %{buildroot}/usr/share/info/dir
Expand Down
2 changes: 1 addition & 1 deletion ripd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ vtysh_scan += \
if SNMP
module_LTLIBRARIES += ripd/ripd_snmp.la
endif
rstman8_DATA += $(MANBUILD)/ripd.8
man8 += $(MANBUILD)/ripd.8
endif

ripd_librip_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion ripngd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vtysh_scan += \
$(top_srcdir)/ripngd/ripng_zebra.c \
$(top_srcdir)/ripngd/ripngd.c \
# end
rstman8_DATA += $(MANBUILD)/ripngd.8
man8 += $(MANBUILD)/ripngd.8
endif

ripngd_libripng_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion sharpd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noinst_LIBRARIES += sharpd/libsharp.a
sbin_PROGRAMS += sharpd/sharpd
dist_examples_DATA += sharpd/sharpd.conf.sample
vtysh_scan += $(top_srcdir)/sharpd/sharp_vty.c
rstman8_DATA += $(MANBUILD)/sharpd.8
man8 += $(MANBUILD)/sharpd.8
endif

sharpd_libsharp_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion staticd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noinst_LIBRARIES += staticd/libstatic.a
sbin_PROGRAMS += staticd/staticd
dist_examples_DATA += staticd/staticd.conf.sample
vtysh_scan += $(top_srcdir)/staticd/static_vty.c
rstman8_DATA += $(MANBUILD)/staticd.8
man8 += $(MANBUILD)/staticd.8
endif

staticd_libstatic_a_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion vtysh/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if VTYSH
bin_PROGRAMS += vtysh/vtysh
dist_examples_DATA += vtysh/vtysh.conf.sample
rstman1_DATA += $(MANBUILD)/vtysh.1
man1 += $(MANBUILD)/vtysh.1
endif

vtysh_vtysh_SOURCES = \
Expand Down
2 changes: 1 addition & 1 deletion watchfrr/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if WATCHFRR
sbin_PROGRAMS += watchfrr/watchfrr
vtysh_scan += $(top_srcdir)/watchfrr/watchfrr_vty.c
rstman8_DATA += $(MANBUILD)/watchfrr.8
man8 += $(MANBUILD)/watchfrr.8
endif

noinst_HEADERS += \
Expand Down
2 changes: 1 addition & 1 deletion zebra/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if FPM
module_LTLIBRARIES += zebra/zebra_fpm.la
endif

rstman8_DATA += $(MANBUILD)/zebra.8
man8 += $(MANBUILD)/zebra.8
## endif ZEBRA
endif

Expand Down

0 comments on commit eac04cf

Please sign in to comment.