summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-13 19:59:21 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:28 -0400
commitb184e8feb913d08db059b0811d27ec5e564388a7 (patch)
tree0e1fbed6aaf085e9153d59806cdfed3d0ed361c1
parent2895c8ee9f28549438c1a522dd0e95ca52a6148c (diff)
meson: skip index generation when lxml is not available
-rw-r--r--man/meson.build9
-rw-r--r--meson.build1
2 files changed, 8 insertions, 2 deletions
diff --git a/man/meson.build b/man/meson.build
index c945c662f5..1b7b5a2419 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -85,6 +85,11 @@ endforeach
############################################################
+have_lxml = run_command(xml_helper_py).returncode() == 0
+if not have_lxml
+ message('python-lxml not available, not making man page indices')
+endif
+
systemd_directives_xml = custom_target(
'systemd.directives.xml',
input : source_xml_files,
@@ -114,7 +119,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
input : xml,
output : man,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_man_xsl, '@INPUT@'],
- install : want_man,
+ install : want_man and have_lxml,
install_dir : mandirn)
man_pages += [p1]
@@ -123,7 +128,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
input : xml,
output : html,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'],
- install : want_html,
+ install : want_html and have_lxml,
install_dir : join_paths(docdir, 'html'))
html_pages += [p2]
endforeach
diff --git a/meson.build b/meson.build
index ea65f1502a..cbc240122a 100644
--- a/meson.build
+++ b/meson.build
@@ -2236,6 +2236,7 @@ test('test-libudev-sym',
make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-index.py')
+xml_helper_py = find_program('tools/xml_helper.py')
subdir('units')
subdir('sysctl.d')