diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-11-11 16:02:10 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-11-21 11:49:37 -0500 |
commit | 1a886e36312944614106992ab13f60aea278dc75 (patch) | |
tree | c3964c41131a071e1a17742072c241bf0483361d /configure.ac | |
parent | 14a9fe5e15c588e82efa002faaac8d38a087b779 (diff) | |
download | phosphor-inventory-manager-1a886e36312944614106992ab13f60aea278dc75.tar.gz phosphor-inventory-manager-1a886e36312944614106992ab13f60aea278dc75.zip |
build: Add targets for generated files
Add a target for generated.cpp.
Add targets for extra interfaces.
Remove example configure option - this is now driven
by the input yaml filesystem.
Add YAML_PATH autoconf variable.
Change-Id: Ieff734948088d3252e346a8dcc0e1dd6caf83333
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b23d799..2076777 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,10 @@ AC_PROG_CXX AM_PROG_AR AC_PROG_INSTALL AC_PROG_MAKE_SET +AC_PROG_AWK +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. PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) @@ -50,15 +54,20 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"], AC_ARG_VAR(BUSNAME, [The DBus busname to own.]) AC_ARG_VAR(INVENTORY_ROOT, [The DBus inventory namespace root.]) AC_ARG_VAR(IFACE, [The manager DBus interface.]) +AC_ARG_VAR(YAML_PATH, [The path to the yaml config files.]) AS_IF([test "x$BUSNAME" == "x"], [BUSNAME="xyz.openbmc_project.Inventory.Manager"]) AS_IF([test "x$INVENTORY_ROOT" == "x"], [INVENTORY_ROOT="/xyz/openbmc_project/Inventory"]) AS_IF([test "x$IFACE" == "x"], [IFACE="xyz.openbmc_project.Inventory.Manager"]) +AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="$srcdir/example"]) AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The DBus busname to own.]) AC_DEFINE_UNQUOTED([INVENTORY_ROOT], ["$INVENTORY_ROOT"], [The DBus inventory namespace root.]) AC_DEFINE_UNQUOTED([IFACE], ["$IFACE"], [The manager DBus interface.]) -AC_ARG_ENABLE([example], - AS_HELP_STRING([--enable-example], [Enable example configuration.])) -AM_CONDITIONAL([EXAMPLE], [test x$enable_example = xyes]) +PIMGEN="$PYTHON $srcdir/pimgen.py -d $YAML_PATH" +EXTRAIFACES_LO="`$PIMGEN list-interfaces|awk '{ for(i=1;i<=NF;i++){printf $i".lo ";}}'`" +EXTRAIFACES_C="`$PIMGEN list-interfaces|awk '{ for(i=1;i<=NF;i++){printf $i".cpp ";}}'`" +AC_SUBST(EXTRAIFACES_LO) +AC_SUBST(EXTRAIFACES_C) +AC_SUBST(PIMGEN) # Create configured output AC_CONFIG_FILES([Makefile test/Makefile]) |