[gobject-introspection] misc: rewrite extract-gio-sources.sh to use gio-public-headers.txt
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] misc: rewrite extract-gio-sources.sh to use gio-public-headers.txt
- Date: Tue, 7 Jun 2011 22:05:04 +0000 (UTC)
commit dc5f8f07209947b74ad1d9d781d73a5ca1c33c0b
Author: Colin Walters <walters verbum org>
Date: Tue Jun 7 16:36:24 2011 -0400
misc: rewrite extract-gio-sources.sh to use gio-public-headers.txt
Rather than maintaining our own exclusion list, grab the text file
generated by commit ab0e9dbfa76e056f875e969c0d7b6e133ec75431 in glib.
Also it is now Python for sanity.
misc/extract-gio-sources.sh | 10 ----------
misc/update-gio-annotations.py | 28 ++++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 10 deletions(-)
---
diff --git a/misc/update-gio-annotations.py b/misc/update-gio-annotations.py
new file mode 100755
index 0000000..9588dd3
--- /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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]