Add error and metadata yaml for OCC metrics
This commit adds the error and metadata yaml for the OCC metrics
which would be logged when the host sends the ESEL info.
Change-Id: I0c1faba6d152f2bd4cbf504ece96eb36980f36ac
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index aa44203..7f3648f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,11 @@
liboemhandler_LTLIBRARIES = liboemhandler.la
liboemhandler_la_SOURCES = oemhandler.cpp \
- host-interface.cpp
+ host-interface.cpp \
+ org/open_power/OCC/Metrics/error.cpp
+
+BUILT_SOURCES = org/open_power/OCC/Metrics/error.hpp \
+ org/open_power/OCC/Metrics/error.cpp
liboemhandler_la_LDFLAGS = $(SYSTEMD_LIBS)\
$(SDBUSPLUS_LIBS) \
@@ -15,3 +19,11 @@
$(OPENPOWER_DBUS_INTERFACES_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
$(AM_CXXFLAGS)
+
+org/open_power/OCC/Metrics/error.hpp: ${top_srcdir}/org/open_power/OCC/Metrics.errors.yaml
+ @mkdir -p `dirname $@`
+ $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header org.open_power.OCC.Metrics > $@
+
+org/open_power/OCC/Metrics/error.cpp: ${top_srcdir}/org/open_power/OCC/Metrics.errors.yaml
+ @mkdir -p `dirname $@`
+ $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Metrics > $@