From a368f0f4a5ef5c46d95cb5dc05ccb5dd299f8569 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 10 Mar 2016 21:36:28 +0100 Subject: [PATCH] Update src/Makefile.am to use Vala --- configure.ac | 34 ---------------------------------- src/Makefile.am | 31 ++++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/configure.ac b/configure.ac index 72f964e..10f4f99 100644 --- a/configure.ac +++ b/configure.ac @@ -43,40 +43,6 @@ AM_PROG_AS VALAC_CHECK -AS_IF([test tp_matrix_nano_version = 0], -[ # version x.y.z - "official release", - # disable extra checks by default - AC_ARG_ENABLE([fatal-warnings], - [AC_HELP_STRING([--enable-fatal-warnings], - [make various warnings fatal])], - [], - [enable_fatal_warnings=no]) -], -[ # version x.y.z.1 - development snapshot, - # enable extra checks by default - AC_ARG_ENABLE([fatal-warnings], - [AC_HELP_STRING([--disable-fatal-warnings], - [make various warnings non-fatal])], - [], - [enable_fatal_warnings=yes]) -]) - -TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes], - [all \ - extra \ - declaration-after-statement \ - shadow \ - missing-prototypes \ - nested-externs \ - pointer-arith \ - sign-compare \ - strict-prototypes \ - format-security \ - init-self], - [missing-field-initializers \ - unused-parameter]) -AC_SUBST([ERROR_CFLAGS]) - # these aren't really error flags but they serve a similar purpose for us - # making the toolchain stricter AS_IF([test "x$enable_fatal_warnings" = xyes], diff --git a/src/Makefile.am b/src/Makefile.am index 7ff6c2e..2138252 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,9 +1,38 @@ # correctly clean the generated source files CLEANFILES = $(BUILT_SOURCES) $(man_MANS) -libexec_PROGRAMS=telepathy-matrix +libexec_PROGRAMS = telepathy-matrix + +AM_VALAFLAGS = -C --pkg=telepathy-glib + +libtp_matrix_convenience_la_VALA_SOURCES = \ + $(NULL) + +vala-stamp: $(libtp_matrix_convenience_la_VALA_SOURCES) + @rm -f vala-temp + @touch vala-temp + $(AM_V_GEN) $(VALAC) $(AM_VALAFLAGS) $^ + @mv -f vala-temp $@ + +CLEANFILES += \ + $(libtp_matrix_convenience_la_VALA_SOURCES:.vala=.c) \ + $(NULL) + +$(libtp_matrix_convenience_la_VALA_SOURCES:.vala=.c): vala-stamp + @if test -f $@; then :; else \ + trap 'rm -rf vala-lock vala-stamp' 1 2 13 15; \ + if mkdir vala-lock 2> /dev/null; then \ + rm -f vala-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) vala-stamp; \ + rmdir vala-lock; \ + else \ + while test -d vala-lock; do sleep 1; done; \ + test -f vala-stamp; exit $$?; \ + fi \ + fi libmatrix_convenience_la_SOURCES = \ + $(libtp_matrix_convenience_la_VALA_SOURCES:.vala=.c) \ matrix-connection-manager.c \ matrix-connection-manager.h \ matrix-protocol.c \