[libcamera-devel,3/6] Documentation: Don't hardcode install directory

Message ID 20181211191011.6315-4-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Documentation: Initial Doxygen support
Related show

Commit Message

Laurent Pinchart Dec. 11, 2018, 7:10 p.m. UTC
Use the datadir option to select the directory in which to install
documentation. This defaults to $prefix/share so this doesn't introduce
any change in the default case.

While at is use join_paths() to join patch components instead of
hardcoding the / separator.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 Documentation/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Dec. 12, 2018, 1:28 p.m. UTC | #1
Hi Laurent,

Thank you for the patch,

On 11/12/2018 19:10, Laurent Pinchart wrote:
> Use the datadir option to select the directory in which to install
> documentation. This defaults to $prefix/share so this doesn't introduce
> any change in the default case.
> 
> While at is use join_paths() to join patch components instead of
> hardcoding the / separator.

Minor nit:   s/at is/at it/

> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


> ---
>  Documentation/meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/meson.build b/Documentation/meson.build
> index 49e6f3742ffe..57c3fdcf7cc7 100644
> --- a/Documentation/meson.build
> +++ b/Documentation/meson.build
> @@ -1,3 +1,5 @@
> +doc_install_dir = join_paths(get_option('datadir'), 'doc', 'libcamera-@0@'.format(api_version))
> +
>  sphinx = find_program('sphinx-build-3', required: false)
>  if not sphinx.found()
>      sphinx = find_program('sphinx-build', required: false)
> @@ -16,5 +18,5 @@ if sphinx.found()
>                    output: 'html',
>                    build_by_default: true,
>                    install: true,
> -                  install_dir: 'share/doc/libcamera-@0@'.format(api_version))
> +                  install_dir: doc_install_dir)
>  endif
>

Patch

diff --git a/Documentation/meson.build b/Documentation/meson.build
index 49e6f3742ffe..57c3fdcf7cc7 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -1,3 +1,5 @@ 
+doc_install_dir = join_paths(get_option('datadir'), 'doc', 'libcamera-@0@'.format(api_version))
+
 sphinx = find_program('sphinx-build-3', required: false)
 if not sphinx.found()
     sphinx = find_program('sphinx-build', required: false)
@@ -16,5 +18,5 @@  if sphinx.found()
                   output: 'html',
                   build_by_default: true,
                   install: true,
-                  install_dir: 'share/doc/libcamera-@0@'.format(api_version))
+                  install_dir: doc_install_dir)
 endif