[tracker-miners/wip/carlosg/fix-manpages-install: 3/3] manpages: Fix installation of manpage files
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/fix-manpages-install: 3/3] manpages: Fix installation of manpage files
- Date: Mon, 7 Sep 2020 10:42:33 +0000 (UTC)
commit 0f570b01aa7dabc41fe32cb567e01379602d100f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 7 12:28:40 2020 +0200
manpages: Fix installation of manpage files
The xsltproc step has two small gotchas: the output does not happen on
stdout, so we are capturing empty stdout, and installing an empty file instead
of our nice manpages.
But also, the target filename gets determined by the XSL based on the input,
so a manpage filename is as defined in its NAME section. This means we cannot
do filename changes to add the version this late in the stage.
Furthermore, the daemons follow a versioned naming scheme that differ from
CLI tools (i.e. "tracker-*-3", not "tracker3-*").
Handle this all at once, specify per manpage target files that do match the
xsltproc output, and ensure the file gets generated at the current build dir.
docs/manpages/meson.build | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index 2ed21ca2d..0b8a64863 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -1,27 +1,31 @@
daemon_manpages = [
- 'miner-fs',
- 'writeback',
+ ['miner-fs', 'tracker-miner-fs-3', 1],
+ ['writeback', 'tracker-writeback-3', 1],
]
if have_tracker_miner_rss
- daemon_manpages += 'miner-rss'
+ daemon_manpages += [['miner-rss', 'tracker-miner-rss-3', 1]]
endif
cli_manpages = [
- 'daemon',
- 'extract',
- 'index',
- 'info',
- 'reset',
- 'search',
- 'status',
- 'tag',
+ ['daemon', 'tracker3-daemon', 1],
+ ['extract', 'tracker3-extract', 1],
+ ['index', 'tracker3-index', 1],
+ ['info', 'tracker3-info', 1],
+ ['reset', 'tracker3-reset', 1],
+ ['search', 'tracker3-search', 1],
+ ['status', 'tracker3-status', 1],
+ ['tag', 'tracker3-tag', 1],
]
foreach m : daemon_manpages + cli_manpages
- manpage_src = 'tracker-@0 1 txt'.format(m)
- manpage_xml = 'tracker-@0 1 xml'.format(m)
- manpage = 'tracker@0@-@1@.1'.format(tracker_api_major, m)
+ src = m[0]
+ dst = m[1]
+ section = m[2]
+
+ manpage_src = 'tracker-@0@.@1@.txt'.format(src, section)
+ manpage_xml = '@0@.@1@.xml'.format(dst, section)
+ manpage = '@0@.@1@'.format(dst, section)
xml = custom_target(manpage_xml,
command: [asciidoc,
@@ -37,12 +41,12 @@ foreach m : daemon_manpages + cli_manpages
custom_target(manpage,
command: [xsltproc,
+ '--output', '@OUTPUT@',
'--stringparam', 'man.authors.section.enabled', '0',
'/etc/asciidoc/docbook-xsl/manpage.xsl', '@INPUT@'],
- capture: true,
input: xml,
output: manpage,
install: true,
- install_dir: get_option('mandir') / 'man1'
+ install_dir: get_option('mandir') / 'man@0@'.format(section),
)
endforeach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]