[tracker/configure-for-binaries: 50/80] utils/services: Cleaned up CFLAGS/LIBS
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/configure-for-binaries: 50/80] utils/services: Cleaned up CFLAGS/LIBS
- Date: Wed, 27 Oct 2010 14:21:56 +0000 (UTC)
commit a9c0e64e9fb9a0dfa3b5a8173d4437adead59255
Author: Martyn Russell <martyn lanedo com>
Date: Mon Oct 25 17:20:26 2010 +0100
utils/services: Cleaned up CFLAGS/LIBS
utils/services/Makefile.am | 37 ++++++----------------------------
utils/services/data-validator.c | 22 +++++++-------------
utils/services/ontology-validator.c | 7 ++++-
3 files changed, 20 insertions(+), 46 deletions(-)
---
diff --git a/utils/services/Makefile.am b/utils/services/Makefile.am
index a45d0a7..2e7920a 100644
--- a/utils/services/Makefile.am
+++ b/utils/services/Makefile.am
@@ -1,46 +1,23 @@
include $(top_srcdir)/Makefile.decl
-noinst_PROGRAMS = ontology-validator data-validator $(TEST_PROGS)
-
-#TEST_PROGS += qname-test
+noinst_PROGRAMS = ontology-validator data-validator
INCLUDES = \
$(BUILD_CFLAGS) \
- -DTOP_SRCDIR=\"$(top_srcdir)\" \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
- $(GLIB2_CFLAGS) \
- $(GIO_CFLAGS) \
- $(DBUS_CFLAGS)
-
-ontology_validator_SOURCES = \
- ontology-validator.c
+ -DTOP_SRCDIR=\"$(top_srcdir)\" \
+ $(LIBTRACKER_DATA_CFLAGS)
-ontology_validator_LDADD = \
+LDADD = \
$(top_builddir)/src/libtracker-data/libtracker-data.la \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
- $(top_builddir)/src/libtracker-sparql/libtracker-sparql- TRACKER_API_VERSION@.la \
$(BUILD_LIBS) \
- $(DBUS_LIBS) \
- $(GIO_LIBS) \
- $(GLIB2_LIBS)
+ $(LIBTRACKER_DATA_LIBS)
-data_validator_SOURCES = \
- data-validator.c
-
-data_validator_LDADD = \
- $(top_builddir)/src/libtracker-data/libtracker-data.la \
- $(top_builddir)/src/libtracker-common/libtracker-common.la \
- $(top_builddir)/src/libtracker-sparql/libtracker-sparql- TRACKER_API_VERSION@.la \
- $(BUILD_LIBS) \
- $(DBUS_LIBS) \
- $(GLIB2_LIBS) \
- $(GIO_LIBS)
+ontology_validator_SOURCES = ontology-validator.c
-#qname_test_SOURCES = qname-test.c qname.c
-#qname_test_LDADD = $(DBUS_LIBS) \
-# $(GLIB2_LIBS) \
-# $(GIO_LIBS)
+data_validator_SOURCES = data-validator.c
EXTRA_DIST = file-class.cache.test
diff --git a/utils/services/data-validator.c b/utils/services/data-validator.c
index 870d2e2..7ff7a60 100644
--- a/utils/services/data-validator.c
+++ b/utils/services/data-validator.c
@@ -17,12 +17,15 @@
* 02110-1301, USA.
*/
+#include "config.h"
+
+#include <string.h>
+
#include <glib.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <string.h>
-#include <libtracker-data/tracker-sparql-query.h>
+#include <libtracker-data/tracker-data.h>
static gchar *ontology_dir = NULL;
static gchar *ttl_file = NULL;
@@ -60,6 +63,7 @@ exists_or_already_reported (const gchar *item)
return FALSE;
}
}
+
return TRUE;
}
@@ -72,7 +76,6 @@ turtle_load_ontology (const gchar *turtle_subject,
if (!g_strcmp0 (turtle_predicate, IS)) {
known_items = g_list_prepend (known_items, g_strdup (turtle_subject));
}
-
}
static void
@@ -80,19 +83,15 @@ turtle_statement_handler (const gchar *turtle_subject,
const gchar *turtle_predicate,
const gchar *turtle_object)
{
-
- /* Check that predicate exists in the ontology
- */
+ /* Check that predicate exists in the ontology */
if (!exists_or_already_reported (turtle_predicate)){
g_print ("Unknown property %s\n", turtle_predicate);
unknown_items = g_list_prepend (unknown_items, g_strdup (turtle_predicate));
error_flag = TRUE;
}
- /* And if it is a type... check the object is also there
- */
+ /* And if it is a type... check the object is also there */
if (!g_strcmp0 (turtle_predicate, IS)) {
-
if (!exists_or_already_reported (turtle_object)){
g_print ("Unknown class %s\n", turtle_object);
error_flag = TRUE;
@@ -101,7 +100,6 @@ turtle_statement_handler (const gchar *turtle_subject,
}
}
-
static void
load_ontology_files (const gchar *services_dir)
{
@@ -145,7 +143,6 @@ load_ontology_files (const gchar *services_dir)
g_error_free (error);
}
-
g_free (fullpath);
counter += 1;
conf_file = g_dir_read_name (services);
@@ -159,8 +156,6 @@ load_ontology_files (const gchar *services_dir)
g_debug ("Loaded %d ontologies\n", counter);
}
-
-
gint
main (gint argc, gchar **argv)
{
@@ -170,7 +165,6 @@ main (gint argc, gchar **argv)
g_type_init ();
-
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
context = g_option_context_new ("- Validate a turtle file against the ontology");
diff --git a/utils/services/ontology-validator.c b/utils/services/ontology-validator.c
index b191abb..0e3c34e 100644
--- a/utils/services/ontology-validator.c
+++ b/utils/services/ontology-validator.c
@@ -17,12 +17,15 @@
* 02110-1301, USA.
*/
+#include "config.h"
+
+#include <string.h>
+
#include <glib.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <string.h>
-#include <libtracker-data/tracker-sparql-query.h>
+#include <libtracker-data/tracker-data.h>
static gchar *ontology_dir = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]