summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-07-17 16:35:34 -0400
committerJohan Dahlin <johan@gnome.org>2009-12-09 15:59:25 -0200
commitc7d9898501e9e38696ca67af974b681bdae53f57 (patch)
treed54b9db72e8d0b1c10e74570929cb072b44405ee
parent67aee32aab0931a5042ce9bf29d0d46c4fb81191 (diff)
downloadatk-c7d9898501e9e38696ca67af974b681bdae53f57.tar.gz
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
-rw-r--r--atk/Makefile.am30
-rw-r--r--configure.in2
2 files changed, 32 insertions, 0 deletions
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