[tracker/miner-web: 42/49] libtracker-miner: Fix Makefile.am to compile in password manager



commit 4ba853f04b28d96545f8f6c3dea69bc7154aee79
Author: Adrien Bustany <madcat mymadcat com>
Date:   Sun Jan 31 15:51:06 2010 -0300

    libtracker-miner: Fix Makefile.am to compile in password manager

 src/libtracker-miner/Makefile.am |   65 +++++++++++++++++++++----------------
 1 files changed, 37 insertions(+), 28 deletions(-)
---
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index c924ae4..7d4c13d 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -25,10 +25,33 @@ lib_LTLIBRARIES = libtracker-miner- TRACKER_API_VERSION@.la
 libtracker_minerdir = $(libdir)/tracker-$(TRACKER_API_VERSION)
 libtracker_minerincludedir=$(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-miner/
 
+VALAPKGS =                          \
+	--pkg dbus-glib-1               \
+	--pkg posix                     \
+	--pkg gio-2.0
+
+VALAFLAGS =                         \
+	--vapidir $(top_srcdir)/src/libtracker-miner
 
 libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES=     \
-    tracker-password-provider.vala           \
+    tracker-password-provider.vala
+
+if HAVE_GNOME_KEYRING
+VALAPKGS +=                         \
+	--pkg gnome-keyring-1
+VALAFLAGS +=                        \
+	-D HAVE_GNOME_KEYRING
+
+INCLUDES +=                         \
+	$(GNOME_KEYRING_CFLAGS)
+
+libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES +=     \
+    gnome-password-provider.vala
+else
+# Fallback to KeyFile password support
+libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES +=     \
 	keyfile-password-provider.vala
+endif
 
 libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = 	\
 	tracker-crawler.c				\
@@ -51,7 +74,7 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = 	\
 	tracker-utils.c					\
 	tracker-thumbnailer.c
 	tracker-utils.h                 \
-	$(libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c)
+	tracker-password-provider.c
 
 libtracker_minerinclude_HEADERS = 			\
 	tracker-miner.h 				\
@@ -79,6 +102,17 @@ libtracker_miner_ TRACKER_API_VERSION@_la_LIBADD = 	\
 	$(GLIB2_LIBS)					\
 	$(GDKPIXBUF_LIBS)
 
+if HAVE_GNOME_KEYRING
+libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES += 	\
+	gnome-password-provider.c
+
+libtracker_miner_ TRACKER_API_VERSION@_la_LIBADD +=       \
+	$(GNOME_KEYRING_LIBS)
+else
+libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES += 	\
+	keyfile-password-provider.c
+endif
+
 vapidir=$(datadir)/vala/vapi
 vapi_DATA =                     \
 	tracker-miner-$(TRACKER_API_VERSION).vapi \
@@ -106,33 +140,8 @@ dbus_sources = 						\
 	tracker-miner-web-glue.h				\
 	tracker-miner-client.h
 
-VALAPKGS =                          \
-	--pkg dbus-glib-1               \
-	--pkg posix                     \
-	--pkg gio-2.0
-
-VALAFLAGS =                         \
-	--vapidir $(top_srcdir)/src/libtracker-miner
-
-if HAVE_GNOME_KEYRING
-VALAPKGS +=                         \
-	--pkg gnome-keyring-1
-VALAFLAGS +=                        \
-	-D HAVE_GNOME_KEYRING
-
-INCLUDES +=                         \
-	$(GNOME_KEYRING_CFLAGS)
-
-libtracker_miner_ TRACKER_API_VERSION@_la_LIBADD +=       \
-	$(GNOME_KEYRING_LIBS)
-
-libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES +=     \
-    gnome-password-provider.vala
-endif
-
-
 libtracker-miner-web.vala.stamp: $(libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES)
-	$(VALAC) -C $(VALAPKGS) $(VALAFLAGS) -H tracker-password-provider.h $^
+	$(VALAC) -C $(VALAPKGS) $(VALAFLAGS) -H tracker-password-provider.h $(libtracker_miner_ TRACKER_API_VERSION@_la_VALASOURCES)
 	touch $@
 
 # Custom rule to avoid API duplication. There is also a workaround for bug



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