meson: move machine configs
Move the machine configs to a subdirectory and allow systems with
missing configs to pass the build by default.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia1b0a505697e54124c6d854c7ee8f74db1fbf884
diff --git a/tiogapass/cri_sensors.json b/configs/tiogapass/cri_sensors.json
similarity index 100%
rename from tiogapass/cri_sensors.json
rename to configs/tiogapass/cri_sensors.json
diff --git a/tiogapass/gpio_desc.json b/configs/tiogapass/gpio_desc.json
similarity index 100%
rename from tiogapass/gpio_desc.json
rename to configs/tiogapass/gpio_desc.json
diff --git a/tiogapass/post_desc.json b/configs/tiogapass/post_desc.json
similarity index 100%
rename from tiogapass/post_desc.json
rename to configs/tiogapass/post_desc.json
diff --git a/yosemitev2/cri_sensors.json b/configs/yosemitev2/cri_sensors.json
similarity index 100%
rename from yosemitev2/cri_sensors.json
rename to configs/yosemitev2/cri_sensors.json
diff --git a/yosemitev2/dimm_type.json b/configs/yosemitev2/dimm_type.json
similarity index 100%
rename from yosemitev2/dimm_type.json
rename to configs/yosemitev2/dimm_type.json
diff --git a/yosemitev2/gpio_desc.json b/configs/yosemitev2/gpio_desc.json
similarity index 100%
rename from yosemitev2/gpio_desc.json
rename to configs/yosemitev2/gpio_desc.json
diff --git a/yosemitev2/post_desc.json b/configs/yosemitev2/post_desc.json
similarity index 100%
rename from yosemitev2/post_desc.json
rename to configs/yosemitev2/post_desc.json
diff --git a/meson.build b/meson.build
index 4aedd81..8f93171 100644
--- a/meson.build
+++ b/meson.build
@@ -25,6 +25,8 @@
]),
language : 'cpp')
+fs = import('fs')
+
host_instances = '0'
if get_option('host-instances') != ''
host_instances = get_option('host-instances')
@@ -87,9 +89,14 @@
'post_desc.json'
]
foreach c : configfile
- file = join_paths(get_option('machine'), c)
- install_data(
- sources : file,
- install_dir : get_option('datadir') / 'lcd-debug' )
+ file = join_paths('configs', get_option('machine'), c)
+ if not fs.is_file(file)
+ warning('Missing config file: ' + file)
+ else
+ install_data(
+ sources : file,
+ install_dir : get_option('datadir') / 'lcd-debug'
+ )
+ endif
endforeach
endif