meta-facebook: Refactored config file for meson.
Refactored platform specific config file to support
in meson upgradation.
Tested: Tested and verified with yosemitev2 and tiogapass
platform.
Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
Change-Id: If557b57d3e02a926728330407f71abfa07e7d40f
diff --git a/meson.build b/meson.build
index 6c4d0c5..7f7af29 100644
--- a/meson.build
+++ b/meson.build
@@ -78,3 +78,17 @@
override_options: ['b_lundef=false'],
install: true,
install_dir: get_option('libdir') / 'ipmid-providers')
+
+if get_option('machine') != ''
+ configfile = [
+ 'cri_sensors.json',
+ 'gpio_desc.json',
+ 'post_desc.json'
+ ]
+ foreach c : configfile
+ file = join_paths(get_option('machine'), c)
+ install_data(
+ sources : file,
+ install_dir : get_option('datadir') / 'lcd-debug' )
+ endforeach
+endif
diff --git a/meson_options.txt b/meson_options.txt
index edc2c52..1887aa3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,7 @@
'host-instances',
type: 'string',
description: 'Host Instances')
+option(
+ 'machine',
+ type: 'string',
+ description: 'Machine')
diff --git a/cri_sensors.json b/tiogapass/cri_sensors.json
similarity index 100%
rename from cri_sensors.json
rename to tiogapass/cri_sensors.json
diff --git a/gpio_desc.json b/tiogapass/gpio_desc.json
similarity index 100%
rename from gpio_desc.json
rename to tiogapass/gpio_desc.json
diff --git a/post_desc.json b/tiogapass/post_desc.json
similarity index 100%
rename from post_desc.json
rename to tiogapass/post_desc.json
diff --git a/post_desc.json b/yosemitev2/post_desc.json
similarity index 100%
copy from post_desc.json
copy to yosemitev2/post_desc.json