]> saetta.ns0.it Git - libgdaex/commitdiff
Enabled gir.
authorAndrea Zagli <azagli@libero.it>
Sat, 10 Jun 2017 12:32:58 +0000 (14:32 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 10 Jun 2017 12:32:58 +0000 (14:32 +0200)
.gitignore
Makefile.am
configure.ac
src/Makefile.am

index 2505b7ae2564ea3982de7f7db25a7da1c977ed7f..cd1690df17d3526f584b62a621d1dab56cc15fa4 100644 (file)
@@ -54,3 +54,5 @@ tests/select
 tests/getsql
 tests/sqlbuilder
 *~
+*.gir
+*.typelib
\ No newline at end of file
index 8ed654a63c70cae015d9bc72a8a9e254ea6f3134..462f209cc9010010634c1b12a95e06d478cb497a 100644 (file)
@@ -1,4 +1,4 @@
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
 
 SUBDIRS = data po src gdaex2gettext docs tests
 
index 0f4b99a4d9334bd12ad0e028821c374dafb65739..e859d9a9cd6f9287f9672462fcaacfa9ca0868a8 100644 (file)
@@ -28,6 +28,9 @@ AC_PROG_LIBTOOL
 AC_PROG_RANLIB
 
 GTK_DOC_CHECK(1.0)
+
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
 IT_PROG_INTLTOOL
 
 dnl ******************************
@@ -49,8 +52,8 @@ PKG_CHECK_MODULES(GDAEX, [gmodule-2.0 >= 2
                           libgda-5.0 >= 5
                           gio-2.0 >= 2.36
                           gtk+-3.0 >= 3
-                                                 libxml-2.0 >= 2
-                                                 libzakutils])
+                          libxml-2.0 >= 2
+                          libzakutils])
 
 AC_SUBST(GDAEX_CFLAGS)
 AC_SUBST(GDAEX_LIBS)
index 5fe63c05914871d4636d95843317ba630f825208..bd00197b8febfd74a639efb1ec627fb7fd9380c0 100644 (file)
@@ -47,3 +47,29 @@ install-exec-hook:
 
 uninstall-hook:
        rm -rf "$(libdir)/$(PACKAGE)"
+
+CLEANFILES =
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed --identifier-prefix=""
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libgdaex_la_SOURCES) $(libgdaex_include_HEADERS)
+
+Gdaex-1.0.gir: libgdaex.la
+Gdaex_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gda-5.0
+Gdaex_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
+Gdaex_1_0_gir_LIBS = libgdaex.la
+Gdaex_1_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += Gdaex-1.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