meson: skip index generation when lxml is not available

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-04-13 19:59:21 -04:00
parent 2895c8ee9f
commit b184e8feb9
2 changed files with 8 additions and 2 deletions

View file

@ -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 = custom_target(
'systemd.directives.xml', 'systemd.directives.xml',
input : source_xml_files, input : source_xml_files,
@ -114,7 +119,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
input : xml, input : xml,
output : man, output : man,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_man_xsl, '@INPUT@'], command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_man_xsl, '@INPUT@'],
install : want_man, install : want_man and have_lxml,
install_dir : mandirn) install_dir : mandirn)
man_pages += [p1] man_pages += [p1]
@ -123,7 +128,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
input : xml, input : xml,
output : html, output : html,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'], 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')) install_dir : join_paths(docdir, 'html'))
html_pages += [p2] html_pages += [p2]
endforeach endforeach

View file

@ -2236,6 +2236,7 @@ test('test-libudev-sym',
make_directive_index_py = find_program('tools/make-directive-index.py') make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-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('units')
subdir('sysctl.d') subdir('sysctl.d')