[vala/wip/issue/606: 4/4] WIP build: Generate GIRs for libvala
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/606: 4/4] WIP build: Generate GIRs for libvala
- Date: Mon, 29 Apr 2019 15:00:37 +0000 (UTC)
commit de2a9ecce547589c9b2cbf21814e767d0fcaea9e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Apr 27 09:02:49 2019 +0200
WIP build: Generate GIRs for libvala
Fixes https://gitlab.gnome.org/GNOME/vala/issues/606
.gitignore | 1 +
configure.ac | 1 +
gee/Makefile.am | 1 +
vala/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++
4 files changed, 39 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index 1f8def72c..912c25606 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ Makefile
*.h
*.stamp
*.gir
+*.typelib
.deps
.dirstamp
.libs
diff --git a/configure.ac b/configure.ac
index aa8097b23..d0b47b3d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,7 @@ done
AC_SUBST(TEST_CFLAGS)
+GOBJECT_INTROSPECTION_REQUIRE([1.48])
GLIB_REQUIRED=2.48.0
LIBGVC_REQUIRED=2.16
diff --git a/gee/Makefile.am b/gee/Makefile.am
index c9c77a454..1114e65c4 100644
--- a/gee/Makefile.am
+++ b/gee/Makefile.am
@@ -48,6 +48,7 @@ gee.vapi gee.vala.stamp: $(libgee_la_VALASOURCES)
--use-header \
-H valagee.h \
--library gee \
+ --gir ValaGee@PACKAGE_SUFFIX@.gir \
$^
@touch $@
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 7fb1e26f7..6483edbde 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -202,6 +202,7 @@ vala.vapi vala.vala.stamp: $(libvala_la_VALASOURCES)
--use-header \
-H vala.h \
--library vala \
+ --gir Vala@PACKAGE_SUFFIX@.gir \
$^
@touch $@
@@ -229,3 +230,38 @@ MAINTAINERCLEANFILES = \
vala.h \
$(libvala_la_VALASOURCES:.vala=.c) \
$(NULL)
+
+# We have to extract our own dlname from libvala-*.la.
+# This is what g-ir-scanner does.
+libvala_dlname = \
+ `$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\+\)'/\1/p" libvala@PACKAGE_SUFFIX@.la`
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS =
+INTROSPECTION_COMPILER_ARGS = \
+ --includedir=$(top_builddir)/gee \
+ -l $(libvala_dlname)
+
+INTROSPECTION_SCANNER_ENV = \
+ PKG_CONFIG_PATH=$(top_builddir):$${PKG_CONFIG_PATH}
+
+if HAVE_INTROSPECTION
+$(top_builddir)/gee/ValaGee$(PACKAGE_SUFFIX).gir: $(top_builddir)/gee/libgee.la
+Vala$(PACKAGE_SUFFIX).gir: libvala@PACKAGE_SUFFIX@.la
+
+GIRS = \
+ $(top_builddir)/gee/ValaGee$(PACKAGE_SUFFIX).gir \
+ Vala$(PACKAGE_SUFFIX).gir \
+ $(NULL)
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
+
+CLEANFILES = $(nodist_typelib_DATA)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]