3
# This is a convenience script that works around some limitations in
4
# the current dbus-binding-tool. It will probably become unnecessary
9
ANT=" \<annotation name=\"org.freedesktop.DBus.GLib.ClientCSymbol\" value="
11
grep -v "^#" - | while read IF_NAME IF_FILE
13
echo "$IF_NAME > $IF_FILE.xml"
15
IF_UNAME=`echo $IF_FILE | sed s/-/_/g`
16
IF_BASE=`echo $IF_NAME | cut -f1 -d.`
17
IF_IN_FILE="$top_srcdir/xml/orig/$IF_FILE.xml"
18
IF_OUT_FILE="$top_builddir/xml/modified/$IF_FILE.xml"
20
# strip the DBus introspection definition
21
perl -ne '$/=undef; s/<interface name.*DBus.*>(.|\n)*?<\/interface>//;
22
print "$_"' $IF_IN_FILE > $IF_OUT_FILE
24
# strip the redefinition of the channel base interface
25
if [ "$IF_BASE" != "$IF_NAME" ]; then
26
perl -ni -e '$/=undef; s/<interface name.*'$IF_BASE'.>(.|\n)*?<\/interface>//; print "$_"' $IF_OUT_FILE
29
# add the annotation tag
30
sed -i s/org.freedesktop.Telepathy.$IF_BASE.*$/\&\\n"$ANT\"$IF_UNAME\"\/\>"/ $IF_OUT_FILE