meson: add option to disable documentation
PATCH 1/3 meson: add option to disable documentation
From: Ross Burton <[email protected]>
Building the documentation shouldn't be mandatory, as it needs asciidoc and xmlto. Add a "docs" option, defaulting to true, to control whether the documentation should be built.
Signed-off-by Ross Burton <[email protected]>
--- meson.build | 15 +++++++++------ meson_options.txt | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-)
meson.build +9 -6
@@ -45,10 +45,13 @@ if cunit_dep.found() subdir('utest') endif subdir('samples') -subdir('Documentation') -custom_target( - 'docs', - output: 'docs', - depends: [html, man], - command: ['echo']) +if get_option('docs') + subdir('Documentation') + + custom_target( + 'docs', + output: 'docs', + depends: [html, man], + command: ['echo']) +endif
meson_options.txt +4 -0
@@ -4,6 +4,10 @@ option('plugindir', type : 'string', description : 'set the plugin dir') + +option('docs', type : 'boolean', value: true, + description : 'build documentation') + option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc', description : 'directory for HTML documentation') option('asciidoctor', type : 'boolean', value: false,
Signature · 1 line
2.34.1
PATCH 2/3 meson: build plugins as modules
From: Ross Burton <[email protected]>
Don't build the plugins with library() as that will install both static libraries and versioned shared libraries. Plugins are shared_modules().
Signed-off-by Ross Burton <[email protected]>
--- plugins/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
plugins/meson.build +1 -2
@@ -19,11 +19,10 @@ plugins = [ pdeps = [] foreach plugin : plugins - pdeps += library( + pdeps += shared_module( plugin.replace('.c', ''), plugin, name_prefix: '', - version: library_version, dependencies: [libtraceevent_dep], include_directories: [incdir], install: true,
Signature · 1 line
2.34.1
PATCH 3/3 meson: set the default plugindir to make Makefile
In reply to [email protected]From: Ross Burton <[email protected]>
The Makefiles install the plugins to $libdir/traceevent/plugins, so make the Meson build files install to the same location.
Signed-off-by Ross Burton <[email protected]>
--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir')) libdir = join_paths(prefixdir, get_option('libdir')) plugindir = get_option('plugindir') if plugindir == '' - plugindir = join_paths(libdir, 'libtraceevent/plugins') + plugindir = join_paths(libdir, 'traceevent/plugins') endif add_project_arguments(
Signature · 1 line
2.34.1