I am trying to migrate a repo from autotools build system to meson. The html pages for the manual are created using this simple command:
xsltproc html.xsl manual.xml
the manual.xml file contains a host of links to other .xml files in the same directory so the one command generates many html files in the same directory. Is it possible to create a custom_target or similar that can do just this so the resulting html files can be installed when ninja install is run?
I tried many variations using the custom_target syntax, including this one:
manual_stylesheet = files('html.xsl')
manual_command = [
xsltproc,
'-o', '@OUTPUT@',
manual_stylesheet,
'@INPUT@']
custom_target(man + '.html',
build_by_default: true,
output : man + '.html',
input : 'manual.xml',
command : manual_command,
install : true,
install_dir : join_paths(get_option('datadir'), 'doc', meson.project_name()))
All have failed so far as I can't find one which works for a single input file and many output files