Skip to content

Commit 004d9b1

Browse files
Merge pull request #250 from martin-belanger/doc-v3
doc: Clean up. Unable to generate usable RST from HTML.
2 parents 08615fc + dca2214 commit 004d9b1

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

doc/man/meson.build

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if want_man or want_html
1313
docbklst = find_program('genlist-from-docbooks.py')
1414
dbusgen = find_program('gdbus-codegen')
1515

16+
#if readthedocs
17+
# pandoc = find_program('pandoc')
18+
#endif
19+
1620
if xsltproc.found()
1721
manpage_style = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
1822
if run_command(xsltproc, '--nonet', manpage_style, check: false).returncode() != 0
@@ -101,7 +105,7 @@ if want_man or want_html
101105

102106
if want_html
103107
html = stem + '.html'
104-
custom_target(
108+
html_file = custom_target(
105109
html,
106110
input: file,
107111
output: html,
@@ -110,6 +114,25 @@ if want_man or want_html
110114
install: want_html,
111115
install_dir: join_paths(docdir, 'html')
112116
)
117+
118+
# Convert HTML to RST
119+
#if readthedocs
120+
# rst = stem + '.rst'
121+
# custom_target(
122+
# rst,
123+
# input: html_file,
124+
# output: rst,
125+
# build_by_default: true,
126+
# command: [
127+
# pandoc,
128+
# '-f', 'html',
129+
# '-t', 'rst',
130+
# '-o', '@OUTPUT@',
131+
# '@INPUT@'
132+
# ]
133+
# )
134+
#endif
113135
endif
114136
endforeach
115137
endif
138+

meson_options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

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

0 commit comments

Comments
 (0)