diff --git a/doc/meson.build b/doc/meson.build index 12570e70..965c4b7d 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -241,7 +241,7 @@ manual_html_chunked = [] man1_dir = join_paths(get_option('prefix'), get_option('mandir'), 'man1') man5_dir = join_paths(get_option('prefix'), get_option('mandir'), 'man5') -if xmlto.found() +if xmlto.found() and get_option('htmldoc') elinks_1 = custom_target('elinks.1', input: [], output: 'elinks.1', @@ -277,7 +277,7 @@ endif manual_pdf = [] -if dblatex.found() +if dblatex.found() and get_option('pdfdoc') manual_pdf = custom_target('manual.pdf', input: [], output: 'manual.pdf', @@ -288,7 +288,7 @@ if dblatex.found() endif doxygen_api = [] -if doxygen.found() +if doxygen.found() and get_option('apidoc') doxygen_api = custom_target('api', input: [], output: 'api', diff --git a/meson_options.txt b/meson_options.txt index db10d2a7..47c4a95f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -74,3 +74,6 @@ option('mujs', type: 'boolean', value: false, description: 'use mujs library') option('codepoint', type: 'boolean', value: true, description: 'whether check codepoints on Linux console') option('test', type: 'boolean', value: false, description: 'whether build test programs') option('docdir', type: 'string', value: '', description: 'Documentation installation directory. Default $prefix/share/doc/elinks.') +option('apidoc', type: 'boolean', value: true, description: 'whether to generate API docs with doxygen') +option('htmldoc', type: 'boolean', value: true, description: 'whether to build html docs') +option('pdfdoc', type: 'boolean', value: true, description: 'whether to build manual.pdf')