[atk] Make sure distcheck passed with introspection



commit 1c457b2f60f399e09c35c7ffc973cb31760aba75
Author: Johan Dahlin <johan gnome org>
Date:   Wed Dec 16 20:28:55 2009 -0200

    Make sure distcheck passed with introspection
    
     * Require 0.6.7 of gobject-introspection
     * Update the m4 copy
     * Port over to use Makefile.introspection
     * Make sure gobject-introspection is installed when running
       distcheck

 Makefile.am         |    5 +++--
 atk/Makefile.am     |   39 ++++++++++++++++++---------------------
 configure.in        |    4 ++--
 m4/introspection.m4 |    2 ++
 4 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6e0591d..a2db1de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,12 +9,13 @@ EXTRA_DIST = 			\
 	atk.pc.in		\
 	atk.spec.in		\
 	atk.spec		\
-	atk-zip.sh.in
+	atk-zip.sh.in   \
+    m4/introspection.m4
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = atk.pc
 
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
 
 DISTCLEANFILES =		\
 	atk-uninstalled.pc	\
diff --git a/atk/Makefile.am b/atk/Makefile.am
index c4525e9..fe9888a 100644
--- a/atk/Makefile.am
+++ b/atk/Makefile.am
@@ -2,6 +2,9 @@
 # which are more like other make's VPATH.
 GPATH = $(srcdir)
 
+include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+
 CLEANFILES =
 
 if PLATFORM_WIN32
@@ -140,32 +143,26 @@ 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)
+if HAVE_INTROSPECTION
+introspection_sources = \
+    $(libatkinclude_HEADERS) \
+    $(libatk_1_0_la_SOURCES)
 
-typelibsdir = $(libdir)/girepository-1.0/
+Atk-1.0.gir: libatk-1.0.la
+Atk_1_0_gir_INCLUDES = GObject-2.0
+Atk_1_0_gir_CFLAGS = $(INCLUDES)
+Atk_1_0_gir_LIBS = libatk-1.0.la
+Atk_1_0_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
+INTROSPECTION_GIRS += Atk-1.0.gir
 
-typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+girdir = $(INTROSPECTION_GIRDIR)
+dist_gir_DATA = $(INTROSPECTION_GIRS)
 
-%.typelib: %.gir $(INTROSPECTION_COMPILER)
-	$(DEBUG) $(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=. $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+typelibsdir = $(INTROSPECTION_TYPELIBDIR)
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
 endif
 
 # ---------- Win32 stuff ----------
diff --git a/configure.in b/configure.in
index 1850465..a7ebea0 100644
--- a/configure.in
+++ b/configure.in
@@ -46,7 +46,7 @@ AC_CONFIG_MACRO_DIR([m4])
 
 AM_CONFIG_HEADER(config.h)
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([-Wno-portability])
 
 dnl ==========================================================================
 dnl
@@ -185,7 +185,7 @@ AM_GLIB_GNU_GETTEXT
 
 AC_CHECK_FUNCS(bind_textdomain_codeset)
 
-GOBJECT_INTROSPECTION_CHECK([0.6.4])
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
 
 GTK_DOC_CHECK([1.0])
 
diff --git a/m4/introspection.m4 b/m4/introspection.m4
index 6e2c565..589721c 100644
--- a/m4/introspection.m4
+++ b/m4/introspection.m4
@@ -61,6 +61,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
        INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
     fi
     AC_SUBST(INTROSPECTION_SCANNER)
     AC_SUBST(INTROSPECTION_COMPILER)
@@ -69,6 +70,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
     AC_SUBST(INTROSPECTION_TYPELIBDIR)
     AC_SUBST(INTROSPECTION_CFLAGS)
     AC_SUBST(INTROSPECTION_LIBS)
+    AC_SUBST(INTROSPECTION_MAKEFILE)
 
     AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
 ])



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