diff --git a/man/meson.build b/man/meson.build index 48312c9..289ddec 100644 --- a/man/meson.build +++ b/man/meson.build @@ -1,8 +1,10 @@ mans = ['compton.1', 'compton-trans.1'] -a2x = find_program('a2x') -foreach m : mans - custom_target(m, output: [m], input: [m+'.asciidoc'], - command: [a2x, '--format', 'manpage', '@INPUT@', - '-D', meson.current_build_dir()], - install: true, install_dir: 'share/man/man1/') -endforeach +if get_option('build_docs') + a2x = find_program('a2x') + foreach m : mans + custom_target(m, output: [m], input: [m+'.asciidoc'], + command: [a2x, '--format', 'manpage', '@INPUT@', + '-D', meson.current_build_dir()], + install: true, install_dir: 'share/man/man1/') + endforeach +endif diff --git a/meson_options.txt b/meson_options.txt index 8855fb8..7748df6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,3 +9,5 @@ option('opengl', type: 'boolean', value: true, description: 'Enable features tha option('dbus', type: 'boolean', value: true, description: 'Enable suport for D-Bus remote control') option('xrescheck', type: 'boolean', value: false, description: 'Enable X resource leak checker (for debug only)') + +option('build_docs', type: 'boolean', value: false, description: 'Build documentation and man pages')