3 # Copyright (c) 2014 Ian Sutton <ian@kremlin.cc>
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 # cd to root of repository
18 REPO
=$(dirname "$(readlink -f $0)")/../
21 if [[ $# -ne 1 ]];then
22 echo "syntax
: .
/gen
-dbus-interfaces <interface name
>"
24 elif [[ $1 != "hostnamed
" && $1 != "localed
" && $1 != "timedated
" && $1 != "logind
" ]];then
25 echo "<interface name
> must be
'hostnamed', 'localed', 'timedated', or
'logind'"
29 # cd to interface-specific source directory to avoid preprocessor pathing bug
33 --interface-prefix org.freedesktop. \
34 --generate-docbook $REPO/doc/$1-docbook.xml \
35 --generate-c-code $1-gen \
36 $REPO/conf/introspect-xml/$1-ispect.xml