[tracker/extract-rules-fix] libtracker-extract: Don't break compilation due to missing rules/modules dir
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/extract-rules-fix] libtracker-extract: Don't break compilation due to missing rules/modules dir
- Date: Mon, 24 Feb 2014 15:52:17 +0000 (UTC)
commit 43b11470fe9618b5b3bea924720d9d1846cfeae2
Author: Martyn Russell <martyn lanedo com>
Date: Mon Feb 24 15:51:18 2014 +0000
libtracker-extract: Don't break compilation due to missing rules/modules dir
configure.ac | 8 ++++++++
.../{01-mockup.rule.in => 01-mockup.rule} | 0
examples/libtracker-extract/Makefile.am | 14 ++++----------
src/tracker-extract/Makefile.am | 14 ++++++++++----
4 files changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 79458ea..15e5e33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -320,6 +320,14 @@ TRACKER_EXTRACT_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
PKG_CHECK_MODULES(TRACKER_EXTRACT, [$TRACKER_EXTRACT_REQUIRED])
+TRACKER_EXTRACT_MODULES_DIR="${libdir}/tracker-${TRACKER_API_VERSION}/extract-modules"
+AC_SUBST(TRACKER_EXTRACT_MODULES_DIR)
+
+# NOTE: We don't use ${TRACKER_API_VERSION} because other content like
+# the ontology is installed to the same location.
+TRACKER_EXTRACT_RULES_DIR="${datadir}/tracker/extract-rules"
+AC_SUBST(TRACKER_EXTRACT_RULES_DIR)
+
# Check requirements for tracker-extract modules
TRACKER_EXTRACT_MODULES_REQUIRED="glib-2.0 >= $GLIB_REQUIRED"
diff --git a/examples/libtracker-extract/01-mockup.rule.in b/examples/libtracker-extract/01-mockup.rule
similarity index 100%
rename from examples/libtracker-extract/01-mockup.rule.in
rename to examples/libtracker-extract/01-mockup.rule
diff --git a/examples/libtracker-extract/Makefile.am b/examples/libtracker-extract/Makefile.am
index cc2e80f..5f9bbcf 100644
--- a/examples/libtracker-extract/Makefile.am
+++ b/examples/libtracker-extract/Makefile.am
@@ -16,17 +16,11 @@ libextract_mockup_la_LIBADD = \
$(BUILD_LIBS) \
$(LIBTRACKER_EXTRACT_LIBS)
-rules_in_files = 01-mockup.rule.in
-
-%.rule: %.rule.in
- @sed -e "s|@extractmodulesdir[ ]|${extractmodulesdir}|" $< > $@
-
# This is noinst_ only because it's an example, normally this would be
# "rules" (for rules_DATA and rulesdir) or whatever name you want to
# give for your rules files.
-noinstdir = $(extractrulesdir)
+#
+# _RULES_DIR = $(datadir)/tracker/extract-rules
+#
+noinstdir = $(TRACKER_EXTRACT_RULES_DIR)
noinst_DATA = 01-mockup.rule
-
-CLEANFILES = $(noinst_DATA)
-
-EXTRA_DIST = $(rules_in_files)
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 215971e..b1ece5f 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -1,14 +1,17 @@
-extractrulesdir = $(datadir)/tracker/extract-rules
+#
+# _RULES_DIR = $(datadir)/tracker/extract-rules
+#
+extractrulesdir = $(TRACKER_EXTRACT_RULES_DIR)
+rulesdir = $(extractrulesdir)
module_flags = -module -avoid-version -no-undefined
-rulesdir = $(extractrulesdir)
AM_CPPFLAGS = \
$(BUILD_CFLAGS) \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
-DLOCALEDIR=\""$(localedir)"\" \
- -DTRACKER_EXTRACTORS_DIR=\""$(extractmodulesdir)"\" \
+ -DTRACKER_EXTRACTORS_DIR=\""$(TRACKER_EXTRACT_MODULES_DIR)"\" \
$(TRACKER_EXTRACT_CFLAGS)
# NOTE: The rules are here and not in another sub-directory because we
@@ -54,7 +57,10 @@ rules_files = \
# NOTE:
# We don't always link with libtracker-common, we only link
# against it if we directly use functions in the .so
-extractmodulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/extract-modules
+#
+# _MODULES_DIR = $(libdir)/tracker-$(TRACKER_API_VERSION)/extract-modules
+#
+extractmodulesdir = $(TRACKER_EXTRACT_MODULES_DIR)
extractmodules_LTLIBRARIES = # Empty
rules_DATA = # Empty
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]