Install error yaml files to shared location

Change-Id: Id7ffc23fbea28f303521bb04faaaa13b931a3e09
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 3044e38..b883f94 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
+if !INSTALL_ERROR_YAML
 # Build these headers, don't install them
 noinst_HEADERS = \
 	occ_pass_through.hpp \
@@ -75,3 +76,10 @@
 	$(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Device > $@
 
 SUBDIRS = . test
+endif
+
+# Export error YAML to shared location
+yamldir = ${datadir}/phosphor-dbus-yaml/yaml
+nobase_yaml_DATA = \
+	org/open_power/OCC/Device.errors.yaml \
+	org/open_power/OCC/Device.metadata.yaml