+# SPDX-License-Identifier: LGPL-2.1+
+#
+# Copyright © 2017 Zbigniew Jędrzejewski-Szmek
+
# This is lame, I know, but meson has no other include mechanism
subdir('rules')
xsltproc_flags = [
'--nonet',
'--xinclude',
+ '--maxdepth', '9000',
'--stringparam', 'man.output.quietly', '1',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.authors.section.enabled', '0',
man_pages = []
html_pages = []
source_xml_files = []
-foreach tuple : manpages
+foreach tuple : xsltproc.found() ? manpages : []
stem = tuple[0]
section = tuple[1]
aliases = tuple[2]
mandirn = join_paths(get_option('mandir'), 'man' + section)
- if condition == '' or conf.get(condition, false)
+ if condition == '' or conf.get(condition) == 1
p1 = custom_target(
man,
input : xml,
output : htmlalias,
command : ['ln', '-fs', html, '@OUTPUT@'])
if want_html
- dst = join_paths(docdir, 'html', htmlalias)
+#if 0 /// This must be configurable in elogind
+# dst = join_paths(docdir, 'html', htmlalias)
+#else
+ dst = get_option('htmldir')
+ dst = dst != '' ? dst: join_paths(docdir, 'html', htmlalias)
+#endif // 0
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
p2 += [link]
output : 'elogind.index.xml',
command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
-foreach tuple : [['elogind.directives', '7', elogind_directives_xml],
- ['elogind.index', '7', elogind_index_xml]]
+foreach tuple : want_man or want_html ? [['elogind.directives', '7', elogind_directives_xml],
+ ['elogind.index', '7', elogind_index_xml]] : []
stem = tuple[0]
section = tuple[1]
xml = tuple[2]