diff options
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/extract-gio-sources.sh | 10 | ||||
-rwxr-xr-x | misc/update-gio-annotations.py | 28 |
2 files changed, 28 insertions, 10 deletions
diff --git a/misc/extract-gio-sources.sh b/misc/extract-gio-sources.sh deleted file mode 100755 index cf7dfe58..00000000 --- a/misc/extract-gio-sources.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -GLIBDIR=$1 -./g-ir-annotation-tool --extract \ - -DGIO_COMPILATION \ - -I$GLIBDIR \ - -I$GLIBDIR/glib \ - -I$GLIBDIR/gobject \ - -I$GLIBDIR/gmodule \ - -I$GLIBDIR/gio \ - $GLIBDIR/gio/*.c $GLIBDIR/gio/*.h diff --git a/misc/update-gio-annotations.py b/misc/update-gio-annotations.py new file mode 100755 index 00000000..9588dd39 --- /dev/null +++ b/misc/update-gio-annotations.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import os +import sys + +if __name__ == '__main__': + srcdir = sys.argv[1] + sources = [] + projname = 'gio' + subdir = os.path.join(srcdir, projname) + headersfile = os.path.join(subdir, projname + '-public-headers.txt') + f = open(headersfile) + line = f.read() + f.close() + for headername in line.split(' '): + headername = headername.strip() + sources.append(os.path.join(subdir, headername)) + for sourcename in os.listdir(subdir): + if sourcename.endswith('.c'): + sources.append(os.path.join(subdir, sourcename)) + os.execv('./g-ir-annotation-tool', + ['./g-ir-annotation-tool', '--extract', '-DGOBJECT_COMPILATION', + '-DGIO_COMPILATION', + '-I' + srcdir, + '-I' + os.path.join(srcdir, 'glib'), + '-I' + os.path.join(srcdir, 'gobject'), + '-I' + os.path.join(srcdir, 'gio'), + '-I' + os.path.join(srcdir, 'gmodule')] + sources) |