build : provide extra properties yaml as config

Make it possible for the openpower-vpd-parser recipe to be able to
supply the extra properties YAML as configurable input.

Use extra-properties-example.yaml as input.

Change-Id: I3cfffa6bb9709b4dbf5c487ab198960cc52e3863
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 8d4b79b..870583d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-BUILT_SOURCES=fru-gen.cpp
+BUILT_SOURCES=fru-gen.cpp extra-properties-gen.cpp
 AM_DEFAULT_SOURCE_EXT = .cpp
 
 CLEANFILES=$(BUILT_SOURCES)
@@ -11,7 +11,7 @@
 phosphor_read_eeprom_LDADD = libwritefrudata.la
 
 lib_LTLIBRARIES = libwritefrudata.la
-libwritefrudata_la_SOURCES = frup.cpp fru-gen.cpp writefrudata.cpp
+libwritefrudata_la_SOURCES = frup.cpp fru-gen.cpp writefrudata.cpp extra-properties-gen.cpp
 libwritefrudata_la_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) $(SDBUSPLUS_LIBS) -version-info 1:0:0 -shared
 libwritefrudata_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS) $(SDBUSPLUS_CFLAGS)
 
@@ -23,3 +23,5 @@
 
 fru-gen.cpp:
 	$(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
+extra-properties-gen.cpp:
+	$(AM_V_GEN)@PROPGEN@
diff --git a/configure.ac b/configure.ac
index 8ff7c91..c1ef974 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,9 @@
 AS_IF([test "x$YAML_GEN" == "x"], [YAML_GEN="example.yaml"])
 FRUGEN="$PYTHON $srcdir/scripts/fru_gen.py -i $YAML_GEN"
 AC_SUBST(FRUGEN)
+AS_IF([test "x$PROP_YAML" == "x"], [PROP_YAML="extra-properties-example.yaml"])
+PROPGEN="$PYTHON $srcdir/scripts/extra-properties.py -e $PROP_YAML"
+AC_SUBST(PROPGEN)
 
 # Create configured output
 AC_CONFIG_FILES([Makefile])