[gobject-introspection] Bug 574351 - Add --pkg-export option
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Bug 574351 - Add --pkg-export option
- Date: Mon, 24 Aug 2009 19:49:25 +0000 (UTC)
commit 52126d9218f39775c2a26658fcbba858dabad618
Author: Colin Walters <walters verbum org>
Date: Mon Aug 24 15:48:01 2009 -0400
Bug 574351 - Add --pkg-export option
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.
gir/Makefile.am | 2 +-
giscanner/scannermain.py | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gir/Makefile.am b/gir/Makefile.am
index d136316..c37e030 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 d70eed4..9623b9f 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]