summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-04-28 15:27:43 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-05-11 13:52:50 -0500
commit14321846e57f483f472590b1c5fe35891511312f (patch)
tree2066aec0f2c8d7ef4a2af2962ec289e582df404e /configure.ac
parent85be2e70b6ab28dd01638f115cd7cc4f1beda8da (diff)
downloadphosphor-fan-presence-14321846e57f483f472590b1c5fe35891511312f.tar.gz
phosphor-fan-presence-14321846e57f483f472590b1c5fe35891511312f.zip
Generate data from yaml during build
Run the python script to generate fan_zone_defs.cpp Change-Id: I242aa4246a277509ddbcf1c62fec96782a48b37b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eb6e086..93c1523 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,8 @@ AC_ARG_ENABLE([control],
AS_HELP_STRING([--disable-control], [Disable fan control package.]))
AC_ARG_ENABLE([cooling-type],
AS_HELP_STRING([--disable-cooling-type], [Disable cooling-type package.]))
+AC_ARG_ENABLE([monitor-type],
+ AS_HELP_STRING([--disable-monitor-type], [Disable monitor-type package.]))
AM_CONDITIONAL([WANT_PRESENCE], [test "x$enable_presence" != "xno"])
AM_CONDITIONAL([WANT_CONTROL], [test "x$enable_control" != "xno"])
@@ -115,6 +117,26 @@ AS_IF([test "x$enable_cooling-type" != "xno"], [
AC_CONFIG_FILES([chassis-cooling-type/Makefile])
])
AS_IF([test "x$enable_monitor" != "xno"], [
+
+ AC_ARG_VAR(FAN_MONITOR_YAML_FILE,
+ [The fan monitor definition file to use])
+ AS_IF([test "x$FAN_MONITOR_YAML_FILE" == "x"],
+ [FAN_MONITOR_YAML_FILE="${srcdir}/monitor/example/monitor.yaml"])
+ AC_DEFINE_UNQUOTED([FAN_MONITOR_YAML_FILE], ["$FAN_MONITOR_YAML_FILE"],
+ [The fan monitor definition file to use])
+
+ AC_ARG_VAR(FAN_MONITOR_OUTPUT_DIR,
+ [The output directory for the generated fan monitor data file])
+ AS_IF([test "x$FAN_MONITOR_OUTPUT_DIR" == "x"],
+ [FAN_MONITOR_OUTPUT_DIR="${srcdir}/monitor/"])
+ AC_DEFINE_UNQUOTED([FAN_MONITOR_OUTPUT_DIR], ["$FAN_MONITOR_OUTPUT_DIR"],
+ [The output directory for the generated fan monitor data file])
+
+ AC_SUBST([GEN_FAN_MONITOR_DEFS],
+ [$PYTHON ${srcdir}/monitor/gen-fan-monitor-defs.py \
+ -m $FAN_MONITOR_YAML_FILE \
+ -o $FAN_MONITOR_OUTPUT_DIR])
+
AC_CONFIG_FILES([monitor/Makefile])
])
OpenPOWER on IntegriCloud