[tracker] build: Fix distcheck



commit 16e50d38c355e9e57ac7763edae5249a1d74ed32
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Aug 17 10:32:46 2010 +0200

    build: Fix distcheck
    
     * Note: vpath builds from git checkouts won't work. We need to find a way of
       avoiding the re-compilation of the vala programs which require vapi files
       which may be either in builddir or srcdir.

 src/libtracker-bus/Makefile.am     |   23 ++++-------------
 src/libtracker-direct/.gitignore   |    2 +-
 src/libtracker-direct/Makefile.am  |   20 +++++++--------
 src/libtracker-sparql/Makefile.am  |   45 +++++++++++++++--------------------
 tests/functional-tests/Makefile.am |    6 ++--
 5 files changed, 38 insertions(+), 58 deletions(-)
---
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
index bfb8bb1..bf2ae6c 100644
--- a/src/libtracker-bus/Makefile.am
+++ b/src/libtracker-bus/Makefile.am
@@ -23,7 +23,7 @@ endif
 
 modules_LTLIBRARIES = libtracker-bus.la
 
-libtracker_bus_la_VALASOURCES = \
+libtracker_bus_la_VALASOURCES = 		\
 	tracker-bus.vala			\
 	tracker-array-cursor.vala
 
@@ -55,33 +55,22 @@ vapi_sources =						\
 	tracker-bus-array-update.vapi
 
 libtracker-bus.vala.stamp: $(libtracker_bus_la_VALASOURCES) $(vapi_sources)
-	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg dbus-glib-1 -H tracker-bus.h --vapi tracker-bus.vapi $^
+	$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg dbus-glib-1 -H tracker-bus.h --vapi tracker-bus.vapi $^
 	$(AM_V_GEN)touch $@
 
-# Vala bindings
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = tracker-bus-$(TRACKER_API_VERSION).vapi
-
-tracker-bus.vapi: libtracker-bus.vala.stamp
-tracker-bus-$(TRACKER_API_VERSION).vapi: tracker-bus.vapi
-	cp $< $@
+BUILT_SOURCES = libtracker-bus.vala.stamp
 
 libtracker_bus_la_LIBADD = 						\
-	$(top_builddir)/src/libtracker-common/libtracker-common.la \
+	$(top_builddir)/src/libtracker-common/libtracker-common.la 	\
 	$(GLIB2_LIBS) \
 	$(DBUS_LIBS) \
 	$(GCOV_LIBS) \
 	$(GIO_LIBS)
 
-BUILT_SOURCES = 					\
-	libtracker-bus.vala.stamp
-
-CLEANFILES = 						\
-	$(BUILT_SOURCES)
-
 MAINTAINERCLEANFILES =					\
-	$(libtracker_bus_la_VALASOURCES:.vala=.c) \
+	$(libtracker_bus_la_VALASOURCES:.vala=.c) 	\
 	libtracker-bus.vala.stamp			\
+	tracker-bus.vapi				\
 	tracker-bus.h
 
 EXTRA_DIST = 						\
diff --git a/src/libtracker-direct/.gitignore b/src/libtracker-direct/.gitignore
index a97bf1e..dd13173 100644
--- a/src/libtracker-direct/.gitignore
+++ b/src/libtracker-direct/.gitignore
@@ -1,2 +1,2 @@
 tracker-direct.[ch]
-tracker-direct-*.vapi
+tracker-direct*.vapi
diff --git a/src/libtracker-direct/Makefile.am b/src/libtracker-direct/Makefile.am
index 07adece..7c3c881 100644
--- a/src/libtracker-direct/Makefile.am
+++ b/src/libtracker-direct/Makefile.am
@@ -36,24 +36,22 @@ vapi_sources =						\
 	$(top_srcdir)/src/libtracker-data/tracker-sparql-query.vapi
 
 libtracker-direct.vala.stamp: $(libtracker_direct_la_VALASOURCES) $(vapi_sources)
-	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-direct.h --vapi tracker-direct-$(TRACKER_API_VERSION).vapi $^
+	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-direct.h --vapi tracker-direct.vapi $^
 	$(AM_V_GEN)touch $@
 
+BUILT_SOURCES = libtracker-direct.vala.stamp
+
 libtracker_direct_la_LIBADD = 						\
 	$(top_builddir)/src/libtracker-data/libtracker-data.la	\
 	$(GLIB2_LIBS)
 
-BUILT_SOURCES = 					\
-	libtracker-direct.vala.stamp
-
-CLEANFILES = 						\
-	$(BUILT_SOURCES)
-
 MAINTAINERCLEANFILES =					\
-	$(libtracker_direct_la_VALASOURCES:.vala=.c) \
+	$(libtracker_direct_la_VALASOURCES:.vala=.c) 	\
 	libtracker-direct.vala.stamp			\
-	tracker-direct.h
+	tracker-direct.h				\
+	tracker-direct.vapi
 
 EXTRA_DIST = 						\
-	$(libtracker_direct_la_VALASOURCES) \
-	libtracker-direct.vala.stamp
+	$(libtracker_direct_la_VALASOURCES) 		\
+	libtracker-direct.vala.stamp			\
+	tracker-direct.vapi
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index b701cc9..10357b3 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -16,62 +16,55 @@ lib_LTLIBRARIES = libtracker-sparql- TRACKER_API_VERSION@.la
 
 libtracker_sparqlincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-sparql
 
-libtracker_sparql_la_VALASOURCES = 			\
-	tracker-builder.vala					\
-	tracker-connection.vala					\
+libtracker_sparql_la_VALASOURCES = 					\
+	tracker-builder.vala						\
+	tracker-connection.vala						\
 	tracker-cursor.vala						\
-	tracker-plugin-loader.vala				\
+	tracker-plugin-loader.vala					\
 	tracker-utils.vala
 
-libtracker_sparql_ TRACKER_API_VERSION@_la_SOURCES = 	\
-	libtracker-sparql.vala.stamp			\
-	$(libtracker_sparql_la_VALASOURCES:.vala=.c) \
+libtracker_sparql_ TRACKER_API_VERSION@_la_SOURCES = 			\
+	libtracker-sparql.vala.stamp					\
+	$(libtracker_sparql_la_VALASOURCES:.vala=.c) 			\
 	tracker-uri.c
 
-libtracker_sparql_ TRACKER_API_VERSION@_la_LDFLAGS = 	\
+libtracker_sparql_ TRACKER_API_VERSION@_la_LDFLAGS = 			\
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
 #	-export-symbols-regex '^tracker_.*'
 
-libtracker_sparqlinclude_HEADERS = 			\
+libtracker_sparqlinclude_HEADERS = 					\
 	tracker-sparql.h
 
 # Vala sources
-vapi_sources =						\
-	config.vapi					\
-	$(top_srcdir)/src/vapi/posix.vapi		\
+vapi_sources =								\
+	config.vapi							\
+	$(top_srcdir)/src/vapi/posix.vapi				\
 	$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
 
 libtracker-sparql.vala.stamp: $(libtracker_sparql_la_VALASOURCES) $(vapi_sources)
-	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg gmodule-2.0 -H tracker-sparql.h --vapi tracker-sparql.vapi $^
+	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg gmodule-2.0 -H tracker-sparql.h --vapi tracker-sparql-$(TRACKER_API_VERSION).vapi $^
 	$(AM_V_GEN)touch $@
 
+BUILT_SOURCES = libtracker-sparql.vala.stamp
+
 # Vala bindings
 vapidir = $(datadir)/vala/vapi
 vapi_DATA = tracker-sparql-$(TRACKER_API_VERSION).vapi
 
-tracker-sparql.vapi: libtracker-sparql.vala.stamp
-tracker-sparql-$(TRACKER_API_VERSION).vapi: tracker-sparql.vapi
-	cp $< $@
-
 libtracker_sparql_ TRACKER_API_VERSION@_la_LIBADD = 	\
 	$(GLIB2_LIBS)					\
 	$(GCOV_LIBS)					\
 	$(GIO_LIBS)
 
-BUILT_SOURCES = 					\
-	libtracker-sparql.vala.stamp
-
-CLEANFILES = 						\
-	$(BUILT_SOURCES)
-
 MAINTAINERCLEANFILES =					\
 	$(libtracker_sparql_la_VALASOURCES:.vala=.c) 	\
 	libtracker-sparql.vala.stamp			\
+	tracker-sparql-$(TRACKER_API_VERSION).vapi	\
 	tracker-sparql.h
 
 EXTRA_DIST = 						\
-	tracker-sparql.vapi				\
-	config.vapi \
+	config.vapi 					\
 	$(libtracker_sparql_la_VALASOURCES) 		\
-	libtracker-sparql.vala.stamp
+	libtracker-sparql.vala.stamp			\
+	tracker-sparql-$(TRACKER_API_VERSION).vapi
diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am
index 8065112..b9245a8 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -96,7 +96,7 @@ bus_update_test_SOURCES = \
 
 direct_vapi_sources = \
 	$(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
-	$(top_srcdir)/src/libtracker-direct/tracker-direct-$(TRACKER_API_VERSION).vapi
+	$(top_srcdir)/src/libtracker-direct/tracker-direct.vapi
 
 direct-query-test.vala.stamp: $(direct_query_test_VALASOURCES) $(direct_vapi_sources)
 	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 $^
@@ -115,8 +115,8 @@ default-update-test.vala.stamp: $(default_update_test_VALASOURCES) $(direct_vapi
 default_update_test_LDADD = $(direct_query_test_LDADD)
 
 bus_vapi_sources = \
-	$(top_builddir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
-	$(top_builddir)/src/libtracker-bus/tracker-bus-$(TRACKER_API_VERSION).vapi
+	$(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
+	$(top_srcdir)/src/libtracker-bus/tracker-bus.vapi
 
 bus-query-test.vala.stamp: $(bus_query_test_VALASOURCES) $(bus_vapi_sources)
 	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg dbus-glib-1 $^



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