[latexila/wip/build-tools-revamp: 13/15] Add GObject introspection support



commit b281178277137c7d8b2c52c2daead125500718a1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Apr 25 22:01:18 2014 +0200

    Add GObject introspection support
    
    It will be used to generate the .vapi for the liblatexila.

 Makefile.am                 |    2 ++
 configure.ac                |    2 ++
 src/liblatexila/Makefile.am |   23 +++++++++++++++++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4e793ac..f867040 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = data man po help src
 
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
 EXTRA_DIST =                   \
        README                  \
        HACKING                 \
diff --git a/configure.ac b/configure.ac
index c192031..3e47f91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,7 @@ AC_DEFINE_UNQUOTED([LOCALE_DIR],
 YELP_HELP_INIT
 GLIB_GSETTINGS
 GNOME_COMPILE_WARNINGS([maximum])
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
 
 # Generate files
 AC_CONFIG_FILES([Makefile
@@ -187,4 +188,5 @@ Configuration:
     Prefix: ${prefix}
     Vala Compiler: ${vala_compiler}
     C Compiler: ${CC}
+    GObject introspection: ${found_introspection}
 "
diff --git a/src/liblatexila/Makefile.am b/src/liblatexila/Makefile.am
index 35372b0..c4ee247 100644
--- a/src/liblatexila/Makefile.am
+++ b/src/liblatexila/Makefile.am
@@ -15,4 +15,27 @@ liblatexila_la_SOURCES =                     \
        latexila-post-processor-all-output.h    \
        latexila-types.h
 
+CLEANFILES =
+
+if HAVE_INTROSPECTION
+-include $(INTROSPECTION_MAKEFILE)
+
+INTROSPECTION_SCANNER_ARGS =   \
+       -I$(top_srcdir)         \
+       -I$(top_builddir)       \
+       --warn-all
+
+INTROSPECTION_GIRS = Latexila.gir
+
+Latexila.gir: liblatexila.la
+Latexila_gir_NAMESPACE = Latexila
+Latexila_gir_INCLUDES = Gio-2.0
+Latexila_gir_LIBS = liblatexila.la
+Latexila_gir_FILES = $(liblatexila_la_SOURCES)
+
+noinst_DATA = Latexila.gir Latexila.typelib
+
+CLEANFILES += Latexila.gir Latexila.typelib
+endif
+
 -include $(top_srcdir)/git.mk


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