diff options
author | Sami Kerola <kerolasa@iki.fi> | 2018-01-14 18:14:31 +0000 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2018-10-03 20:21:37 +0100 |
commit | 7c5fb18271cc41a261c9bdf1613bd4125ae8535d (patch) | |
tree | b7d244319d3aea58a796f5b1e1756ebf8e3d918c | |
parent | e87bb05362a47020f39d7ec3879db598892eee74 (diff) | |
download | iputils-7c5fb18271cc41a261c9bdf1613bd4125ae8535d.tar.gz |
docs: make html manuals work again
If enabled html manuals are installed to <prefix>/usr/share/iputils/
directory, that is probably a right location store these.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | doc/meson.build | 35 | ||||
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | meson_options.txt | 3 |
3 files changed, 34 insertions, 7 deletions
diff --git a/doc/meson.build b/doc/meson.build index 51f38b8..99f43a0 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,5 +1,6 @@ manpages = [] custom_man_xsl = files('custom-man.xsl') +custom_html_xsl = files('custom-html.xsl') if build_arping == true manpages += ['arping'] @@ -38,7 +39,15 @@ if build_ninfod == true endif xsltproc = find_program('xsltproc', required : false) -if xsltproc.found() +xsltproc_args = [ + '--nonet', + '--stringparam', 'man.output.quietly', '1', + '--stringparam', 'funcsynopsis.style', 'ansi', + '--stringparam', 'man.th.extra1.suppress', '1', + '--stringparam', 'iputils.version', meson.project_version(), +] + +if xsltproc.found() and build_mans == true foreach man : manpages custom_target(man + '.8', output : man + '.8', @@ -46,11 +55,7 @@ if xsltproc.found() command : [ xsltproc, '-o', '@OUTPUT@', - '--nonet', - '--stringparam', 'man.output.quietly', '1', - '--stringparam', 'funcsynopsis.style', 'ansi', - '--stringparam', 'man.th.extra1.suppress', '1', - '--stringparam', 'iputils.version', meson.project_version(), + xsltproc_args, custom_man_xsl, '@INPUT@', ], @@ -59,3 +64,21 @@ if xsltproc.found() ) endforeach endif + +if xsltproc.found() and build_html_mans == true + foreach man : manpages + custom_target(man + '.html', + output : man + '.html', + input : man + '.xml', + command : [ + xsltproc, + '-o', '@OUTPUT@', + xsltproc_args, + custom_html_xsl, + '@INPUT@', + ], + install : true, + install_dir : join_paths(get_option('datadir'), meson.project_name()), + ) + endforeach +endif diff --git a/meson.build b/meson.build index eaa63bc..9519add 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,7 @@ build_tracepath = get_option('BUILD_TRACEPATH') build_traceroute6 = get_option('BUILD_TRACEROUTE6') build_mans = get_option('BUILD_MANS') +build_html_mans = get_option('BUILD_HTML_MANS') if build_rinfod == true opt = get_option('ENABLE_RDISC_SERVER') @@ -210,7 +211,7 @@ if build_ninfod == true subdir ('ninfod') endif -if build_mans == true +if build_mans == true or build_html_mans == true subdir ('doc') endif diff --git a/meson_options.txt b/meson_options.txt index 9929692..44ff26b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,9 @@ option('BUILD_NINFOD', type : 'boolean', value : false, option('BUILD_MANS', type : 'boolean', value : true, description : 'Build manuals') +option('BUILD_HTML_MANS', type : 'boolean', value : false, + description : 'Build html manuals') + option('ARPING_DEFAULT_DEVICE', type : 'string', value : '', description : 'Default device for arping') |