blob: 374022780d7e5e93b6a99f255db47961c3db7970 [file] [log] [blame]
Willy Tuc710b972021-08-11 16:33:43 -07001# Generate Configuration Files from Yaml
2python_exe = find_program('python3', 'python')
3
4sensor_yaml_script = files('sensor_gen.py')
5sensor_yaml_gen = run_command( \
6 python_exe, \
7 sensor_yaml_script, \
8 '-i', get_option('sensor-yaml-gen'), \
9 '-o', meson.project_build_root(), \
10 'generate-cpp')
11if sensor_yaml_gen.returncode() != 0
12 error(sensor_yaml_gen.stderr())
13endif
14
15invsensor_yaml_script = files('inventory-sensor.py')
16invsensor_yaml_gen = run_command( \
17 python_exe, \
18 invsensor_yaml_script, \
19 '-i', get_option('invsensor-yaml-gen'), \
20 '-o', meson.project_build_root(), \
21 'generate-cpp')
22if invsensor_yaml_gen.returncode() != 0
23 error(invsensor_yaml_gen.stderr())
24endif
25
26fru_yaml_script = files('fru_gen.py')
27fru_yaml_gen = run_command( \
28 python_exe, \
29 fru_yaml_script, \
30 '-i', get_option('fru-yaml-gen'), \
31 '-o', meson.project_build_root(), \
32 'generate-cpp')
33if fru_yaml_gen.returncode() != 0
34 error(fru_yaml_gen.stderr())
35endif