From 98dc190cf119ead2d4007fddbd088257090e06a9 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Apr 2023 13:22:55 +0200 Subject: [PATCH] [meson] Added boolean options apidoc, htmldoc and pdfdoc. Default enabled If these options are false, the given part of documentation is not built. On slower machines it takes some time to generate apidocs or manual.pdf. --- doc/meson.build | 6 +++--- meson_options.txt | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) 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')