summaryrefslogtreecommitdiff
path: root/man/meson.build
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-06-03 11:58:07 +0200
committerSimon Ser <contact@emersion.fr>2020-12-10 10:17:19 +0100
commit05b0a955d33a7a1d6a3171f4051fa4ed2f3327a6 (patch)
tree63718704a492041e46555b9f743624417fe967f4 /man/meson.build
parent9a7afcf1982628ba85e0e0d8f96b43a56e20fef3 (diff)
man: convert to reStructuredText
DocBook makes it hard to write and maintain docs. Hopefully reStructuredText can make this less painful. The man pages were converted from DocBook to reStructuredText via Pandoc: pandoc -s -f docbook -t rst -o man/drm.7.rst man/drm.xml And then manual editing to fixup e.g. references to other man pages. To compare the result with the DocBook version, this command was used: rst2man man/drm-kms.7.rst | man -l - Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Diffstat (limited to 'man/meson.build')
-rw-r--r--man/meson.build57
1 files changed, 15 insertions, 42 deletions
diff --git a/man/meson.build b/man/meson.build
index 45eaeda0..92a4c375 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -18,50 +18,23 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-xsltproc_args = [
- '--stringparam', 'man.authors.section.enabled', '0',
- '--stringparam', 'man.copyright.section.enabled', '0',
- '--stringparam', 'funcsynopsis.style', 'ansi',
- '--stringparam', 'man.output.quietly', '1',
- '--nonet', manpage_style,
+rst_pages = [
+ ['drm', '7'],
+ ['drm-kms', '7'],
+ ['drm-memory', '7'],
+ ['drmAvailable', '3'],
+ ['drmHandleEvent', '3'],
+ ['drmModeGetResources', '3'],
]
-
-xmls = [
- ['drm', '7'], ['drm-kms', '7'], ['drm-memory', '7'], ['drmAvailable', '3'],
- ['drmHandleEvent', '3'], ['drmModeGetResources', '3']
-]
-foreach x : xmls
- m = x[0]
- s = x[1]
- custom_target(
- m,
- input : files('@0@.xml'.format(m)),
- output : '@0@.@1@'.format(m, s),
- command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT0@'],
- install : true,
- install_dir : join_paths(get_option('mandir'), 'man@0@'.format(s)),
- build_by_default : true,
- )
-endforeach
-
-foreach x : ['drm-mm', 'drm-gem', 'drm-ttm']
- gen = custom_target(
- 'gen-@0@'.format(x),
- input : 'drm-memory.xml',
- output : '@0@.xml'.format(x),
- command : [
- prog_sed, '-e', 's@^\.so \([a-z_]\+\)\.\([0-9]\)$$@\.so man\2\/\1\.\2@',
- '@INPUT@',
- ],
- capture : true,
- )
+foreach page : rst_pages
+ name = page[0] + '.' + page[1]
+ rst = files(name + '.rst')
custom_target(
- '@0@.7'.format(x),
- input : gen,
- output : '@0@.7'.format(x, '7'),
- command : [prog_xslt, '-o', '@OUTPUT@', xsltproc_args, '@INPUT@'],
+ name,
+ input : rst,
+ output : name,
+ command : [prog_rst2man, '@INPUT@', '@OUTPUT@'],
install : true,
- install_dir : join_paths(get_option('mandir'), 'man7'),
- build_by_default : true,
+ install_dir : join_paths(get_option('mandir'), 'man' + page[1]),
)
endforeach