From d997e97512908f3047d4bbc481590d4a1475ce1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 1 May 2025 10:51:02 +0200 Subject: utils: codegen: Make users depend on `controls.py` in meson MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, modifying `controls.py` does not make those build targets dirty that use a script that includes it (e.g. `gen-controls.py`) because meson has no knowledge of this dependency. Add `depend_files` to each `custom_target()` invocation to fix this. Ideally it would be possible to attach this dependency to `gen_controls`, `gen_gst_controls`, etc. objects themselves, so that repetition is avoided, but this does not seem possible at the moment. Signed-off-by: Barnabás Pőcze Acked-by: Kieran Bingham Acked-by: Jacopo Mondi Reviewed-by: Paul Elder --- src/gstreamer/meson.build | 1 + src/libcamera/meson.build | 1 + src/py/libcamera/meson.build | 2 ++ 3 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build index 6b7e53b5..fd83e073 100644 --- a/src/gstreamer/meson.build +++ b/src/gstreamer/meson.build @@ -33,6 +33,7 @@ libcamera_gst_sources += custom_target('gstlibcamera-controls.cpp', output : 'gstlibcamera-controls.cpp', command : [gen_gst_controls, '-o', '@OUTPUT@', '-t', gen_gst_controls_template, '@INPUT@'], + depend_files : [py_mod_controls], env : py_build_env) libcamera_gst_cpp_args = [ diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 800d4080..202db1ef 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -156,6 +156,7 @@ foreach mode, inout_files : controls_mode_files command : [gen_controls, '-o', '@OUTPUT@', '--mode', mode, '-t', template_file, '-r', ranges_file, '@INPUT@'], + depend_files : [py_mod_controls], env : py_build_env) endforeach diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index 0b38b124..33ab6579 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -20,6 +20,7 @@ pycamera_sources += custom_target('py_gen_controls', output : ['py_controls_generated.cpp'], command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@', '-t', gen_py_controls_template, '@INPUT@'], + depend_files : [py_mod_controls], env : py_build_env) pycamera_sources += custom_target('py_gen_properties', @@ -27,6 +28,7 @@ pycamera_sources += custom_target('py_gen_properties', output : ['py_properties_generated.cpp'], command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@', '-t', gen_py_controls_template, '@INPUT@'], + depend_files : [py_mod_controls], env : py_build_env) # Generate formats -- cgit v1.2.1