Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make man pages optional #4

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

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
)
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_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')
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -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.')