blob: a39ad640c9f9b7524504f92424a1091b7930c18e [file] [log] [blame]
Patrick Williams29f59a62020-12-14 15:03:45 -06001#!/bin/bash
2
3REPO_ROOT=$(git rev-parse --show-toplevel)
4
5# Find sdbus++-gen-meson
6# 1. Check $SDBUSPP_GEN_MESON
7# 2. Check in $PATH
8# 3. Check in subprojects/sdbusplus
9if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
10 SDBUSPP_GEN_MESON="$(which sdbus++-gen-meson 2> /dev/null)"
11fi
12if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
13 SDBUSPP_GEN_MESON="$REPO_ROOT/subprojects/sdbusplus/tools/sdbus++-gen-meson"
14fi
15if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
16 echo "Cannot find sdbus++-gen-meson ($SDBUSPP_GEN_MESON)."
17 exit 1
18fi
19
20$SDBUSPP_GEN_MESON \
21 --command meson \
William A. Kennington IIIb1b4d262021-06-05 12:22:23 -070022 --directory "$REPO_ROOT/yaml" \
Patrick Williams0a4f72f2021-04-13 20:34:14 -050023 --output "$REPO_ROOT/gen"