File: sbus_generate.sh.in

package info (click to toggle)
sssd 2.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 45,204 kB
  • sloc: ansic: 290,302; xml: 58,874; python: 16,662; sh: 7,056; makefile: 5,989; exp: 69; sed: 16
file content (26 lines) | stat: -rwxr-xr-x 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

SRCDIR=$1
CODEGEN="$SRCDIR/src/sbus/codegen/sbus_CodeGen.py"

generate() {
    XML=$1
    DEST=$2
    PREFIX=$3
    HEADERS=`echo $DEST | sed -E 's|^$SRCDIR/src/||'`

    shift 3

    echo "Generating sbus code for: $XML"

    @PYTHON_EXEC@ $CODEGEN --sbus sbus --util util \
        --headers "$HEADERS" \
        --dest "$SRCDIR/src/$DEST" \
        --fileprefix "sbus_${PREFIX}_" \
        --symbolprefix "$PREFIX" $* \
        "$SRCDIR/src/$XML"
}

generate sbus/codegen/dbus.xml sbus/interface_dbus dbus
generate sss_iface/sss_iface.xml sss_iface sss -i sss_iface/sss_iface_types.h "$SRCDIR/src/sss_iface/external_iface.xml"
generate responder/ifp/ifp_iface/ifp_iface.xml responder/ifp/ifp_iface ifp -i responder/ifp/ifp_iface/ifp_iface_types.h