[libgdata/libgdata-0-6] introspection: Port to Makefile.introspection



commit bee31cb42151c3d06975c172a13ce8c515b943dc
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Aug 22 18:15:10 2010 +0100

    introspection: Port to Makefile.introspection
    
    This bumps our gobject-introspection dependency to 0.9.7 as we require the
    fix for bgo#628594.

 Makefile.am  |   50 ++++++++++++++++++++++++++++----------------------
 configure.ac |    6 +++++-
 2 files changed, 33 insertions(+), 23 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7c75ed0..ed91bbc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -373,33 +373,39 @@ gdata_libgdata_la_LDFLAGS = \
 EXTRA_DIST += gdata/gdata.symbols
 
 # Introspection
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --warn-all
+INTROSPECTION_COMPILER_ARGS =
+DISTCHECK_CONFIGURE_FLAGS += --enable-introspection
+EXTRA_DIST += introspection.m4
+
 if HAVE_INTROSPECTION
-_gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)") # bgo#610273
-gdata/GData-$(GDATA_API_VERSION).gir: Makefile gdata/libgdata.la
-	$(AM_V_GEN)($(INTROSPECTION_SCANNER)						\
-	--namespace GData --nsversion=$(GDATA_API_VERSION) --warn-all			\
-	--c-include="gdata/gdata.h" --include=libxml2-2.0 --include=Soup-2.4		\
-	--library=gdata/libgdata.la $(_gir_libtool) --quiet --output $@			\
-	-I$(top_srcdir) -I$(top_srcdir)/gdata $(GDATA_CFLAGS)				\
-	$(addprefix $(srcdir)/,$(gdatainclude_HEADERS) $(gdataatominclude_HEADERS)	\
-	$(gdatagdinclude_HEADERS) $(gdatamediainclude_HEADERS)				\
-	$(gdatacalendarinclude_HEADERS) $(gdatacontactsinclude_HEADERS)			\
-	$(gdatadocumentsinclude_HEADERS) $(gdatapicasawebinclude_HEADERS)		\
-	$(gdatayoutubeinclude_HEADERS) $(gdata_sources)))
-BUILT_GIRSOURCES = gdata/GData-$(GDATA_API_VERSION).gir
+gdata/GData- GDATA_API_VERSION_MAJOR@  GDATA_API_VERSION_MINOR@.gir: gdata/libgdata.la
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_INCLUDES = GObject-2.0 libxml2-2.0 Soup-2.4
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_CFLAGS = $(GDATA_CFLAGS)
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_LIBS = gdata/libgdata.la
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_FILES = $(addprefix $(srcdir)/,$(gdata_sources) \
+	$(gdatainclude_HEADERS) $(gdataatominclude_HEADERS)			\
+	$(gdatagdinclude_HEADERS) $(gdatamediainclude_HEADERS)			\
+	$(gdatacalendarinclude_HEADERS) $(gdatacontactsinclude_HEADERS)		\
+	$(gdatadocumentsinclude_HEADERS) $(gdatapicasawebinclude_HEADERS)	\
+	$(gdatayoutubeinclude_HEADERS))
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_NAMESPACE = GData
+gdata_GData_ GDATA_API_VERSION_MAJOR@_ GDATA_API_VERSION_MINOR@_gir_SCANNERFLAGS = \
+	--nsversion=$(GDATA_API_VERSION) \
+	--symbol-prefix=gdata \
+	--c-include="gdata/gdata.h"
+
+INTROSPECTION_GIRS += gdata/GData-$(GDATA_API_VERSION).gir
 
 girdir = $(datadir)/gir-1.0
-gir_DATA = $(BUILT_GIRSOURCES)
+gir_DATA = $(INTROSPECTION_GIRS)
 
-typelibsdir = $(libdir)/girepository-1.0/
-typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-%.typelib: %.gir
-	$(AM_V_GEN)($(INTROSPECTION_COMPILER) --includedir=$(top_srcdir)/gdata --includedir=. $(INTROSPECTION_COMPILER_ARGS) $< -o $@)
-
-CLEANFILES += \
-	$(gir_DATA)	\
-	$(typelibs_DATA)
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
 
 DISTCHECK_CONFIGURE_FLAGS += --enable-introspection
 endif
diff --git a/configure.ac b/configure.ac
index 5453929..c840622 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,10 +51,14 @@ GDATA_VERSION_MAJOR=gdata_version_major
 GDATA_VERSION_MINOR=gdata_version_minor
 GDATA_VERSION_MICRO=gdata_version_micro
 GDATA_API_VERSION=gdata_api_version_major.gdata_api_version_minor
+GDATA_API_VERSION_MAJOR=gdata_api_version_major
+GDATA_API_VERSION_MINOR=gdata_api_version_minor
 AC_SUBST(GDATA_VERSION_MAJOR)
 AC_SUBST(GDATA_VERSION_MINOR)
 AC_SUBST(GDATA_VERSION_MICRO)
 AC_SUBST(GDATA_API_VERSION)
+AC_SUBST(GDATA_API_VERSION_MAJOR)
+AC_SUBST(GDATA_API_VERSION_MINOR)
 
 pkg_modules="glib-2.0 >= $GLIB_REQS libxml-2.0 gthread-2.0 gio-2.0 >= $GIO_REQS libsoup-2.4 >= $SOUP_REQS"
 PKG_CHECK_MODULES(GDATA, [$pkg_modules])
@@ -116,7 +120,7 @@ GNOME_COMPILE_WARNINGS([maximum])
 GNOME_CXX_WARNINGS
 GNOME_MAINTAINER_MODE_DEFINES
 
-GOBJECT_INTROSPECTION_CHECK([0.6.7])
+GOBJECT_INTROSPECTION_CHECK([0.9.7])
 
 AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_CFLAGS])



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