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 | |
parent | 7549c8053d0229a12d9196cc8abae54a01a555d0 (diff) | |
download | gobject-introspection-GOBJECT_INTROSPECTION_0_6_4.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.
-rw-r--r-- | gir/Makefile.am | 2 | ||||
-rw-r--r-- | giscanner/scannermain.py | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gir/Makefile.am b/gir/Makefile.am index d1363160..c37e0307 100644 --- a/gir/Makefile.am +++ b/gir/Makefile.am @@ -161,8 +161,8 @@ GIRepository-2.0.gir: GObject-2.0.gir $(SCANNER_BIN) $(SCANNER_LIBS) $(GIREPOSIT --include=GObject-2.0 \ --library=girepository-1.0 \ -I$(srcdir)/girepository \ - --pkg glib-2.0 \ --pkg gobject-2.0 \ + --pkg-export gobject-introspection-1.0 \ $(GIREPOSITORY_FILES) BUILT_GIRSOURCES += GIRepository-2.0.gir 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: |