[gnome-boxes] libgd: generate gd-1.0.vapi binding
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libgd: generate gd-1.0.vapi binding
- Date: Thu, 9 Aug 2012 12:02:03 +0000 (UTC)
commit a5a443c95037e410c765a8fb71955457a6ec8577
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Wed Jul 25 15:21:00 2012 +0200
libgd: generate gd-1.0.vapi binding
https://bugzilla.gnome.org/show_bug.cgi?id=681089
configure.ac | 3 ++-
libgd/Makefile.am | 15 +++++++++++++++
m4/boxes.m4 | 23 ++++++++++++++---------
3 files changed, 31 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a637f5b..2535c49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,8 @@ PKG_CHECK_MODULES(BOXES, [
tracker-sparql-0.14 >= $TRACKER_SPARQL
])
-VALA_ADD_STAMP([src/gnome_boxes_vala.stamp])
+VALA_ADD_CHECKFILE([src/gnome_boxes_vala.stamp])
+VALA_ADD_CHECKFILE([libgd/gd-1.0.vapi])
VALA_CHECK([0.14.0], [
clutter-gtk-1.0
diff --git a/libgd/Makefile.am b/libgd/Makefile.am
index 96c058f..c1ca348 100644
--- a/libgd/Makefile.am
+++ b/libgd/Makefile.am
@@ -64,3 +64,18 @@ Gd_1_0_gir_FILES = \
$(gdprivate_source_h:%=$(srcdir)/%) \
$(gdprivate_source_c:%=$(srcdir)/%) \
$(NULL)
+
+VAPIS = gd-1.0.vapi
+BUILT_SOURCES = $(VAPIS)
+
+gd-1.0.vapi: $(builddir)/Gd-1.0.gir
+ $(AM_V_GEN)$(VAPIGEN) \
+ --library gd-1.0 \
+ --pkg gio-2.0 \
+ --pkg gobject-2.0 \
+ --pkg gtk+-3.0 \
+ $<
+
+EXTRA_DIST = $(VAPIS)
+
+MAINTAINERCLEANFILES = $(INTROSPECTION_GIRS) $(VAPIS)
diff --git a/m4/boxes.m4 b/m4/boxes.m4
index 7d0ffaa..96fca8a 100644
--- a/m4/boxes.m4
+++ b/m4/boxes.m4
@@ -1,6 +1,6 @@
-AC_DEFUN([VALA_ADD_STAMP],
+AC_DEFUN([VALA_ADD_CHECKFILE],
[
- vala_stamp_files="$vala_stamp_files $srcdir/$1"
+ vala_checkfiles="$vala_checkfiles $srcdir/$1"
])
AC_DEFUN([VALA_ADD_VALAFLAGS],
@@ -19,25 +19,30 @@ AC_DEFUN([VALA_CHECK],
AS_IF([test "x$enable_vala_fatal_warnings" = "xyes"],
[VALA_ADD_VALAFLAGS([--fatal-warnings])])
AC_SUBST([VALAFLAGS])
- dnl Enable check for Vala even if not asked to do so if stamp files are absent.
- for stamp in $vala_stamp_files
+ dnl Enable check for Vala even if not asked to do so if checkfile files are absent.
+ for checkfile in $vala_checkfiles
do
- AS_IF([test ! -e "$stamp"],
- [AC_MSG_WARN([Missing stamp file $[]stamp. Forcing vala mode])
+ AS_IF([test ! -e "$checkfile"],
+ [AC_MSG_WARN([Missing checkfile file $[]checkfile. Forcing vala mode])
enable_vala=yes
])
done
dnl Vala
AS_IF([test x$enable_vala = xyes],
- [dnl check for vala
+ [
+ dnl check for vala
AM_PROG_VALAC([$1])
-
AS_IF([test x$VALAC = "x"],
[AC_MSG_ERROR([Cannot find the "valac" compiler in your PATH])],
[VALA_CHECK_PACKAGES([$2])])
+
+ dnl check for vapigen
+ AC_PATH_PROG(VAPIGEN, vapigen, no)
+ AS_IF([test x$VAPIGEN = "xno"],
+ [AC_MSG_ERROR([Cannot find the "vapigen compiler in your PATH])])
+
],
[]
)
])
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]