summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.introspection4
-rw-r--r--docs/g-ir-scanner.112
-rw-r--r--gir/Makefile.am2
3 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.introspection b/Makefile.introspection
index 5edccbe0..f38c8684 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 69fc6eee..3b071e87 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 30c0594a..e4477620 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