summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-02 11:47:08 -0400
committerColin Walters <walters@verbum.org>2010-09-02 14:19:33 -0400
commit8591b8ad20b9dc8636ef6350693520099974f267 (patch)
treead70c511ceba165bf9b78e0c2ef4466501bd816c /giscanner/scannermain.py
parent95883d357b9205094ea285ffb64b508e6317a823 (diff)
downloadgobject-introspection-8591b8ad20b9dc8636ef6350693520099974f267.tar.gz
scanner: Add --include-uninstalled
We need a way to add a .gir file, without also attempting to load the pkg-config file for it (since it may not be installed yet). Example: clutter builds multiple .gir files, Cally-1.0 depends on Clutter-1.0.
Diffstat (limited to 'giscanner/scannermain.py')
-rw-r--r--giscanner/scannermain.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index d2bd8766..9146a12e 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -55,7 +55,11 @@ def _get_option_parser():
help="format to use, one of gidl, gir")
parser.add_option("-i", "--include",
action="append", dest="includes", default=[],
- help="include types for other gidls")
+ help="Add specified gir file as dependency")
+ parser.add_option("", "--include-uninstalled",
+ action="append", dest="includes_uninstalled", default=[],
+ help="""A file path to a dependency; only use this when building multiple .gir files
+inside a single module.""")
parser.add_option("", "--add-include-path",
action="append", dest="include_paths", default=[],
help="include paths for other GIR files")
@@ -281,6 +285,8 @@ def scanner_main(args):
except:
_error("Malformed include %r\n" % (include, ))
transformer.register_include(include_obj)
+ for include_path in options.includes_uninstalled:
+ transformer.register_include_uninstalled(include_path)
packages = set(options.packages)
packages.update(transformer.get_pkgconfig_packages())