Skip to content

Commit

Permalink
Merge pull request #250 from martin-belanger/doc-v3
Browse files Browse the repository at this point in the history
doc: Clean up. Unable to generate usable RST from HTML.
  • Loading branch information
martin-belanger authored Oct 11, 2022
2 parents 08615fc + dca2214 commit 004d9b1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion doc/man/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ if want_man or want_html
docbklst = find_program('genlist-from-docbooks.py')
dbusgen = find_program('gdbus-codegen')

#if readthedocs
# pandoc = find_program('pandoc')
#endif

if xsltproc.found()
manpage_style = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
if run_command(xsltproc, '--nonet', manpage_style, check: false).returncode() != 0
Expand Down Expand Up @@ -101,7 +105,7 @@ if want_man or want_html

if want_html
html = stem + '.html'
custom_target(
html_file = custom_target(
html,
input: file,
output: html,
Expand All @@ -110,6 +114,25 @@ if want_man or want_html
install: want_html,
install_dir: join_paths(docdir, 'html')
)

# Convert HTML to RST
#if readthedocs
# rst = stem + '.rst'
# custom_target(
# rst,
# input: html_file,
# output: rst,
# build_by_default: true,
# command: [
# pandoc,
# '-f', 'html',
# '-t', 'rst',
# '-o', '@OUTPUT@',
# '@INPUT@'
# ]
# )
#endif
endif
endforeach
endif

2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

option('man', type: 'boolean', value: false, description: 'build and install man pages')
option('html', type: 'boolean', value: false, description: 'build and install html pages')
option('readthedocs', type: 'boolean', value: false, description: 'Only build documentation for Read The Docs')
option('readthedocs', type: 'boolean', value: false, description: 'to be used by Read-The-Docs documentation builder')
#option('check_pymodules', type: 'boolean', value: true, description: 'whether to look for missing python module')

0 comments on commit 004d9b1

Please sign in to comment.