commit | dadf83ae22820a0d09ce0623128e047f8cec2419 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Mar 01 10:25:08 2017 -0600 |
committer | Patrick Williams <patrick@stwcx.xyz> | Wed Mar 15 17:06:51 2017 +0000 |
tree | 4852101c8284d5f9c1610e9049ce5066d4aa1489 | |
parent | c3231059a7c40d9ae7f8ac8f1b25737d9ce35cfc [diff] |
Copy the tools directory from source to build directory The python setup script looks for the needed mako templates in source directory (srcdir). But if the sdbusplus repository is built through bitbake, the mako templates that are auto-generated are created in the build directory (builddir). Copy all the needed files to the builddir, specify update=1 to preserve any built file from being overwritten. This allows for support of out of tree builds. Change-Id: Icb6090df5ea083b4b5f1bc1c5b320d40f57596e0 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
sdbusplus is a library and a tool for generating C++ bindings to dbus.
The path of your file will be the interface name. For example, for an interface xyz.openbmc_project.control.Chassis
, you would create the following file: xyz/openbmc_project/control/Chassis.interface.yaml
. Similary, for errors, you would create xyz/openbmc_project/control/Chassis.errors.yaml
.
Generating all the files:
root_dir=$(readlink -f ../phosphor-dbus-interfaces) desired_interface=xyz.openbmc_project.control.Chassis file_prefix=chassis_interface file_exp_prefix=chassis_interface_exceptions outdir=../phosphor-chassis-control/generated # Server bindings python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir interface server-header $desired_interface > $outdir/$file_prefix.hpp python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir interface server-cpp $desired_interface > $outdir/$file_prefix.cpp # Exception bindings python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir error exception-header $desired_interface > $outdir/$file_exp_prefix.hpp python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir error exception-cpp $desired_interface > $outdir/$file_exp_prefix.cpp # Docs python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir interface markdown $desired_interface > $outdir/$file_prefix.md python tools/sdbus++ --templatedir=tools/sdbusplus/templates --rootdir=$root_dir error markdown $desired_interface > $outdir/$file_exp_prefix.md