[gnome-panel] [libpanel-applet] Add gobject-introspection support



commit a0e9fefaa7c1a80bae34c5e9b1671798178ab89d
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Jun 22 12:08:09 2010 +0200

    [libpanel-applet] Add gobject-introspection support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=622341

 Makefile.am                 |    2 +-
 configure.in                |    5 ++++-
 libpanel-applet/Makefile.am |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a582876..1a4e5bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@ EXTRA_DIST = \
 	ChangeLog.pre-git	\
 	gnome-doc-utils.make
 
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper --enable-introspection
 DISTCLEANFILES =		\
 	gnome-doc-utils.make
 
diff --git a/configure.in b/configure.in
index f3b3fbd..11e0b9b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
 AC_INIT([gnome-panel], [2.31.3],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-panel])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar])
+AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar -Wno-portability])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_CONFIG_MACRO_DIR([m4])
@@ -37,6 +37,9 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2)
 
 GNOME_COMPILE_WARNINGS(maximum)
 
+# Check for introspection
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
 m4_pattern_allow([AM_V_GEN])dnl Make autoconf not complain about the rule below
 PANEL_INTLTOOL_PANEL_APPLET_RULE='%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 AC_SUBST([PANEL_INTLTOOL_PANEL_APPLET_RULE])
diff --git a/libpanel-applet/Makefile.am b/libpanel-applet/Makefile.am
index d23fd01..de1c7c9 100644
--- a/libpanel-applet/Makefile.am
+++ b/libpanel-applet/Makefile.am
@@ -94,6 +94,39 @@ pkgconfig_DATA = libpanelapplet-3.0.pc
 
 CLEANFILES = $(BUILT_SOURCES) $(noinst_DATA)
 
+###############################
+# Introspection generation
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libpanel_applet_3_la_SOURCES) $(libpanel_appletinclude_HEADERS)
+
+PanelApplet-3.0.gir: libpanel-applet-3.la Makefile
+PanelApplet_3_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 GConf-2.0
+PanelApplet_3_0_gir_CFLAGS =					\
+	-I$(top_builddir)/libpanel-applet                       \
+        -DPANEL_APPLET_DATADIR=\""$(datadir)"\"                 \
+        -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"  \
+        $(LIBPANEL_APPLET_CFLAGS)
+PanelApplet_3_0_gir_LIBS = libpanel-applet-3.la
+PanelApplet_3_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+INTROSPECTION_GIRS += PanelApplet-3.0.gir
+
+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
+
+################################
+
 appletdir       = $(datadir)/gnome-panel/applets
 applet_in_files = org.gnome.panel.TestApplet.panel-applet.in
 noinst_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)



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