controls: Update argument handling for controls generation scripts

The template file to the gen-controls.py and gen-py-controls.py is now
passed in through the '-t' or '--template' command line argument instead
of being a positional argument.  This will allow multiple input files to
be provided to the scripts in a future commit.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck
2023-11-29 09:05:38 +00:00
parent bd6658943a
commit bba4ec63c4
5 changed files with 20 additions and 20 deletions
+4 -3
View File
@@ -128,12 +128,13 @@ endif
control_sources = []
foreach source, mode : control_source_files
input_files = files(source +'.yaml', source + '.cpp.in')
input_files = files(source +'.yaml')
template_file = files(source + '.cpp.in')
control_sources += custom_target(source + '_cpp',
input : input_files,
output : source + '.cpp',
command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@',
'--mode', mode])
command : [gen_controls, '-o', '@OUTPUT@',
'--mode', mode, '-t', template_file, '@INPUT@'])
endforeach
libcamera_sources += control_sources