From f7854dd90ffe22a08b2e182e10484320f360b2c9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 2 Sep 2010 11:45:42 -0400 Subject: [PATCH] introspection: Build fixes This patch merges in substantial work from Emmanuele Bassi * Use new introspection --include-uninstalled API since we don't want to try to find the clutter-1.0.pc file before it's installed. * Use --pkg-export for Clutter-1.0.gir, since we want the .gir file to contain the associated pkg-config file. * Drop the use of --pkg for dependencies; those come from the associated .gir files. (Actually, --pkg is almost never needed) * Add --quiet http://bugzilla.clutter-project.org/show_bug.cgi?id=2292 --- clutter/Makefile.am | 34 +++++++++++++--------------------- clutter/cogl/cogl/Makefile.am | 2 +- clutter/json/Makefile.am | 3 +-- configure.ac | 2 +- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/clutter/Makefile.am b/clutter/Makefile.am index ef1451fc5..451786235 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -318,9 +318,7 @@ EXTRA_DIST += clutter-version.h.in BUILT_GIRSOURCES = if LOCAL_JSON_GLIB -json_gir_include_path=--add-include-path=json -json_gir_include=--include=ClutterJson-@CLUTTER_API_VERSION@ -json_gir_pkg= +json_gir_include=--include-uninstalled=$(top_builddir)/clutter/json/ClutterJson-@CLUTTER_API_VERSION@.gir # If we are building it, ClutterJson gets the same handling as described # for Cogl above @@ -332,7 +330,6 @@ ClutterJson-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gi BUILT_GIRSOURCES += ClutterJson-@CLUTTER_API_VERSION@.gir else json_gir_include=--include=Json-1.0 -json_gir_pkg=--pkg json-glib-1.0 endif # LOCAL_JSON_GLIB if HAVE_INTROSPECTION @@ -343,26 +340,23 @@ if HAVE_INTROSPECTION Clutter-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(QUIET_SCAN)$(INTROSPECTION_SCANNER) \ $(INTROSPECTION_SCANNER_ARGS) \ + --quiet \ --namespace Clutter --nsversion=@CLUTTER_API_VERSION@ \ + --pkg-export clutter-1.0 \ + --warn-all \ $(INCLUDES) \ $(AM_CPPFLAGS) \ - --add-include-path=cogl/cogl \ - $(json_gir_include_path) \ --c-include='clutter/clutter.h' \ + --pkg-export=clutter-1.0 \ --include=GL-1.0 \ --include=GObject-2.0 \ --include=Atk-1.0 \ --include=Pango-1.0 \ --include=PangoCairo-1.0 \ - --include=Cogl-@CLUTTER_API_VERSION@ \ + --include-uninstalled=$(top_builddir)/clutter/cogl/cogl/Cogl-@CLUTTER_API_VERSION@.gir \ $(json_gir_include) \ --library=libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la \ --libtool="$(top_builddir)/libtool" \ - --pkg gobject-2.0 \ - $(json_gir_pkg) \ - --pkg atk \ - --pkg pango \ - --pkg pangocairo \ --output $@ \ $(clutter_HEADERS) \ $(nodist_clutter_HEADERS) \ @@ -390,26 +384,24 @@ BUILT_GIRSOURCES += Cogl-@CLUTTER_API_VERSION@.gir # Cally depends on Clutter because it exposes Clutter types; for this reason, # we cannot build Cally.gir under cally/ and then do the shlib trick we do # for Cogl and ClutterJson. +cally_sources=$(top_srcdir)/clutter/cally/*.h $(top_srcdir)/clutter/cally/*.c +cally_introspection_files=$(filter-out %-private.h, $(cally_sources)) Cally-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) Clutter-@CLUTTER_API_VERSION@.gir $(QUIET_SCAN)$(INTROSPECTION_SCANNER) \ $(INTROSPECTION_SCANNER_ARGS) \ + --quiet \ --namespace Cally --nsversion=@CLUTTER_API_VERSION@ \ $(INCLUDES) \ $(AM_CPPFLAGS) \ --c-include='cally/cally.h' \ - --add-include-path=$(top_builddir)/clutter \ - --include=GObject-2.0 \ - --include=Atk-1.0 \ --include=Pango-1.0 \ - --include=Clutter-1.0 \ + $(json_gir_include) \ + --include-uninstalled=$(top_builddir)/clutter/cogl/cogl/Cogl-@CLUTTER_API_VERSION@.gir \ + --include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir \ --library=libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la \ --libtool="$(top_builddir)/libtool" \ - --pkg gobject-2.0 \ - --pkg atk \ - --pkg clutter-1.0 \ --output $@ \ - $(top_srcdir)/clutter/cally/*.h \ - $(top_srcdir)/clutter/cally/*.c + $(cally_introspection_files) BUILT_GIRSOURCES += Cally-@CLUTTER_API_VERSION@.gir diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am index 9ba4e4f2c..4de6fae2b 100644 --- a/clutter/cogl/cogl/Makefile.am +++ b/clutter/cogl/cogl/Makefile.am @@ -239,6 +239,7 @@ if HAVE_INTROSPECTION Cogl-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) libclutter-cogl.la $(QUIET_SCAN)$(INTROSPECTION_SCANNER) \ $(INTROSPECTION_SCANNER_ARGS) \ + --quiet \ --namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \ $(INCLUDES) \ $(AM_CPPFLAGS) \ @@ -247,7 +248,6 @@ Cogl-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) libclutter-cog --include=GObject-2.0 \ --library=libclutter-cogl.la \ --libtool="$(top_builddir)/libtool" \ - --pkg gobject-2.0 \ --output $@ \ $(cogl_headers) cogl-enum-types.h diff --git a/clutter/json/Makefile.am b/clutter/json/Makefile.am index d3f254a89..19d5080f5 100644 --- a/clutter/json/Makefile.am +++ b/clutter/json/Makefile.am @@ -44,13 +44,12 @@ BUILT_GIRSOURCES = ClutterJson-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-json.la $(QUIET_SCAN)$(INTROSPECTION_SCANNER) \ $(INTROSPECTION_SCANNER_ARGS) \ + --quiet \ --namespace ClutterJson --nsversion=@CLUTTER_API_VERSION@ \ $(INCLUDES) \ - --add-include-path=$(srcdir) --add-include-path=. \ --include=GObject-2.0 \ --library=libclutter-json.la \ --libtool="$(top_builddir)/libtool" \ - --pkg gobject-2.0 \ --output $@ \ $(clutterjson_HEADERS) \ $(source_c) diff --git a/configure.ac b/configure.ac index ff6ac27af..41a4ca511 100644 --- a/configure.ac +++ b/configure.ac @@ -1030,7 +1030,7 @@ AC_SUBST(CLUTTER_LIBS) dnl === GObject-Introspection check =========================================== -GOBJECT_INTROSPECTION_CHECK([0.6.14]) +GOBJECT_INTROSPECTION_CHECK([0.9.5]) # --quiet has been added in in the 0.9.1 development cycle. PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.9.2],