Don't build Cogl.gir against installed Clutter library
Passing: --library=clutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@ to g-ir-scanner, when building Cogl was causing g-ir-scanner to link the introspection program against the installed clutter library, if it existed or fail otherwise. Instead copy the handling from the json/ directory where we link against the convenience library to scan, and do the generation of the typelib later in the main clutter/directory. Fixes bug: http://bugzilla.openedhand.com/show_bug.cgi?id=1594 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
447e04bdce
commit
d8aa6827ee
5
.gitignore
vendored
5
.gitignore
vendored
@ -23,8 +23,8 @@ clutter/stamp-*
|
|||||||
/clutter/cogl/*.pc
|
/clutter/cogl/*.pc
|
||||||
/clutter/cogl/gles/cogl-fixed-vertex-shader.[ch]
|
/clutter/cogl/gles/cogl-fixed-vertex-shader.[ch]
|
||||||
/clutter/cogl/gles/cogl-fixed-fragment-shader.[ch]
|
/clutter/cogl/gles/cogl-fixed-fragment-shader.[ch]
|
||||||
/clutter/*.gir
|
*.gir
|
||||||
/clutter/*.typelib
|
*.typelib
|
||||||
/clutter/json/*.gir
|
/clutter/json/*.gir
|
||||||
cogl-defines.h
|
cogl-defines.h
|
||||||
config.*
|
config.*
|
||||||
@ -192,6 +192,7 @@ stamp-h1
|
|||||||
/tests/conform/redhand.png
|
/tests/conform/redhand.png
|
||||||
/tests/micro-bench/test-glyph-perf
|
/tests/micro-bench/test-glyph-perf
|
||||||
/tests/micro-bench/test-text
|
/tests/micro-bench/test-text
|
||||||
|
/tests/micro-bench/test-picking
|
||||||
/tests/tools/disable-npots.sh
|
/tests/tools/disable-npots.sh
|
||||||
/clutter/x11/clutter-x11-enum-types.[ch]
|
/clutter/x11/clutter-x11-enum-types.[ch]
|
||||||
/clutter/x11/stamp-clutter-x11-enum-types.h
|
/clutter/x11/stamp-clutter-x11-enum-types.h
|
||||||
|
@ -205,16 +205,16 @@ source_h_priv = \
|
|||||||
|
|
||||||
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
||||||
$(CLUTTER_LIBS) \
|
$(CLUTTER_LIBS) \
|
||||||
|
$(top_builddir)/clutter/cogl/libclutter-cogl.la \
|
||||||
$(top_builddir)/clutter/pango/libcoglpango.la \
|
$(top_builddir)/clutter/pango/libcoglpango.la \
|
||||||
$(top_builddir)/clutter/$(CLUTTER_FLAVOUR)/libclutter-$(CLUTTER_FLAVOUR).la \
|
$(top_builddir)/clutter/$(CLUTTER_FLAVOUR)/libclutter-$(CLUTTER_FLAVOUR).la \
|
||||||
$(top_builddir)/clutter/cogl/$(CLUTTER_COGL)/libclutter-cogl.la \
|
|
||||||
$(clutter_json_libadd) \
|
$(clutter_json_libadd) \
|
||||||
$(backendextralib)
|
$(backendextralib)
|
||||||
|
|
||||||
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
||||||
|
$(top_builddir)/clutter/cogl/libclutter-cogl.la \
|
||||||
$(top_builddir)/clutter/pango/libcoglpango.la \
|
$(top_builddir)/clutter/pango/libcoglpango.la \
|
||||||
$(top_builddir)/clutter/$(CLUTTER_FLAVOUR)/libclutter-$(CLUTTER_FLAVOUR).la \
|
$(top_builddir)/clutter/$(CLUTTER_FLAVOUR)/libclutter-$(CLUTTER_FLAVOUR).la \
|
||||||
$(top_builddir)/clutter/cogl/$(CLUTTER_COGL)/libclutter-cogl.la \
|
|
||||||
$(clutter_json_dep) \
|
$(clutter_json_dep) \
|
||||||
$(backendextralib)
|
$(backendextralib)
|
||||||
|
|
||||||
@ -245,8 +245,8 @@ json_gir_include_path=--add-include-path=json
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# We can't reference the list of COGL header files, since they are in a
|
# We can't reference the list of COGL header files, since they are in a
|
||||||
# subdir Makefile.am, so just extract them from cogl.h instead. The doc comments
|
# subdir Makefile.am, so just extract them from cogl.h instead. The doc
|
||||||
# for COGL are in the headers, so we don't need the source files.
|
# comments for COGL are in the headers, so we don't need the source files.
|
||||||
Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@.la
|
Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@.la
|
||||||
headers=`sed -n "s/#include <cogl\/\([^>]*\)>/\1/p" < $(top_srcdir)/clutter/cogl/cogl.h` ; \
|
headers=`sed -n "s/#include <cogl\/\([^>]*\)>/\1/p" < $(top_srcdir)/clutter/cogl/cogl.h` ; \
|
||||||
cogl_headers="" ; \
|
cogl_headers="" ; \
|
||||||
@ -274,11 +274,20 @@ Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_
|
|||||||
|
|
||||||
BUILT_GIRSOURCES += Clutter-@CLUTTER_API_VERSION@.gir
|
BUILT_GIRSOURCES += Clutter-@CLUTTER_API_VERSION@.gir
|
||||||
|
|
||||||
|
# We build Cogl.gir in the cogl/ subdir, but it needs to reference the shared
|
||||||
|
# library that it's built into, so we delay compiling the gir into typelib
|
||||||
|
# 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-@CLUTTER_API_VERSION@.gir
|
||||||
|
shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
|
||||||
|
sed "s/shared-library=\"clutter-cogl\"/shared-library=\"$$shlib\"/"< cogl/Cogl-@CLUTTER_API_VERSION@.gir > $@
|
||||||
|
|
||||||
|
BUILT_GIRSOURCES += Cogl-@CLUTTER_API_VERSION@.gir
|
||||||
|
|
||||||
if LOCAL_JSON_GLIB
|
if LOCAL_JSON_GLIB
|
||||||
# We build ClutterJson.gir in the json/ subdir, but it needs to reference the shared library
|
# If we are building it, ClutterJson gets the same handling as described
|
||||||
# that it's built into, so we delay compiling the gir into typelib until after we've built
|
# for Cogl above
|
||||||
# the shared library. To create the final ClutterJson.gir that we compiler and install, we
|
|
||||||
# transfer the shared-library="" line from Clutter.gir to ClutterJson.gir
|
|
||||||
ClutterJson-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir json/ClutterJson-@CLUTTER_API_VERSION@.gir
|
ClutterJson-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir json/ClutterJson-@CLUTTER_API_VERSION@.gir
|
||||||
shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
|
shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
|
||||||
sed "s/shared-library=\"clutter-json\"/shared-library=\"$$shlib\"/"< json/ClutterJson-@CLUTTER_API_VERSION@.gir > $@
|
sed "s/shared-library=\"clutter-json\"/shared-library=\"$$shlib\"/"< json/ClutterJson-@CLUTTER_API_VERSION@.gir > $@
|
||||||
@ -286,12 +295,13 @@ ClutterJson-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir json/Cl
|
|||||||
BUILT_GIRSOURCES += ClutterJson-@CLUTTER_API_VERSION@.gir
|
BUILT_GIRSOURCES += ClutterJson-@CLUTTER_API_VERSION@.gir
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to install
|
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
|
||||||
# thing - we need to install inside our prefix.
|
# install anything - we need to install inside our prefix.
|
||||||
girdir = $(datadir)/gir-1.0
|
girdir = $(datadir)/gir-1.0
|
||||||
gir_DATA = $(BUILT_GIRSOURCES)
|
gir_DATA = $(BUILT_GIRSOURCES)
|
||||||
|
|
||||||
typelibsdir = $(libdir)/girepository-1.0/
|
typelibsdir = $(libdir)/girepository-1.0/
|
||||||
|
|
||||||
typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
|
typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
|
||||||
|
|
||||||
%.typelib: %.gir $(INTROSPECTION_COMPILER)
|
%.typelib: %.gir $(INTROSPECTION_COMPILER)
|
||||||
|
@ -24,7 +24,6 @@ CLEANFILES = $(pc_files)
|
|||||||
AM_CPPFLAGS = $(CLUTTER_CFLAGS) $(CLUTTER_DEBUG_CFLAGS) $(MAINTAINER_CFLAGS)
|
AM_CPPFLAGS = $(CLUTTER_CFLAGS) $(CLUTTER_DEBUG_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||||
|
|
||||||
if HAVE_INTROSPECTION
|
if HAVE_INTROSPECTION
|
||||||
|
|
||||||
cogl_headers = \
|
cogl_headers = \
|
||||||
$(top_srcdir)/clutter/cogl/cogl-bitmap.h \
|
$(top_srcdir)/clutter/cogl/cogl-bitmap.h \
|
||||||
$(top_srcdir)/clutter/cogl/cogl-color.h \
|
$(top_srcdir)/clutter/cogl/cogl-color.h \
|
||||||
@ -39,6 +38,13 @@ cogl_headers = \
|
|||||||
$(top_srcdir)/clutter/cogl/cogl-types.h \
|
$(top_srcdir)/clutter/cogl/cogl-types.h \
|
||||||
$(top_srcdir)/clutter/cogl/cogl-vertex-buffer.h
|
$(top_srcdir)/clutter/cogl/cogl-vertex-buffer.h
|
||||||
|
|
||||||
|
# HACK - gobject-introspection can't scan a library in another directory
|
||||||
|
# so we create a libclutter-cogl.la that's just identical to the one
|
||||||
|
# in the subdir
|
||||||
|
noinst_LTLIBRARIES = libclutter-cogl.la
|
||||||
|
libclutter_cogl_la_LIBADD = $(CLUTTER_COGL)/libclutter-cogl.la
|
||||||
|
libclutter_cogl_la_SOURCES = $(cogl_headers)
|
||||||
|
|
||||||
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(CLUTTER_COGL)/libclutter-cogl.la
|
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(CLUTTER_COGL)/libclutter-cogl.la
|
||||||
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
|
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
|
||||||
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
|
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
|
||||||
@ -49,7 +55,7 @@ Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(CLUTTER_COGL)/libclut
|
|||||||
-DCLUTTER_COMPILATION \
|
-DCLUTTER_COMPILATION \
|
||||||
--include=GL-1.0 \
|
--include=GL-1.0 \
|
||||||
--include=GObject-2.0 \
|
--include=GObject-2.0 \
|
||||||
--library=clutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@ \
|
--library=clutter-cogl \
|
||||||
--libtool="$(top_builddir)/doltlibtool" \
|
--libtool="$(top_builddir)/doltlibtool" \
|
||||||
--pkg gobject-2.0 \
|
--pkg gobject-2.0 \
|
||||||
--output $@ \
|
--output $@ \
|
||||||
@ -59,21 +65,8 @@ Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(CLUTTER_COGL)/libclut
|
|||||||
|
|
||||||
BUILT_GIRSOURCES = Cogl-@CLUTTER_API_VERSION@.gir
|
BUILT_GIRSOURCES = Cogl-@CLUTTER_API_VERSION@.gir
|
||||||
|
|
||||||
#girdir = $(datadir)/gir-1.0
|
girdir = $(datadir)/gir-1.0
|
||||||
#gir_DATA = $(BUILT_GIRSOURCES)
|
gir_DATA = $(BUILT_GIRSOURCES)
|
||||||
|
|
||||||
#typelibsdir = $(libdir)/girepository-1.0
|
|
||||||
#typelibs_DATA = Cogl-@CLUTTER_API_VERSION@.typelib
|
|
||||||
|
|
||||||
#%.typelib: %.gir $(INTROSPECTION_COMPILER)
|
|
||||||
# $(QUIET_GEN)$(DEBUG) $(INTROSPECTION_COMPILER) \
|
|
||||||
# --includedir=$(top_builddir)/clutter \
|
|
||||||
# --includedir=$(top_srcdir)/clutter \
|
|
||||||
# --includedir=$(srcdir) \
|
|
||||||
# --includedir=. \
|
|
||||||
# $(INTROSPECTION_COMPILER_OPTS) \
|
|
||||||
# $< -o $(@F)
|
|
||||||
|
|
||||||
CLEANFILES += $(BUILT_GIRSOURCES) #$(typelibs_DATA)
|
|
||||||
|
|
||||||
|
CLEANFILES += $(BUILT_GIRSOURCES)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user