mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-25 12:49:38 +00:00
Merge pull request #2162 from qlyoung/fix-vpath-build
doc: support VPATH builds
This commit is contained in:
commit
6b50b12ac7
@ -1913,8 +1913,13 @@ AC_MSG_RESULT($ac_cv_htonl_works)
|
|||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
bgpd/Makefile
|
bgpd/Makefile
|
||||||
vtysh/Makefile
|
vtysh/Makefile
|
||||||
doc/Makefile tests/Makefile
|
doc/Makefile
|
||||||
bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile
|
doc/user/Makefile
|
||||||
|
doc/manpages/Makefile
|
||||||
|
doc/developer/Makefile
|
||||||
|
tests/Makefile
|
||||||
|
bgpd/rfp-example/rfptest/Makefile
|
||||||
|
bgpd/rfp-example/librfp/Makefile
|
||||||
redhat/frr.spec
|
redhat/frr.spec
|
||||||
debianpkg/Makefile
|
debianpkg/Makefile
|
||||||
debianpkg/changelog
|
debianpkg/changelog
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
|
|
||||||
SUBDIRS = manpages user
|
SUBDIRS = manpages user
|
||||||
AM_MAKEFLAGS = DESTDIR=${DESTDIR} infodir=${infodir} doczdir=${abs_srcdir}
|
AM_MAKEFLAGS = DESTDIR=${DESTDIR} infodir=${infodir}
|
||||||
|
|
||||||
MANPAGE_BUILDDIR = manpages/_build/man
|
MANPAGE_BUILDDIR = manpages/_build/man
|
||||||
|
|
||||||
|
2
doc/developer/.gitignore
vendored
2
doc/developer/.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/_templates
|
/_templates
|
||||||
/_build
|
/_build
|
||||||
!/Makefile
|
!/Makefile.in
|
||||||
|
@ -1 +0,0 @@
|
|||||||
include ../frr-sphinx.mk
|
|
8
doc/developer/Makefile.in
Normal file
8
doc/developer/Makefile.in
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# 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
|
@ -342,6 +342,14 @@ texinfo_documents = [
|
|||||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
#texinfo_no_detailmenu = False
|
#texinfo_no_detailmenu = False
|
||||||
|
|
||||||
|
# contents of ../extra/frrlexer.py.
|
||||||
|
# This is read here to support VPATH build. Since this section is execfile()'d
|
||||||
|
# with the file location, we can safely use a relative path here to save the
|
||||||
|
# contents of the lexer file for later use even if our relative path changes
|
||||||
|
# due to VPATH.
|
||||||
|
with open('../extra/frrlexer.py', 'rb') as lex:
|
||||||
|
frrlexerpy = lex.read()
|
||||||
|
|
||||||
# custom extensions here
|
# custom extensions here
|
||||||
def setup(app):
|
def setup(app):
|
||||||
# object type for FRR CLI commands, can be extended to document parent CLI
|
# object type for FRR CLI commands, can be extended to document parent CLI
|
||||||
@ -357,5 +365,5 @@ def setup(app):
|
|||||||
#
|
#
|
||||||
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
|
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
|
||||||
custom_namespace = {}
|
custom_namespace = {}
|
||||||
exec(open('../extra/frrlexer.py', 'rb').read(), custom_namespace)
|
exec(frrlexerpy, custom_namespace)
|
||||||
lexers['frr'] = custom_namespace['FRRLexer']()
|
lexers['frr'] = custom_namespace['FRRLexer']()
|
||||||
|
@ -10,6 +10,11 @@ SPHINXBUILD ?= sphinx-build
|
|||||||
PAPER ?=
|
PAPER ?=
|
||||||
BUILDDIR = _build
|
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
|
# User-friendly check for sphinx-build
|
||||||
ifneq ($(MAKECMDGOALS), clean)
|
ifneq ($(MAKECMDGOALS), clean)
|
||||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||||
@ -23,9 +28,9 @@ endif
|
|||||||
# Internal variables.
|
# Internal variables.
|
||||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||||
PAPEROPT_letter = -D latex_paper_size=letter
|
PAPEROPT_letter = -D latex_paper_size=letter
|
||||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCESDIR)
|
||||||
# the i18n builder cannot share the environment and doctrees with the others
|
# the i18n builder cannot share the environment and doctrees with the others
|
||||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCESDIR)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
|
2
doc/manpages/.gitignore
vendored
2
doc/manpages/.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/_templates
|
/_templates
|
||||||
/_build
|
/_build
|
||||||
!/Makefile
|
!/Makefile.in
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
include ../frr-sphinx.mk
|
# 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.
|
# Automake requires that 3rd-party Makefiles recognize these targets.
|
2
doc/user/.gitignore
vendored
2
doc/user/.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/_templates
|
/_templates
|
||||||
/_build
|
/_build
|
||||||
!/Makefile
|
!/Makefile.in
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
include ../frr-sphinx.mk
|
# 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.
|
# Automake requires that 3rd-party Makefiles recognize these targets.
|
@ -342,6 +342,14 @@ texinfo_documents = [
|
|||||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
#texinfo_no_detailmenu = False
|
#texinfo_no_detailmenu = False
|
||||||
|
|
||||||
|
# contents of ../extra/frrlexer.py.
|
||||||
|
# This is read here to support VPATH build. Since this section is execfile()'d
|
||||||
|
# with the file location, we can safely use a relative path here to save the
|
||||||
|
# contents of the lexer file for later use even if our relative path changes
|
||||||
|
# due to VPATH.
|
||||||
|
with open('../extra/frrlexer.py', 'rb') as lex:
|
||||||
|
frrlexerpy = lex.read()
|
||||||
|
|
||||||
# custom extensions here
|
# custom extensions here
|
||||||
def setup(app):
|
def setup(app):
|
||||||
# object type for FRR CLI commands, can be extended to document parent CLI
|
# object type for FRR CLI commands, can be extended to document parent CLI
|
||||||
@ -357,5 +365,5 @@ def setup(app):
|
|||||||
#
|
#
|
||||||
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
|
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
|
||||||
custom_namespace = {}
|
custom_namespace = {}
|
||||||
exec(open('../extra/frrlexer.py', 'rb').read(), custom_namespace)
|
exec(frrlexerpy, custom_namespace)
|
||||||
lexers['frr'] = custom_namespace['FRRLexer']()
|
lexers['frr'] = custom_namespace['FRRLexer']()
|
||||||
|
Loading…
Reference in New Issue
Block a user