Install YAML files

Install YAML files when installing the package.

Change-Id: I7515fa625a9cb33bc9947f5472a178e38fe9a515
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/Makefile.am b/Makefile.am
index 354cfc9..f00e7d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,3 +17,8 @@
 
 -include Makefile.interfaces
 
+yamldir = ${pkgdatadir}/yaml
+nobase_yaml_DATA = ## Filled in by Makefile.yaml
+
+-include Makefile.yaml
+
diff --git a/Makefile.yaml.in b/Makefile.yaml.in
new file mode 100644
index 0000000..964f971
--- /dev/null
+++ b/Makefile.yaml.in
@@ -0,0 +1 @@
+# Empty file so that 'configure' attempts to generate Makefile.yaml
diff --git a/configure.ac b/configure.ac
index b4bcc07..2618cdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,9 @@
 # Create configured output
 AC_CONFIG_FILES([Makefile.interfaces],
     [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces])
+AC_CONFIG_FILES([Makefile.yaml],
+    [${srcdir}/generate_yaml_makefile.sh ${srcdir} > Makefile.yaml])
+
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([phosphor-dbus-interfaces.pc])
 AC_OUTPUT
diff --git a/generate_yaml_makefile.sh b/generate_yaml_makefile.sh
new file mode 100755
index 0000000..a6f014f
--- /dev/null
+++ b/generate_yaml_makefile.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd $1
+
+toplevel_dirs=xyz
+all_yaml=`find $toplevel_dirs -name "*.yaml"`
+
+echo "nobase_yaml_DATA = \\"
+for i in ${all_yaml};
+do
+    echo "	${i} \\"
+done
+echo