mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-05 05:37:17 +00:00
meson: More flexible doc handling
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
fb15f1c0da
commit
2bd9ab6fc5
@ -57,13 +57,6 @@ if want_mans
|
||||
input: 'see_also.sgml.in',
|
||||
output: 'see_also.sgml')
|
||||
|
||||
# Config
|
||||
docconf = configuration_data()
|
||||
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
|
||||
docconf.set('builddir', '.')
|
||||
docconf.set('LXC_GENERATE_DATE', generate_date)
|
||||
docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
||||
# Initial templating.
|
||||
foreach page : PAGES
|
||||
sgml = configure_file(
|
||||
@ -74,7 +67,7 @@ if want_mans
|
||||
configure_file(
|
||||
input: sgml,
|
||||
output: page[0] + '.' + page[1],
|
||||
command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
command: [sgml2man, '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
install: true,
|
||||
install_dir: join_paths(mandir, 'ja', 'man' + page[1]))
|
||||
endforeach
|
||||
|
@ -50,13 +50,6 @@ if want_mans
|
||||
input: 'see_also.sgml.in',
|
||||
output: 'see_also.sgml')
|
||||
|
||||
# Config
|
||||
docconf = configuration_data()
|
||||
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
|
||||
docconf.set('builddir', '.')
|
||||
docconf.set('LXC_GENERATE_DATE', generate_date)
|
||||
docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
||||
# Initial templating.
|
||||
foreach page : PAGES
|
||||
sgml = configure_file(
|
||||
@ -67,7 +60,7 @@ if want_mans
|
||||
configure_file(
|
||||
input: sgml,
|
||||
output: page[0] + '.' + page[1],
|
||||
command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
command: [sgml2man, '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
install: true,
|
||||
install_dir: join_paths(mandir, 'ko', 'man' + page[1]))
|
||||
endforeach
|
||||
|
@ -57,13 +57,6 @@ if want_mans
|
||||
input: 'see_also.sgml.in',
|
||||
output: 'see_also.sgml')
|
||||
|
||||
# Config
|
||||
docconf = configuration_data()
|
||||
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
|
||||
docconf.set('builddir', '.')
|
||||
docconf.set('LXC_GENERATE_DATE', generate_date)
|
||||
docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
||||
# Initial templating.
|
||||
foreach page : PAGES
|
||||
sgml = configure_file(
|
||||
@ -74,7 +67,7 @@ if want_mans
|
||||
configure_file(
|
||||
input: sgml,
|
||||
output: page[0] + '.' + page[1],
|
||||
command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
command: [sgml2man, '--encoding=UTF-8', page[0] + '.sgml'],
|
||||
install: true,
|
||||
install_dir: join_paths(mandir, 'man' + page[1]))
|
||||
endforeach
|
||||
|
14
meson.build
14
meson.build
@ -212,6 +212,20 @@ generate_date = run_command(date, '--utc', '--date=@' + time_epoch, '+%Y-%m-%d',
|
||||
time_epoch = time_epoch.to_int()
|
||||
conf.set('TIME_EPOCH', time_epoch)
|
||||
|
||||
## Manpages.
|
||||
sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false)
|
||||
docbook2man = find_program('docbook2man', required: false)
|
||||
|
||||
docconf = configuration_data()
|
||||
docconf.set('builddir', '.')
|
||||
docconf.set('LXC_GENERATE_DATE', generate_date)
|
||||
docconf.set('PACKAGE_VERSION', version_data.get('LXC_VERSION'))
|
||||
if sgml2man.found() and docbook2man.found() and sgml2man.full_path() == docbook2man.full_path()
|
||||
docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"')
|
||||
else
|
||||
docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
|
||||
endif
|
||||
|
||||
## Threads.
|
||||
threads = dependency('threads')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user