blob: b739e6f6a5a23f9a02701c1cda9ec9c9ee265257 [file] [log] [blame]
Willy Tuc710b972021-08-11 16:33:43 -07001# Generate Configuration Files from Yaml
2python_exe = find_program('python3', 'python')
3
Patrick Williamsb69b2062022-07-25 09:40:49 -05004sensor_gen = custom_target('sensor-gen',
5 output: 'sensor-gen.cpp',
6 input: [ 'sensor_gen.py', get_option('sensor-yaml-gen')],
7 command: [
8 python_exe,
9 '@INPUT0@',
10 '-i', '@INPUT1@',
11 '-o', meson.current_build_dir(),
12 'generate-cpp',
13 ],
14)
15generated_src += sensor_gen
Willy Tuc710b972021-08-11 16:33:43 -070016
Patrick Williamsb69b2062022-07-25 09:40:49 -050017invsensor_gen = custom_target('invsensor-gen',
18 output: 'inventory-sensor-gen.cpp',
19 input: [ 'inventory-sensor.py', get_option('invsensor-yaml-gen')],
20 command: [
21 python_exe,
22 '@INPUT0@',
23 '-i', '@INPUT1@',
24 '-o', meson.current_build_dir(),
25 'generate-cpp',
26 ],
27)
28generated_src += invsensor_gen
Willy Tuc710b972021-08-11 16:33:43 -070029
Patrick Williamsb69b2062022-07-25 09:40:49 -050030fru_gen = custom_target('fru-gen',
31 output: 'fru-read-gen.cpp',
32 input: [ 'fru_gen.py', get_option('fru-yaml-gen') ],
33 command: [
34 python_exe,
35 '@INPUT0@',
36 '-i', '@INPUT1@',
37 '-o', meson.current_build_dir(),
38 'generate-cpp',
39 ],
40)
41generated_src += fru_gen