From a3c69dc27c5fc492184a2b6948f59ef27b60f10c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 7 Jul 2010 15:57:43 +0100 Subject: [PATCH] cally: Add introspection generation Toolkits and applications not written in C might still need access to the Cally API to write accessibility extensions based on it for their own native elements. --- clutter/Makefile.am | 30 +++++++++++++++++++++++++++--- clutter/cally/Makefile.am | 6 ++---- clutter/cogl/cogl/Makefile.am | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/clutter/Makefile.am b/clutter/Makefile.am index cc204b2ac..f60adfb44 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -322,7 +322,7 @@ json_gir_pkg= # If we are building it, ClutterJson gets the same handling as described # for Cogl above -ClutterJson-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir json/ClutterJson-@CLUTTER_API_VERSION@.gir +ClutterJson-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir json/ClutterJson-@CLUTTER_API_VERSION@.gir $(QUIET_GEN) \ shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \ sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< json/ClutterJson-@CLUTTER_API_VERSION@.gir > $@ @@ -338,7 +338,7 @@ if HAVE_INTROSPECTION # subdir Makefile.am, so just extract them from cogl.h instead. The doc # comments for COGL are in the headers, so we don't need the source files. -Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +Clutter-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \ --namespace Clutter --nsversion=@CLUTTER_API_VERSION@ \ $(INCLUDES) \ @@ -377,13 +377,37 @@ Clutter-@CLUTTER_API_VERSION@.typelib: $(clutter_json_gir) Cogl-@CLUTTER_API_VER # until after we've built the shared library. To create the final Cogl.gir # that we compile and install, we transfer the shared-library="" line from # Clutter.gir to Cogl.gir -Cogl-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir cogl/cogl/Cogl-@CLUTTER_API_VERSION@.gir +Cogl-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir cogl/cogl/Cogl-@CLUTTER_API_VERSION@.gir $(QUIET_GEN) \ shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \ sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< cogl/cogl/Cogl-@CLUTTER_API_VERSION@.gir > $@ 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-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) Clutter-@CLUTTER_API_VERSION@.gir + $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \ + --namespace Cally --nsversion=@CLUTTER_API_VERSION@ \ + $(INCLUDES) \ + $(AM_CPPFLAGS) \ + --c-include='cally/cally.h' \ + --include=GObject-2.0 \ + --include=Atk-1.0 \ + --include=Pango-1.0 \ + --include=Clutter-1.0 \ + --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 + +BUILT_GIRSOURCES += Cally-@CLUTTER_API_VERSION@.gir + # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to # install anything - we need to install inside our prefix. girdir = $(datadir)/gir-1.0 diff --git a/clutter/cally/Makefile.am b/clutter/cally/Makefile.am index 2abbe9bdb..e929a9477 100644 --- a/clutter/cally/Makefile.am +++ b/clutter/cally/Makefile.am @@ -73,8 +73,6 @@ libcallydir=$(includedir)/clutter-@CLUTTER_API_VERSION@/cally # unlikely in any real final clutter-based application to use only raw # CALLY. In fact, after HAIL experience, probably export GAIL # interfaces would be a good idea -libcally_HEADERS = \ - $(cally_h_sources) +libcally_HEADERS = $(cally_h_sources) -libcally_la_LIBADD = \ - $(CLUTTER_LIBS) +libcally_la_LIBADD = $(CLUTTER_LIBS) diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am index 7af9efdb9..465391f83 100644 --- a/clutter/cogl/cogl/Makefile.am +++ b/clutter/cogl/cogl/Makefile.am @@ -221,7 +221,7 @@ coglinclude_HEADERS = $(cogl_headers) nodist_coglinclude_HEADERS = cogl-defines.h if HAVE_INTROSPECTION -Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-cogl.la +Cogl-@CLUTTER_API_VERSION@.gir: Makefile $(INTROSPECTION_SCANNER) libclutter-cogl.la $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \ --namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \ $(INCLUDES) \