From d9be7312db26208cda64ad78fb9f4a67feee783b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= Date: Thu, 27 Jul 2017 11:12:27 -0500 Subject: [PATCH] Clean up man pages and use meson style options. --- man/meson.build | 16 ++++++++-------- meson.build | 15 ++++++++++----- meson_options.txt | 6 +++--- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/man/meson.build b/man/meson.build index 3a23852..27fb047 100644 --- a/man/meson.build +++ b/man/meson.build @@ -1,4 +1,4 @@ -if xsltproc.found() and get_option('enable-doc') +if xsltproc.found() and not get_option('disable_doc') customman = files('custom-man.xsl') customhtml = files('custom-html.xsl') @@ -15,33 +15,33 @@ if xsltproc.found() and get_option('enable-doc') command = [ xsltproc, '-o', '@OUTPUT@' ] + flags - manpages = [ 'analyze', 'copy-tags', 'tags' ] + pages = [ 'analyze', 'copy-tags', 'tags' ] man_pages = [] html_pages = [] - foreach manpage : manpages - stem = 'mlm-' + manpage + foreach page : pages + stem = 'mlm-' + page xml = stem + '.xml' html = stem + '.html' man = stem + '.1' mandir = join_paths(get_option('mandir'), 'man1') htmldir = join_paths(docdir, 'html') - p1 = custom_target(man, + mp = custom_target(man, input : xml, output : man, command : command + [ customman, '@INPUT@' ], install : true, install_dir : mandir ) - man_pages += [ p1 ] + man_pages += [ mp ] - p2 = custom_target(html, + hp = custom_target(html, input : xml, output : html, command : command + [ customhtml, '@INPUT@' ], install : true, install_dir : htmldir ) - html_pages += [ p2 ] + html_pages += [ hp ] endforeach diff --git a/meson.build b/meson.build index 59ec38f..852b566 100644 --- a/meson.build +++ b/meson.build @@ -65,27 +65,32 @@ mlm_includes = include_directories('lib/mlm') executable('mlm-accommodator', 'src/accommodator/accommodator.vala', dependencies: [ gee, gio ], include_directories: [ id3tagx_includes, mlm_includes ], - install: true, link_with: [ id3tagx, mlm ]) + link_with: [ id3tagx, mlm ], + install: true) executable('mlm-analyze', 'src/analyze/analyze.vala', dependencies: [ id3tag, gdkpixbuf, gee, gio ], include_directories: [ id3tagx_includes, mlm_includes ], - install: true, link_with: [ id3tagx, mlm ]) + link_with: [ id3tagx, mlm ], + install: true) executable('mlm-copy-tags', 'src/copy-tags/copy-tags.vala', dependencies: [ id3tag, gdkpixbuf, gee, gio ], include_directories: [ id3tagx_includes, mlm_includes ], - install: true, link_with: [ id3tagx, mlm ]) + link_with: [ id3tagx, mlm ], + install: true) executable('mlm-tags', 'src/tags/tags.vala', dependencies: [ gee ], include_directories: [ id3tagx_includes, mlm_includes ], - install: true, link_with: [ id3tagx, mlm ]) + link_with: [ id3tagx, mlm ], + install: true) executable('mlm-verify', 'src/verify/verify.vala', dependencies: [ id3tag, gdkpixbuf, gee, gio ], include_directories: [ id3tagx_includes, mlm_includes ], - install: true, link_with: [ id3tagx, mlm ]) + link_with: [ id3tagx, mlm ], + install: true) gnome = import('gnome') diff --git a/meson_options.txt b/meson_options.txt index 2c4e610..a27ed72 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,3 @@ -option('enable-doc', type: 'boolean', - value: true, - description: 'Enable generating the manual pages') +option('disable_doc', type: 'boolean', + value: false, + description: 'Disable generation of man pages') -- GitLab