diff options
author | Colin Walters <walters@verbum.org> | 2009-08-24 15:48:01 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-08-24 15:48:01 -0400 |
commit | 52126d9218f39775c2a26658fcbba858dabad618 (patch) | |
tree | 324d8004b0ba5ee6550bdacfb59c4af28f96be7f /giscanner | |
parent | 7549c8053d0229a12d9196cc8abae54a01a555d0 (diff) | |
download | gobject-introspection-52126d9218f39775c2a26658fcbba858dabad618.tar.gz |
Bug 574351 - Add --pkg-export optionGOBJECT_INTROSPECTION_0_6_4
We need to differentiate between --pkg options we use to parse
ourself, and --pkg-export which are needed for library consumers.
When introspecting a library we won't necessarily have the
pkg-config file built, so add a --pkg-export line so library
authors can explicitly make the .gir -> pkg-config association.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/scannermain.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index d70eed4a..9623b9f2 100644 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -81,6 +81,9 @@ def _get_option_parser(): parser.add_option("", "--pkg", action="append", dest="packages", default=[], help="pkg-config packages to get cflags from") + parser.add_option("", "--pkg-export", + action="append", dest="packages_export", default=[], + help="Associated pkg-config packages for this library") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose") @@ -319,8 +322,12 @@ def scanner_main(args): raise SystemExit("ERROR in annotation: %s" % (str(e), )) # Write out AST + if options.packages_export: + exported_packages = options.packages_export + else: + exported_packages = options.packages writer = Writer(namespace, shlibs, transformer.get_includes(), - options.packages, options.c_includes, + exported_packages, options.c_includes, transformer.get_strip_prefix()) data = writer.get_xml() if options.output: |