-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkbind.sh
executable file
·42 lines (35 loc) · 1.5 KB
/
mkbind.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
set -x
for i in "id128" "bus" "bus-vtable" "journal" "daemon" "event" ; do
imports="--global-import core.stdc.stdarg"
if [[ $i != "id128" ]]; then
imports=" $imports --global-import systemd.binding.id128"
fi
# Fix imports
if [[ $i == "bus" ]]; then
imports=" $imports --global-import systemd.binding.event --global-import systemd.binding.bus_vtable"
elif [[ $i == "bus-vtable" ]]; then
imports=" $imports --global-import systemd.binding.bus"
elif [[ $i == "event" ]]; then
imports=" $imports --global-import core.sys.linux.sys.signalfd --global-import core.sys.linux.sys.inotify"
fi
imports="--global-import systemd.binding.common $imports"
pkgName=`echo $i | sed 's@-@_@g'`
dstep /usr/include/systemd/sd-$i.h -o source/systemd/binding/$pkgName.d \
--normalize-modules=true \
--public-submodules=true \
--rename-enum-members=false \
--translate-macros=false \
--alias-enum-members=true \
--package systemd.binding \
--comments=false \
--global-attribute '@nogc' \
--global-attribute 'nothrow' \
--skip _sd_useless_struct_to_allow_trailing_semicolon_ \
$imports \
-D__COVERITY__=1
done
for i in source/systemd/binding/*.d ; do
sed -e 's/ULL/UL/g' -i $i;
done