phosphor-settings-read-settings-mrw recipe

phosphor-settings-read-settings-mrw recipe calls gen_settings.pl
to replace any MRW variables in mrw-override-settings.yaml with
their MRW value.
The file generated by gen_settings.pl, mrw-settings.override.yaml,
is then used as an override of phosphor-settings.

mrw-override-settings.yaml by default is empty so no settings are
actually overwritten. A later commit will modify
mrw-override-settings.yaml in the Witherspoon layer.

Change-Id: I3134dbb834ff52abe5be589dd1d88444b8577254
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/common/recipes-phosphor/settings/phosphor-settings-manager.bb b/common/recipes-phosphor/settings/phosphor-settings-manager.bb
index 10938c9..3d4335d 100644
--- a/common/recipes-phosphor/settings/phosphor-settings-manager.bb
+++ b/common/recipes-phosphor/settings/phosphor-settings-manager.bb
@@ -16,6 +16,7 @@
 DEPENDS += "python-mako-native"
 DEPENDS += "autoconf-archive-native"
 DEPENDS += "virtual/phosphor-settings-defaults"
+DEPENDS += "${@cf_enabled(d, 'obmc-mrw', 'phosphor-settings-read-settings-mrw')}"
 DEPENDS += "sdbusplus sdbusplus-native"
 DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native"
 DEPENDS += "phosphor-logging"
@@ -46,6 +47,10 @@
     cmd = []
     cmd.append(os.path.join(workdir, 'merge_settings.py'))
     cmd.append(os.path.join(settingsdir, 'defaults.yaml'))
+    # Used for any settings from the MRW
+    use_mrw = cf_enabled(d, 'obmc-mrw', 'true')
+    if (use_mrw == 'true'):
+        cmd.append(os.path.join(settingsdir, 'mrw-settings.override.yaml'))
 
     fetch = bb.fetch2.Fetch([], d)
     override_urls = [url for url in fetch.urls if url.endswith('.override.yml')]