[gobject-introspection] Salvage the build directory parameter of update-glib-annotations.py
- From: Mikhail Zabaluev <mzabaluev src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Salvage the build directory parameter of update-glib-annotations.py
- Date: Thu, 15 Oct 2015 21:59:50 +0000 (UTC)
commit 0f912a4cc489ff3e6d9ac5c47b46b618fba7400b
Author: Mikhail Zabaluev <mikhail zabaluev gmail com>
Date: Thu Oct 15 15:41:52 2015 +0300
Salvage the build directory parameter of update-glib-annotations.py
It was not possible to use the tool with a custom build directory,
even when it was given as the second command line parameter.
https://bugzilla.gnome.org/show_bug.cgi?id=756665
misc/update-glib-annotations.py | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/misc/update-glib-annotations.py b/misc/update-glib-annotations.py
index e4dc32c..e415ad8 100755
--- a/misc/update-glib-annotations.py
+++ b/misc/update-glib-annotations.py
@@ -20,14 +20,6 @@ for k in ['UNINSTALLED_INTROSPECTION_SRCDIR',
os.environ[k] = path
possible_builddirs = ['../_build/', '..', '../../build/']
-builddir = None
-for d in possible_builddirs:
- if os.path.isfile(os.path.join(d, 'g-ir-annotation-tool')):
- builddir = d
- break
-assert builddir is not None
-annotation_tool_base_args = [os.path.join(builddir, 'g-ir-annotation-tool'),
- '--extract']
def directory_includes(dirs, srcdir, builddir):
@@ -55,6 +47,9 @@ def extract_annotations(module, srcdir, builddir, outfile):
if sourcename.endswith('.c'):
sources.append(os.path.join(subdir, sourcename))
+ annotation_tool_base_args = [
+ os.path.join(builddir, 'g-ir-annotation-tool'), '--extract']
+
return subprocess.check_call(annotation_tool_base_args +
module['defines'] +
includes +
@@ -67,7 +62,11 @@ if __name__ == '__main__':
if len(sys.argv) == 3:
builddir = sys.argv[2]
else:
- builddir = srcdir
+ for d in possible_builddirs:
+ if os.path.isfile(os.path.join(d, 'g-ir-annotation-tool')):
+ builddir = d
+ break
+ assert builddir is not None
print("Using source directory: '%s' build directory: '%s'" % (srcdir, builddir))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]