[PATCH] meson: Add documentation installation directory option

Chris Mayo posted 1 patch 3 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210226191106.83176-1-aklhfex@gmail.com
meson.build       | 6 +++++-
meson_options.txt | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
[PATCH] meson: Add documentation installation directory option
Posted by Chris Mayo 3 years, 1 month ago
Allow the directory to be chosen at installation time, to support local
conventions e.g. versioning.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
---
 meson.build       | 6 +++++-
 meson_options.txt | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 369548f127..5c7a335947 100644
--- a/meson.build
+++ b/meson.build
@@ -83,8 +83,12 @@ mandir = prefix / get_option('mandir')
 sbindir = prefix / get_option('sbindir')
 sharedstatedir = prefix / get_option('sharedstatedir')
 
+docdir = get_option('docdir')
+if docdir == ''
+  docdir = datadir / 'doc' / meson.project_name()
+endif
+
 confdir = sysconfdir / meson.project_name()
-docdir = datadir / 'doc' / meson.project_name()
 pkgdatadir = datadir / meson.project_name()
 
 
diff --git a/meson_options.txt b/meson_options.txt
index e5d79c2b6b..2606648b64 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,6 +7,7 @@ option('expensive_tests', type: 'feature', value: 'auto', description: 'set the
 option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
 option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
 option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries')
+option('docdir', type: 'string', value: '', description: 'documentation installation directory')
 option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation')
 option('tests', type: 'feature', value: 'auto', description: 'whether to build tests')
 
-- 
2.28.0

Re: [PATCH] meson: Add documentation installation directory option
Posted by Daniel Henrique Barboza 3 years, 1 month ago

On 2/26/21 4:11 PM, Chris Mayo wrote:
> Allow the directory to be chosen at installation time, to support local
> conventions e.g. versioning.
> 
> Signed-off-by: Chris Mayo <aklhfex@gmail.com>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   meson.build       | 6 +++++-
>   meson_options.txt | 1 +
>   2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 369548f127..5c7a335947 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -83,8 +83,12 @@ mandir = prefix / get_option('mandir')
>   sbindir = prefix / get_option('sbindir')
>   sharedstatedir = prefix / get_option('sharedstatedir')
>   
> +docdir = get_option('docdir')
> +if docdir == ''
> +  docdir = datadir / 'doc' / meson.project_name()
> +endif
> +
>   confdir = sysconfdir / meson.project_name()
> -docdir = datadir / 'doc' / meson.project_name()
>   pkgdatadir = datadir / meson.project_name()
>   
>   
> diff --git a/meson_options.txt b/meson_options.txt
> index e5d79c2b6b..2606648b64 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -7,6 +7,7 @@ option('expensive_tests', type: 'feature', value: 'auto', description: 'set the
>   option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
>   option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
>   option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries')
> +option('docdir', type: 'string', value: '', description: 'documentation installation directory')
>   option('docs', type: 'feature', value: 'auto', description: 'whether to generate documentation')
>   option('tests', type: 'feature', value: 'auto', description: 'whether to build tests')
>   
> 

Re: [PATCH] meson: Add documentation installation directory option
Posted by Michal Privoznik 3 years, 1 month ago
On 3/4/21 12:33 PM, Daniel Henrique Barboza wrote:
> 
> 
> On 2/26/21 4:11 PM, Chris Mayo wrote:
>> Allow the directory to be chosen at installation time, to support local
>> conventions e.g. versioning.
>>
>> Signed-off-by: Chris Mayo <aklhfex@gmail.com>
>> ---
> 
> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

Pushed. Congratulations on your first libvirt contribution!

Michal