summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-03-14 08:31:59 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-03-28 20:54:05 +0000
commit07ad064fa9156f6d1dca9930f9d16dcbad4fc1a5 (patch)
tree701403954fd556625c8bece0f87ea700b3da5a00
parent48e6be3407257f67f5d12d143fdc3a862db8803e (diff)
downloadopenpower-dbus-interfaces-07ad064fa9156f6d1dca9930f9d16dcbad4fc1a5.zip
openpower-dbus-interfaces-07ad064fa9156f6d1dca9930f9d16dcbad4fc1a5.tar.gz
Install YAML files
Install YAML files when installing the package. Change-Id: I7a086be5098dd1473f60cfe9cdbd7d4574400065 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r--Makefile.am7
-rw-r--r--Makefile.yaml.in1
-rw-r--r--configure.ac37
-rwxr-xr-xgenerate_yaml_makefile.sh13
4 files changed, 44 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 105f33a..c5627da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
AM_DEFAULT_SOURCE_EXT = .cpp
+if WANT_LIBOPENPOWER_DBUS
nobase_include_HEADERS = ## These get filled in by Makefile.interfaces
libopenpower_dbusdir = ${libdir}
@@ -16,3 +17,9 @@ pkgconfiglib_DATA = openpower-dbus-interfaces.pc
clean-local: clean-dbus
-include Makefile.interfaces
+endif
+
+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 35f80a2..d74c185 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,23 +16,32 @@ AC_CHECK_PROG([FIND], find, find)
AC_CHECK_PROG([BASENAME], basename, basename)
AC_CHECK_PROG([DIRNAME], dirname, dirname)
-AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
-AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
- AC_MSG_ERROR([Cannot find sdbus++]))
+AC_ARG_ENABLE([libopenpower_dbus],
+ AS_HELP_STRING([--disable-libopenpower_dbus], [Disable libopenpower_dbus]))
-# Check for baseline language coverage in the compiler for the C++14 standard
-AX_CXX_COMPILE_STDCXX_14([noext])
-AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
-AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
+AM_CONDITIONAL([WANT_LIBOPENPOWER_DBUS], [test "x$enable_libopenpower_dbus" != "xno"])
-# Checks for library functions.
-LT_INIT([dlopen disable-static shared])
-LT_LIB_DLLOAD
+AS_IF([test "x$enable_libopenpower_dbus" != "xno"], [
+ AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
+ AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
+ AC_MSG_ERROR([Cannot find sdbus++]))
-# Create configured output
-AC_CONFIG_FILES([Makefile.interfaces],
- [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces])
+ # Check for baseline language coverage in the compiler for the C++14 standard
+ AX_CXX_COMPILE_STDCXX_14([noext])
+ AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
+ AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
+
+ # Checks for library functions.
+ LT_INIT([dlopen disable-static shared])
+ LT_LIB_DLLOAD
+
+ # Create configured output
+ AC_CONFIG_FILES([Makefile.interfaces],
+ [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces])
+ AC_CONFIG_FILES([openpower-dbus-interfaces.pc])
+])
+AC_CONFIG_FILES([Makefile.yaml],
+ [${srcdir}/generate_yaml_makefile.sh ${srcdir} > Makefile.yaml])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([openpower-dbus-interfaces.pc])
AC_OUTPUT
diff --git a/generate_yaml_makefile.sh b/generate_yaml_makefile.sh
new file mode 100755
index 0000000..e2197d9
--- /dev/null
+++ b/generate_yaml_makefile.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd $1
+
+toplevel_dirs=org
+all_yaml=`find $toplevel_dirs -name "*.yaml"`
+
+echo "nobase_yaml_DATA = \\"
+for i in ${all_yaml};
+do
+ echo " ${i} \\"
+done
+echo
OpenPOWER on IntegriCloud