diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-02 14:42:28 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-02 17:15:31 -0400 |
| commit | 524ada7f2356a4f6cba31f07a75896681be105bc (patch) | |
| tree | 11079602e49605cbbca67543110425f6a2a2821d /doc/user/conf.py | |
| parent | d90b2b73cb174e781b796d2f9c7a9075e4327a59 (diff) | |
doc: support VPATH builds
Documentation was not fully using Automake / Autoconf and therefore needs
modifications to support black magic VPATH builds.
* Convert Makefile's to Autoconf-controlled Makefile.in's
* Tweak loading of pygments lexer to handle runtime paths
* Update .gitignore's as necessary
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'doc/user/conf.py')
| -rw-r--r-- | doc/user/conf.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/user/conf.py b/doc/user/conf.py index 886403b69d..3fced11024 100644 --- a/doc/user/conf.py +++ b/doc/user/conf.py @@ -342,6 +342,14 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #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 def setup(app): # 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") custom_namespace = {} - exec(open('../extra/frrlexer.py', 'rb').read(), custom_namespace) + exec(frrlexerpy, custom_namespace) lexers['frr'] = custom_namespace['FRRLexer']() |
