make man pages optional

pandoc is a monster

Signed-off-by: Aisha Tammy <floss@bsd.ac>
This commit is contained in:
Aisha Tammy 2021-03-01 12:12:25 -05:00
commit 103641c35c
No known key found for this signature in database
GPG key ID: C0E2E5A5205E152E
2 changed files with 21 additions and 18 deletions

View file

@ -237,25 +237,27 @@ executable(
c_args: fuzz_compile_args,
)
pandoc = find_program('pandoc')
mandir1 = join_paths(get_option('mandir'), 'man1')
mandir5 = join_paths(get_option('mandir'), 'man5')
if get_option('man-pages')
pandoc = find_program('pandoc')
mandir1 = join_paths(get_option('mandir'), 'man1')
mandir5 = join_paths(get_option('mandir'), 'man5')
cagebreak_man = custom_target('cagebreak_man',
output : 'cagebreak.1',
input : 'man/cagebreak.1.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir1
)
cagebreak_man = custom_target('cagebreak_man',
output : 'cagebreak.1',
input : 'man/cagebreak.1.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir1
)
cagebreak_man = custom_target('cagebreak_config_man',
output : 'cagebreak-config.5',
input : 'man/cagebreak-config.5.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir5
)
cagebreak_man = custom_target('cagebreak_config_man',
output : 'cagebreak-config.5',
input : 'man/cagebreak-config.5.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir5
)
endif
if get_option('fuzz')
subdir('fuzz')

View file

@ -1,3 +1,4 @@
option('xwayland', type: 'boolean', value: 'false', description: 'Enable support for X11 applications')
option('man-pages', type: 'boolean', value: 'false', description: 'Build man pages using pandoc')
option('fuzz', type: 'boolean', value: 'false', description: 'Enable building fuzzer targets')
option('version_override', type: 'string', description: 'Set the project version to the string specified. Used for creating hashes for reproducible builds.')