From 92cea96ccc7b6a7dc52ed0d64356fc67ab1422c1 Mon Sep 17 00:00:00 2001 From: Deepak Kodihalli Date: Wed, 25 Jan 2017 10:50:23 -0600 Subject: build: add rule to generate fru-gen.hpp fru-gen.hpp needs as input a YAML file. Enable this to be provided via autotools configuration. Change-Id: I586c14651840b6a9697a93261f79c2a48f14071f Signed-off-by: Deepak Kodihalli --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ae03a47..18fd1d0 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,9 @@ AM_PROG_AR AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S +AM_PATH_PYTHON([2.7], + [AC_SUBST([PYTHON], [echo "$PYTHON"])], + [AC_MSG_ERROR([Could not find python-2.7 installed...python-2.7 is required])]) # Checks for libraries. AC_CHECK_LIB([mapper], [mapper_get_service]) @@ -51,6 +54,10 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"], AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) ) +AS_IF([test "x$YAML_GEN" == "x"], [YAML_GEN="example.yaml"]) +FRUGEN="$PYTHON $srcdir/scripts/fru_gen.py -i $YAML_GEN" +AC_SUBST(FRUGEN) + # Create configured output AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- cgit v1.2.1