Add Vala API generating code to build tools configuration

This commit is contained in:
Gergely Polonkai 2014-05-07 08:36:24 +02:00
parent 2116c8103a
commit 12c08c865d
3 changed files with 21 additions and 4 deletions

7
.gitignore vendored
View File

@ -83,11 +83,12 @@ Makefile.in
/intltool-update.in
# SWE-GLib related files
src/gswe-enumtypes.c
src/gswe-enumtypes.h
src/gswetest
/src/gswe-enumtypes.c
/src/gswe-enumtypes.h
/src/gswetest
/data/swe-glib.pc
/data/swe-glib.spec
/src/*.vapi
# Documentation related files
/docs/reference/*/*.args

View File

@ -1,6 +1,6 @@
m4_define([swe_glib_major_version], [2])
m4_define([swe_glib_minor_version], [0])
m4_define([swe_glib_micro_version], [0])
m4_define([swe_glib_micro_version], [1])
m4_define([swe_glib_version], [swe_glib_major_version.swe_glib_minor_version.swe_glib_micro_version])
m4_define([swe_glib_api_version], [swe_glib_major_version.0])
@ -45,6 +45,12 @@ GTK_DOC_CHECK([1.19], [--flavour no-tmpl])
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
GOBJECT_INTROSPECTION_CHECK([1.0])
m4_ifdef([VALA_PROG_VAPIGEN], [
VALA_PROG_VAPIGEN([0.21])
AM_CONDITIONAL([HAVE_VAPIGEN], true)
],[
AM_CONDITIONAL([HAVE_VAPIGEN], false)
])
PKG_PROG_PKG_CONFIG
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
AC_CANONICAL_HOST

View File

@ -59,6 +59,8 @@ libswe_glib_2_0_la_SOURCES = \
libswe_glib_2_0_la_CFLAGS = $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) -Wall
libswe_glib_2_0_la_LIBADD = $(GLIB_LIBS) $(GOBJECT_LIBS) $(LIBSWE_LIBS)
libswe_glib_2_0_la_DEPENDENCIES = \
$(NULL)
BUILT_SOURCES = gswe-enumtypes.c gswe-enumtypes.h
@ -74,6 +76,9 @@ gswe-enumtypes.c: $(gswe_enum_headers) gswe-enumtypes.h gswe-enumtypes.c.templat
$(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \
gswe-enumtypes.c.tmp && mv gswe-enumtypes.c.tmp gswe-enumtypes.c
SweGlib-2.0.vapi: SweGlib-$(SWE_GLIB_API_VERSION).gir
$(AM_V_GEN)$(VAPIGEN) --library=SweGlib-2.0 SweGlib-2.0.gir
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
@ -100,4 +105,9 @@ header_DATA = \
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
if HAVE_VAPIGEN
vapidir = $(datadir)/vala/vapi
vapi_DATA = SweGlib-$(SWE_GLIB_API_VERSION).vapi
endif
endif