diff mbox series

trace-cmd meson: add options for doc and utest build

Message ID 20241210105743.453410-1-l.stach@pengutronix.de (mailing list archive)
State Accepted
Commit a1b8a0f5461af1ae0f9334b901d33886bd206e40
Headers show
Series trace-cmd meson: add options for doc and utest build | expand

Commit Message

Lucas Stach Dec. 10, 2024, 10:57 a.m. UTC
In some cases building documentation or utest is not desired.
Add meson options to allow skipping those build targets.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 meson.build       | 5 ++++-
 meson_options.txt | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 4773f4a941b1..237d9b400ea5 100644
--- a/meson.build
+++ b/meson.build
@@ -140,9 +140,11 @@  subdir('lib/trace-cmd')
 # trace-cmd
 subdir('tracecmd')
 subdir('python')
-if cunit_dep.found()
+if get_option('utest') and cunit_dep.found()
     subdir('utest')
 endif
+
+if get_option('doc')
 subdir('Documentation/trace-cmd')
 
 custom_target(
@@ -150,3 +152,4 @@  custom_target(
     output: 'docs',
     depends: [html, man],
     command: ['echo'])
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 2d5d7457bed5..37d72ff29d87 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,3 +21,7 @@  option('docbook-suppress-sp', type : 'boolean', value : false,
        description : 'docbook suppress sp')
 option('python', type : 'combo', choices : ['auto', 'true', 'false'],
        description : 'Generate trac-cmd Python bindings')
+option('doc', type : 'boolean', value: true,
+       description : 'produce documentation')
+option('utest', type : 'boolean', value: true,
+       description : 'build utest')