| 1 |
xsltproc = find_program('xsltproc', required: false) |
| 2 |
assert(xsltproc.found(), 'xsltproc is required for man pages generation') |
| 3 |
|
| 4 |
xsltproc_cmd = [ |
| 5 |
xsltproc, |
| 6 |
'--output', '@OUTPUT@', |
| 7 |
'--nonet', |
| 8 |
'--stringparam', 'man.base.url.for.relative.links', pk_api_docpath + '/', |
| 9 |
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl', |
| 10 |
'@INPUT@', |
| 11 |
] |
| 12 |
|
| 13 |
mans = [ |
| 14 |
['polkit', '8'], |
| 15 |
['polkitd', '8'], |
| 16 |
['polkitd.conf', '5'], |
| 17 |
['pkexec', '1'], |
| 18 |
['pkcheck', '1'], |
| 19 |
['pkaction', '1'], |
| 20 |
['pkttyagent', '1'], |
| 21 |
] |
| 22 |
|
| 23 |
foreach man: mans |
| 24 |
xml = files(man[0] + '.xml') |
| 25 |
content_files += xml |
| 26 |
|
| 27 |
output = '@0@.@1@'.format(man[0], man[1]) |
| 28 |
|
| 29 |
custom_target( |
| 30 |
output, |
| 31 |
input: xml, |
| 32 |
output: output, |
| 33 |
command: xsltproc_cmd, |
| 34 |
install: true, |
| 35 |
install_dir: pk_mandir / ('man' + man[1]), |
| 36 |
) |
| 37 |
endforeach |