From 84d781e54cc75c81a06ba43fd7b1a74b8c7d9591 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 16 Jun 2012 15:21:41 -0400 Subject: [PATCH] Flesh out gobject-introspection stuff a bit --- configure.ac | 1 + src/Makefile.am | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2fb058ff..8911e25c 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ m4_define([hb_libtool_current], HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age AC_SUBST(HB_LIBTOOL_VERSION_INFO) +GOBJECT_INTROSPECTION_CHECK([0.9.0]) dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) # Functions and headers diff --git a/src/Makefile.am b/src/Makefile.am index 98c6cd57..2326b409 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = +DISTCHECK_CONFIGURE_FLAGS = --enable-introspection # The following warning options are useful for debugging: -Wpadded -Wcast-align #AM_CXXFLAGS = @@ -208,8 +209,26 @@ TESTS_ENVIRONMENT = \ HBHEADERS="$(HBHEADERS)" \ $(NULL) -scan: - g-ir-scanner $(HBCFLAGS) $(HBHEADERS) -n hb --strip-prefix=hb --library libharfbuzz.la +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = hb-1.0.gir +INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_ +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) +if HAVE_INTROSPECTION + +hb-1.0.gir: libharfbuzz.la +hb_1_0_gir_INCLUDES = GObject-2.0 +hb_1_0_gir_CFLAGS = $(INCLUDES) $(HBCFLAGS) -DHB_H -DHB_H_IN -DHB_OT_H -DHB_OT_H_IN +hb_1_0_gir_LIBS = libharfbuzz.la +hb_1_0_gir_FILES = $(HBHEADERS) + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif -include $(top_srcdir)/git.mk -- GitLab