[gnome-menus] [libmenu] Add gobject-introspection support
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-menus] [libmenu] Add gobject-introspection support
- Date: Mon, 8 Mar 2010 13:43:53 +0000 (UTC)
commit d50ff15f43bc2311fbd06bd9664ae9571fd550ea
Author: Vincent Untz <vuntz gnome org>
Date: Mon Mar 8 14:43:18 2010 +0100
[libmenu] Add gobject-introspection support
https://bugzilla.gnome.org/show_bug.cgi?id=598406
Makefile.am | 2 ++
autogen.sh | 1 +
configure.in | 4 ++++
libmenu/Makefile.am | 51 ++++++++++++++++++++++++++++++++++++++++++---------
4 files changed, 49 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5900b79..38394db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,8 @@ EXTRA_DIST = \
HACKING \
$(NULL)
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
diff --git a/autogen.sh b/autogen.sh
index a95bd3d..18f6013 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,6 +6,7 @@ test -z "$srcdir" && srcdir=.
PKG_NAME="GNOME Menus"
REQUIRED_AUTOMAKE_VERSION=1.9
+REQUIRED_M4MACROS=introspection.m4
(test -f $srcdir/configure.in \
&& test -d $srcdir/libmenu) || {
diff --git a/configure.in b/configure.in
index 908c6f3..bac5cd1 100644
--- a/configure.in
+++ b/configure.in
@@ -1,3 +1,5 @@
+AC_PREREQ(2.62)
+
AC_INIT([gnome-menus], [2.29.92],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-menus])
AC_CONFIG_SRCDIR(libmenu/gmenu-tree.h)
@@ -123,6 +125,8 @@ if test "x$GCC" = "xyes" ; then
fi
AC_SUBST(NO_STRICT_ALIASING_CFLAGS)
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
AC_OUTPUT([
Makefile
libmenu/Makefile
diff --git a/libmenu/Makefile.am b/libmenu/Makefile.am
index 1fcad64..133fa9c 100644
--- a/libmenu/Makefile.am
+++ b/libmenu/Makefile.am
@@ -3,7 +3,6 @@ NULL =
INCLUDES = \
-DGMENU_I_KNOW_THIS_IS_UNSTABLE \
$(GLIB_CFLAGS) \
- $(MONITOR_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(DEBUG_CFLAGS) \
$(WARN_CFLAGS) \
@@ -11,22 +10,25 @@ INCLUDES = \
lib_LTLIBRARIES = libgnome-menu.la
-libgnome_menu_la_SOURCES = \
+libgnome_menu_sources = \
canonicalize.c \
- canonicalize.h \
desktop-entries.c \
- desktop-entries.h \
entry-directories.c \
- entry-directories.h \
gmenu-tree.c \
- gmenu-tree.h \
menu-layout.c \
- menu-layout.h \
menu-monitor.c \
- menu-monitor.h \
menu-util.c \
+ $(NULL)
+
+libgnome_menu_la_SOURCES = \
+ $(libgnome_menu_sources) \
+ canonicalize.h \
+ desktop-entries.h \
+ entry-directories.h \
+ gmenu-tree.h \
+ menu-layout.h \
+ menu-monitor.h \
menu-util.h \
- $(MONITOR_SOURCES) \
$(NULL)
libgnome_menu_la_LIBADD = \
@@ -50,7 +52,38 @@ EXTRA_DIST = \
libgnome-menu-uninstalled.pc.in \
$(NULL)
+CLEANFILES = \
+ $(NULL)
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgnome-menu.pc
+# Introspection
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+# Note: we only include the headers here so far because there's no gtk-doc at all anyway
+introspection_sources = $(libgnome_menu_include_HEADERS)
+
+GMenu-2.0.gir: libgnome-menu.la Makefile
+GMenu_2_0_gir_INCLUDES = GObject-2.0
+GMenu_2_0_gir_CFLAGS = \
+ -DGMENU_I_KNOW_THIS_IS_UNSTABLE \
+ $(GLIB_CFLAGS)
+GMenu_2_0_gir_LIBS = libgnome-menu.la
+GMenu_2_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+INTROSPECTION_GIRS += GMenu-2.0.gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
+endif
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]