[tracker/vala-makefiles: 9/13] libtracker-client: Use Automake 1.11 Vala features



commit 13fbb7fc14f5777cfe40b0aad00a010cf429e741
Author: Martyn Russell <martyn lanedo com>
Date:   Wed Nov 3 17:06:04 2010 +0200

    libtracker-client: Use Automake 1.11 Vala features

 src/libtracker-client/Makefile.am |   66 +++++++++++++++----------------------
 1 files changed, 27 insertions(+), 39 deletions(-)
---
diff --git a/src/libtracker-client/Makefile.am b/src/libtracker-client/Makefile.am
index 2ad2b9d..8bb0974 100644
--- a/src/libtracker-client/Makefile.am
+++ b/src/libtracker-client/Makefile.am
@@ -1,5 +1,15 @@
 include $(top_srcdir)/Makefile.decl
 
+AM_VALAFLAGS =                                         \
+	-g                                             \
+	--includedir=libtracker-client                 \
+	--header tracker-sparql-builder.h              \
+	--vapi tracker-sparql-query.vapi               \
+	--pkg gio-2.0                                  \
+	$(top_srcdir)/src/vapi/posix.vapi              \
+	$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi     \
+	$(top_srcdir)/src/libtracker-common/libtracker-common.vapi
+
 AM_CPPFLAGS =                                          \
 	$(BUILD_CFLAGS)                                \
 	-DLOCALEDIR=\""$(localedir)"\"                 \
@@ -11,70 +21,48 @@ lib_LTLIBRARIES = libtracker-client- TRACKER_API_VERSION@.la
 
 libtracker_clientincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-client
 
-libtracker_client_ TRACKER_API_VERSION@_la_VALASOURCES = \
-	tracker-sparql-builder.vala
-
 libtracker_client_ TRACKER_API_VERSION@_la_SOURCES =   \
-	tracker.c                                      \
-	tracker-client.h                               \
-	tracker-sparql-builder.c                       \
-	tracker-sparql-builder.h                       \
-	libtracker-client.vala.stamp                   \
-	$(libtracker_client_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c)
-
-libtracker_client_ TRACKER_API_VERSION@_la_LDFLAGS =   \
-	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-	-export-symbols-regex '^tracker_.*'
+	tracker-sparql-builder.vala                    \
+	tracker.c
 
 libtracker_client_ TRACKER_API_VERSION@_la_LIBADD =    \
 	$(top_builddir)/src/libtracker-common/libtracker-common.la \
 	$(BUILD_LIBS)                                  \
 	$(LIBTRACKER_CLIENT_LIBS)
 
+libtracker_client_ TRACKER_API_VERSION@_la_LDFLAGS =   \
+	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+	-export-symbols-regex '^tracker_.*'
+
 libtracker_clientinclude_HEADERS =                     \
 	tracker.h                                      \
 	tracker-client.h                               \
 	tracker-sparql-builder.h
 
-# Generate DBus files from XML data.
-dbus_sources =                                         \
-	tracker-resources-glue.h                       \
-	tracker-statistics-glue.h
-
-%-glue.h: $(top_srcdir)/data/dbus/%.xml
-	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
-
 # Vala bindings
 vapidir = $(datadir)/vala/vapi
-vapi_DATA =                                            \
-	tracker-client-$(TRACKER_API_VERSION).vapi
+vapi_DATA = tracker-client-$(TRACKER_API_VERSION).vapi
 
 tracker-client-$(TRACKER_API_VERSION).vapi: tracker-client.vapi
 	cp $< $@
 
-# Vala sources
-vapi_sources =                                         \
-	$(top_srcdir)/src/vapi/posix.vapi              \
-	$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
+# Generate DBus files from XML data.
+dbus_sources =                                         \
+	tracker-resources-glue.h                       \
+	tracker-statistics-glue.h
 
-libtracker-client.vala.stamp: $(libtracker_client_ TRACKER_API_VERSION@_la_VALASOURCES) $(vapi_sources)
-	$(AM_V_GEN)$(VALAC) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-sparql-builder.h $^
-	$(AM_V_GEN)touch $@
+%-glue.h: $(top_srcdir)/data/dbus/%.xml
+	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
 
 BUILT_SOURCES =                                        \
-	$(dbus_sources)                                \
-	libtracker-client.vala.stamp
+	$(dbus_sources)
 
 CLEANFILES =                                           \
-	$(dbus_sources)                                \
-	$(vapi_DATA)
+	$(dbus_sources)
 
 MAINTAINERCLEANFILES =                                 \
-	$(libtracker_client_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c) \
-	libtracker-client.vala.stamp                   \
+	tracker-client-$(TRACKER_API_VERSION).vapi     \
 	tracker-sparql-builder.h
 
 EXTRA_DIST =                                           \
-	$(libtracker_client_ TRACKER_API_VERSION@_la_VALASOURCES) \
-	tracker-client.vapi                            \
-	libtracker-client.vala.stamp
+	tracker-client.vapi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]