From c7d9898501e9e38696ca67af974b681bdae53f57 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 17 Jul 2009 16:35:34 -0400 Subject: [PATCH] Build introspection data if available and configured Add --enable-introspection option via the GOBJECT_INTROSPECTION_CHECK macro, and implement the build rules. https://bugzilla.gnome.org/show_bug.cgi?id=592146 --- atk/Makefile.am | 30 ++++++++++++++++++++++++++++++ configure.in | 2 ++ 2 files changed, 32 insertions(+) diff --git a/atk/Makefile.am b/atk/Makefile.am index 2459680..c4525e9 100644 --- a/atk/Makefile.am +++ b/atk/Makefile.am @@ -2,6 +2,8 @@ # which are more like other make's VPATH. GPATH = $(srcdir) +CLEANFILES = + if PLATFORM_WIN32 no_undefined = -no-undefined else @@ -138,6 +140,34 @@ s-enum-types-c: @REBUILD@ $(atk_headers) Makefile && rm -f tmp-atk-enum-types.c \ && echo timestamp > $(@F) +if HAVE_INTROSPECTION +BUILT_GIRSOURCES = + +Atk-1.0.gir: $(INTROSPECTION_SCANNER) libatk-1.0.la Makefile + $(INTROSPECTION_SCANNER) -v \ + --namespace Atk --nsversion=1.0 \ + $(INCLUDES) \ + --include=GObject-2.0 \ + --library=libatk-1.0.la \ + --libtool="$(LIBTOOL)" \ + --output $@ \ + $(libatkinclude_HEADERS) \ + $(libatk_1_0_la_SOURCES) +BUILT_GIRSOURCES += Atk-1.0.gir + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(BUILT_GIRSOURCES) + +typelibsdir = $(libdir)/girepository-1.0/ + +typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) + +%.typelib: %.gir $(INTROSPECTION_COMPILER) + $(DEBUG) $(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=. $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) + +CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) +endif + # ---------- Win32 stuff ---------- if OS_WIN32 diff --git a/configure.in b/configure.in index 4aa7cb8..aaa6b50 100644 --- a/configure.in +++ b/configure.in @@ -183,6 +183,8 @@ AM_GLIB_GNU_GETTEXT AC_CHECK_FUNCS(bind_textdomain_codeset) +GOBJECT_INTROSPECTION_CHECK([0.6.4]) + GTK_DOC_CHECK([1.0]) # define a MAINT-like variable REBUILD which is set if Perl -- 2.7.4