[libcamera-devel] [PATCH] py: meson: use files() for custom_target input files
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed May 11 11:06:05 CEST 2022
Hi Tomi,
Thank you for the patch.
On Wed, May 11, 2022 at 11:23:46AM +0300, Tomi Valkeinen wrote:
> Use files() for the input files for the custom_target(). I believe the
> current code works, but perhaps it is safer to use files() here.
And I think it's more in line with the meson recommendations.
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
> ---
> src/py/libcamera/meson.build | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
> index 0cd7c75b..3f7ddf1d 100644
> --- a/src/py/libcamera/meson.build
> +++ b/src/py/libcamera/meson.build
> @@ -17,10 +17,10 @@ pycamera_sources = files([
> 'pymain.cpp',
> ])
>
> -gen_input_files = [
> - meson.project_source_root() / 'src' / 'libcamera' / 'control_ids.yaml',
> +gen_input_files = files(
> + '../../libcamera/control_ids.yaml',
> 'pyenums_generated.cpp.in',
> -]
> +)
Interesting, I didn't know files() could take a list of files, as
opposed to an array. We always write
gen_input_files = files([
'../../libcamera/control_ids.yaml',
'pyenums_generated.cpp.in',
])
I'd do the same here for consistency, and remove the [] in a global
patch separately if desired. Is that OK with you ?
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> gen_py_control_enums = files('gen-py-control-enums.py')
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list