From ed2bb919e79715918a88646c15a6642e7dcd3a98 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 30 Mar 2024 16:28:59 +0100 Subject: [PATCH] meson: add switch to disable docs the make build system can do this too. Change-Id: I8c07d159cab54a8749c50dc33615f60bd251a86d --- meson.build | 6 +++++- meson.options | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5bb7d3738..dadb01b9c 100644 --- a/meson.build +++ b/meson.build @@ -71,6 +71,7 @@ foreach optname : path_opts endif endforeach +enable_docs = get_option('enable-docs') enable_tests = get_option('enable-tests') @@ -357,7 +358,10 @@ endif subdir('src') subdir('scripts') subdir('misc') -subdir('doc/manual') + +if enable_docs + subdir('doc/manual') +endif if enable_tests subdir('tests/unit') diff --git a/meson.options b/meson.options index 022727858..393d61c49 100644 --- a/meson.options +++ b/meson.options @@ -46,3 +46,7 @@ option('state-dir', type : 'string', value : '/nix/var', option('log-dir', type : 'string', value : '/nix/var/log', description : 'path to store logs in for Nix', ) + +option('enable-docs', type : 'boolean', value : true, + description : 'whether to build documentation', +)