From cba92c2f08d5911ecde2645714b90875238f406d Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 10 Jun 2017 15:00:06 +0200 Subject: [PATCH] Enabled gir. --- .gitignore | 4 +++- Makefile.am | 2 ++ configure.ac | 3 +++ src/Makefile.am | 33 +++++++++++++++++++++++++++++++-- src/formelement.c | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6fce3bf..7e7e8db 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,6 @@ intltool-* Rules-quot *.exe *.csv -src/*marshal*.[ch] \ No newline at end of file +src/*marshal*.[ch] +*.gir +*.typelib \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index dc08cdf..02ba245 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +DISTCHECK_CONFIGURE_FLAGS = --enable-introspection + SUBDIRS = po src tests ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 1f2bffe..26b4093 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,9 @@ AC_PROG_LIBTOOL AC_PROG_RANLIB GTK_DOC_CHECK(1.0) + +GOBJECT_INTROSPECTION_CHECK([1.30.0]) + IT_PROG_INTLTOOL dnl ****************************** diff --git a/src/Makefile.am b/src/Makefile.am index 6c6f9b6..83af3a3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,8 +33,7 @@ libzakform_la_SOURCES = \ libzakform_la_LDFLAGS = -no-undefined -libzakform_include_HEADERS = \ - libzakform.h \ +gir_include = \ commons.h \ zakformmarshal.h \ form.h \ @@ -52,6 +51,10 @@ libzakform_include_HEADERS = \ formvalidatorcomparedate.h \ formvalidatorcomposite.h +libzakform_include_HEADERS = \ + libzakform.h \ + $(gir_include) + libzakform_includedir = $(includedir)/libzakform install-exec-hook: @@ -59,3 +62,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 +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + +if HAVE_INTROSPECTION +introspection_sources = $(libzakform_la_SOURCES) $(gir_include) + +ZakForm-1.0.gir: libzakform.la +ZakForm_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 GModule-2.0 libxml2-2.0 +ZakForm_1_0_gir_CFLAGS = $(AM_CPPFLAGS) +ZakForm_1_0_gir_LIBS = libzakform.la +ZakForm_1_0_gir_FILES = $(introspection_sources) +INTROSPECTION_GIRS += ZakForm-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 diff --git a/src/formelement.c b/src/formelement.c index eb9a601..7d5f204 100644 --- a/src/formelement.c +++ b/src/formelement.c @@ -941,7 +941,7 @@ zak_form_element_set_default_value (ZakFormElement *element, const gchar *value) } /** - * zak_form_element_get_default_value_gvalue: + * zak_form_element_get_default_value: * @element: * */ -- 2.49.0