1
0
Fork 0
pam/doc/guide-meson.build
Daniel Baumann 82f0236850
Adding upstream version 1.7.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 06:53:43 +02:00

90 lines
1.5 KiB
Meson

# -*- mode: meson -*-
guide = fs.name(meson.current_source_dir()).to_upper()
name = 'Linux-PAM_' + guide
xml = files(name + '.xml')
if guide == 'SAG'
toc_max_depth = '2'
else
toc_max_depth = '3'
endif
run_command(
[prog_xmllint,
'--noent',
'--nonet',
'--noout',
'--xinclude',
'--relaxng', docbook_rng,
xml],
check: true,
)
html = custom_target(
input: xml,
output: name + '.html',
command: [
prog_xsltproc,
'-o', '@OUTPUT@',
'--nonet',
'--xinclude',
'--stringparam', 'generate.toc', 'book toc',
'--stringparam', 'section.autolabel', '1',
'--stringparam', 'section.label.includes.component.label', '1',
'--stringparam', 'toc.max.depth', toc_max_depth,
txt_stylesheet,
'@INPUT@',
],
)
custom_target(
input: html,
output: name + '.txt',
command: [
redir_exe,
'@INPUT@',
'@OUTPUT@',
browser,
],
install: true,
install_dir: docdir,
install_tag: 'doc',
)
fop = custom_target(
input: xml,
output: name + '.fop',
command: [
prog_xsltproc,
'-o', '@OUTPUT@',
'--nonet',
'--xinclude',
'--stringparam', 'generate.toc', 'book toc',
'--stringparam', 'section.autolabel', '1',
'--stringparam', 'section.label.includes.component.label', '1',
'--stringparam', 'toc.max.depth', toc_max_depth,
pdf_stylesheet,
'@INPUT@',
],
)
custom_target(
input: fop,
output: name + '.pdf',
command: [
prog_fop,
'@INPUT@',
'@OUTPUT@',
],
install: true,
install_dir: pdfdir,
install_tag: 'doc',
)
subdir('html')