[libcamera-devel] meson: Add target to generate tags with ctags

Message ID 20191026163950.8910-1-laurent.pinchart@ideasonboard.com
State New
Delegated to: Laurent Pinchart
Headers show
Series
  • [libcamera-devel] meson: Add target to generate tags with ctags
Related show

Commit Message

Laurent Pinchart Oct. 26, 2019, 4:39 p.m. UTC
This should be useful for ctags users. The tags file will be placed at
the root of the source tree, and is added to .gitignore.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 .gitignore  |  1 +
 meson.build | 11 +++++++++++
 2 files changed, 12 insertions(+)

Comments

Niklas Söderlund Oct. 28, 2019, 10:45 a.m. UTC | #1
Hi Laurent,

Thanks for your work.

On 2019-10-26 19:39:50 +0300, Laurent Pinchart wrote:
> This should be useful for ctags users. The tags file will be placed at
> the root of the source tree, and is added to .gitignore.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  .gitignore  |  1 +
>  meson.build | 11 +++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index e00516aaa716..0eefb058a8ef 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,3 +1,4 @@
>  build/
>  patches/
>  *.patch
> +tags
> diff --git a/meson.build b/meson.build
> index 72ad7c8b493b..e1997ed414f2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -85,3 +85,14 @@ pkg_mod.generate(libraries : libcamera,
>                   name : 'libcamera',
>                   filebase : 'camera',
>                   description : 'Complex Camera Support Library')
> +
> +run_target('ctags',
> +           command : [
> +               'ctags',
> +               '-o', '@0@/tags'.format(meson.current_source_dir()),
> +           ] + [
> +               libcamera_api,
> +               libcamera_ipa_api,
> +               libcamera_headers,
> +               libcamera_sources,
> +           ])
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/.gitignore b/.gitignore
index e00516aaa716..0eefb058a8ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@ 
 build/
 patches/
 *.patch
+tags
diff --git a/meson.build b/meson.build
index 72ad7c8b493b..e1997ed414f2 100644
--- a/meson.build
+++ b/meson.build
@@ -85,3 +85,14 @@  pkg_mod.generate(libraries : libcamera,
                  name : 'libcamera',
                  filebase : 'camera',
                  description : 'Complex Camera Support Library')
+
+run_target('ctags',
+           command : [
+               'ctags',
+               '-o', '@0@/tags'.format(meson.current_source_dir()),
+           ] + [
+               libcamera_api,
+               libcamera_ipa_api,
+               libcamera_headers,
+               libcamera_sources,
+           ])