[gobject-introspection] Makefile.introspection: Add _EXPORT_PACKAGES variable.



commit e108d02cf2d177293085380900ce1607b0f601bf
Author: Luca Bruno <lethalman88 gmail com>
Date:   Wed Aug 25 19:50:17 2010 +0200

    Makefile.introspection: Add _EXPORT_PACKAGES variable.
    
    This new variable maps to --pkg-export.

 Makefile.introspection |    4 ++++
 docs/g-ir-scanner.1    |   12 +++++++++---
 gir/Makefile.am        |    2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.introspection b/Makefile.introspection
index 5edccbe..f38c868 100644
--- a/Makefile.introspection
+++ b/Makefile.introspection
@@ -58,6 +58,7 @@ _gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
 _gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
 _gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
 _gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
 
 # Reuse the LIBTOOL variable from by automake if it's set
 _gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)")
@@ -105,6 +106,8 @@ _gir_silent_compiler_0 = @echo "  GICOMP $(1)";
 # INCLUDES - Gir files to include without the .gir suffix, for instance
 #   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
 #   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
 #
 
 define introspection-scanner
@@ -126,6 +129,7 @@ $(1): $$($(_gir_name)_FILES)
 	  $(_gir_libtool) \
 	  $(_gir_packages) \
 	  $(_gir_includes) \
+	  $(_gir_export_packages) \
 	  $(_gir_program) \
 	  $(_gir_libraries) \
 	  $($(_gir_name)_SCANNERFLAGS) \
diff --git a/docs/g-ir-scanner.1 b/docs/g-ir-scanner.1
index 69fc6ee..3b071e8 100644
--- a/docs/g-ir-scanner.1
+++ b/docs/g-ir-scanner.1
@@ -82,7 +82,7 @@ to pass the argument to this function to g_irepository_dump.
 .B \--program-arg=ARG
 Additional argument to pass to program for introspection.
 .TP
-.B \, --strip-prefix=PREFIX
+.B \--strip-prefix=PREFIX
 If this option is specified a prefix will be stripped from all functions.
 If not specified, the lower case version of the namespace will be used.
 Eg, a strip prefix of
@@ -94,15 +94,21 @@ will export the function
 as 
 .B GLib.type_name.
 .TP
-.B \, --output=FILENAME
+.B \--output=FILENAME
 Name of the file to output. Normally namespace + format extension.
 Eg, GLib.gir.
 .TP
-.B \, --pkg=PACKAGE
+.B \--pkg=PACKAGE
 List of pkg-config packages to get compiler and linker flags from.
 This option can be specified multiple times to include flags from
 several pkg-config packages.
 .TP
+.B \--pkg-export=PACKAGE
+List of pkg-config packages that are provided by the generated gir.
+This option can be specified multiple times if the gir provides more
+packages.
+If not specified, the packages specified with --pkg= will be used.
+.TP
 .B \--verbose
 Be verbose, include some debugging information.
 .TP
diff --git a/gir/Makefile.am b/gir/Makefile.am
index 30c0594..e447762 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -143,10 +143,10 @@ GIRepository_2_0_gir_LIBS = girepository-1.0
 GIRepository_2_0_gir_SCANNERFLAGS = \
         --strip-prefix=g \
         --c-include="girepository.h" \
-        --pkg-export gobject-introspection-1.0 \
         --add-include-path=.
 GIRepository_2_0_gir_PACKAGES = gobject-2.0
 GIRepository_2_0_gir_INCLUDES = GObject-2.0
+GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
 GIRepository_2_0_gir_CFLAGS = \
     -I$(top_srcdir)/girepository -I$(top_srcdir) \
     -DGI_COMPILATION



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]