Commit d9be7312 authored by Canek Peláez's avatar Canek Peláez
Browse files

Clean up man pages and use meson style options.

parent f3668887
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
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

+10 −5
Original line number Diff line number Diff line
@@ -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')

+3 −3
Original line number Diff line number Diff line
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')