mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 14:59:44 +03:00
utils: codegen: Make users depend on controls.py
in meson
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 <barnabas.pocze@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
702af1a1d0
commit
d997e97512
5 changed files with 7 additions and 0 deletions
|
@ -90,6 +90,7 @@ foreach mode, entry : controls_map
|
|||
command : [gen_controls, '-o', '@OUTPUT@',
|
||||
'--mode', mode, '-t', template_file,
|
||||
'-r', ranges_file, '@INPUT@'],
|
||||
depend_files : [py_mod_controls],
|
||||
env : py_build_env,
|
||||
install : true,
|
||||
install_dir : libcamera_headers_install_dir)
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -16,4 +16,6 @@ gen_header = files('gen-header.sh')
|
|||
gen_ipa_pub_key = files('gen-ipa-pub-key.py')
|
||||
gen_tracepoints = files('gen-tp-header.py')
|
||||
|
||||
py_mod_controls = files('controls.py')
|
||||
|
||||
subdir('ipc')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue