[tracker] autotools: Build and merge C/Vala girs in libtracker-sparql
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] autotools: Build and merge C/Vala girs in libtracker-sparql
- Date: Wed, 28 Jun 2017 10:05:47 +0000 (UTC)
commit 0348492f4d81675127067c8725014e139263412a
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jun 27 19:11:56 2017 +0200
autotools: Build and merge C/Vala girs in libtracker-sparql
Following the meson changes, build 2 separate static libs, generate
introspection stuff for those, and put them together in
src/libtracker-sparql-backend.
https://bugzilla.gnome.org/show_bug.cgi?id=782091
src/libtracker-miner/Makefile.am | 2 +-
src/libtracker-sparql-backend/Makefile.am | 53 ++++++++++++++++++++++++++++-
src/libtracker-sparql/Makefile.am | 42 +++++++----------------
3 files changed, 66 insertions(+), 31 deletions(-)
---
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 4537a95..d879db3 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -175,7 +175,7 @@ introspection_sources = \
TrackerMiner-@TRACKER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libtracker-miner-$(TRACKER_API_VERSION).la
Makefile
TrackerMiner_@TRACKER_API_VERSION_UNDERSCORES@_gir_INCLUDES = GObject-2.0 GModule-2.0 Gio-2.0
TrackerMiner_@TRACKER_API_VERSION_UNDERSCORES@_gir_SCANNERFLAGS = \
- --include-uninstalled=$(top_srcdir)/src/libtracker-sparql/Tracker-$(TRACKER_API_VERSION).gir
+ --include-uninstalled=$(top_builddir)/src/libtracker-sparql-backend/Tracker-$(TRACKER_API_VERSION).gir
TrackerMiner_@TRACKER_API_VERSION_UNDERSCORES@_gir_CFLAGS = $(INCLUDES)
TrackerMiner_@TRACKER_API_VERSION_UNDERSCORES@_gir_NAMESPACE = "TrackerMiner"
TrackerMiner_@TRACKER_API_VERSION_UNDERSCORES@_gir_LIBS = libtracker-miner-$(TRACKER_API_VERSION).la
diff --git a/src/libtracker-sparql-backend/Makefile.am b/src/libtracker-sparql-backend/Makefile.am
index 3b5165d..b55ed0f 100644
--- a/src/libtracker-sparql-backend/Makefile.am
+++ b/src/libtracker-sparql-backend/Makefile.am
@@ -19,7 +19,8 @@ libtracker_sparql_@TRACKER_API_VERSION@_la_SOURCES = \
tracker-backend.vala
libtracker_sparql_@TRACKER_API_VERSION@_la_LIBADD = \
- $(top_builddir)/src/libtracker-sparql/libtracker-sparql.la \
+ $(top_builddir)/src/libtracker-sparql/libtracker-sparql-intermediate-vala.la \
+ $(top_builddir)/src/libtracker-sparql/libtracker-sparql-intermediate-c.la \
$(top_builddir)/src/libtracker-bus/libtracker-bus.la \
$(top_builddir)/src/libtracker-direct/libtracker-direct.la \
$(top_builddir)/src/libtracker-remote/libtracker-remote.la \
@@ -32,3 +33,53 @@ libtracker_sparql_@TRACKER_API_VERSION@_la_LDFLAGS = \
-export-symbols-regex
'^(tracker_sparql_(connection|cursor|builder|escape|error|value|get)_.*|tracker_namespace_manager_.*|tracker_resource_.*|tracker_notifier_.*)'
EXTRA_DIST = meson.build
+
+# Introspection foo
+-include $(INTROSPECTION_MAKEFILE)
+
+if HAVE_INTROSPECTION
+
+c_introspection_files = \
+ $(top_builddir)/src/libtracker-sparql/tracker-sparql-enum-types.c \
+ $(top_builddir)/src/libtracker-sparql/tracker-sparql-enum-types.h \
+ $(top_srcdir)/src/libtracker-sparql/tracker-namespace-manager.c \
+ $(top_srcdir)/src/libtracker-sparql/tracker-namespace-manager.h \
+ $(top_srcdir)/src/libtracker-sparql/tracker-notifier.c \
+ $(top_srcdir)/src/libtracker-sparql/tracker-notifier.h \
+ $(top_srcdir)/src/libtracker-sparql/tracker-resource.c \
+ $(top_srcdir)/src/libtracker-sparql/tracker-resource.h \
+ $(top_srcdir)/src/libtracker-sparql/tracker-ontologies.h \
+ $(top_srcdir)/src/libtracker-sparql/tracker-version.c \
+ $(top_srcdir)/src/libtracker-sparql/tracker-version.h
+
+INTROSPECTION_SCANNER_ARGS = \
+ -I $(top_srcdir)/src \
+ -D TRACKER_COMPILATION \
+ --identifier-prefix=Tracker \
+ --symbol-prefix=tracker \
+ --warn-all
+
+Tracker_C-@TRACKER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) Makefile
libtracker-sparql-@TRACKER_API_VERSION@.la
+Tracker_C_@TRACKER_API_VERSION_UNDERSCORES@_gir_INCLUDES = GObject-2.0 GModule-2.0 Gio-2.0
+Tracker_C_@TRACKER_API_VERSION_UNDERSCORES@_gir_CFLAGS = $(INCLUDES)
+Tracker_C_@TRACKER_API_VERSION_UNDERSCORES@_gir_NAMESPACE = "Tracker"
+Tracker_C_@TRACKER_API_VERSION_UNDERSCORES@_gir_LIBS = libtracker-sparql-@TRACKER_API_VERSION@.la
+Tracker_C_@TRACKER_API_VERSION_UNDERSCORES@_gir_FILES = $(c_introspection_files)
+
+INTROSPECTION_GIRS = Tracker_C-$(TRACKER_API_VERSION).gir
+
+noinst_DATA = $(INTROSPECTION_GIRS)
+
+Tracker-@TRACKER_API_VERSION@.gir: $(INTROSPECTION_GIRS)
$(top_builddir)/src/libtracker-sparql/Tracker_Vala-$(TRACKER_API_VERSION).gir
+ $(AM_V_GEN) (cd $(srcdir) && $(top_srcdir)/utils/g-ir-merge/g-ir-merge --namespace Tracker
--nsversion $(TRACKER_API_VERSION) $(INTROSPECTION_GIRS)
$(top_builddir)/src/libtracker-sparql/Tracker_Vala-$(TRACKER_API_VERSION).gir) > $@
+
+GIRS = Tracker-$(TRACKER_API_VERSION).gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA) $(INTROSPECTION_GIRS)
+endif
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index 85b189c..192d98e 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -1,7 +1,7 @@
-noinst_LTLIBRARIES = libtracker-sparql.la
+noinst_LTLIBRARIES = libtracker-sparql-intermediate-vala.la libtracker-sparql-intermediate-c.la
-libtracker_sparql_la_VALAFLAGS = \
- --gir Tracker-$(TRACKER_API_VERSION).gir \
+libtracker_sparql_intermediate_vala_la_VALAFLAGS = \
+ --gir Tracker_Vala-$(TRACKER_API_VERSION).gir \
--library tracker-sparql-$(TRACKER_API_VERSION) \
--includedir=libtracker-sparql \
--header $(vala_header:.h=-no-checks.h) \
@@ -27,28 +27,31 @@ ENUM_SOURCES = \
tracker-sparql-enum-types.c \
tracker-sparql-enum-types.h
-libtracker_sparql_la_SOURCES = \
- $(ENUM_SOURCES) \
+libtracker_sparql_intermediate_vala_la_SOURCES = \
tracker-namespace.vala \
tracker-builder.vala \
tracker-connection.vala \
tracker-cursor.vala \
+ tracker-utils.vala
+
+libtracker_sparql_intermediate_vala_la_LIBADD = \
+ $(BUILD_LIBS) \
+ $(LIBTRACKER_SPARQL_LIBS)
+
+libtracker_sparql_intermediate_c_la_SOURCES = \
+ $(ENUM_SOURCES) \
tracker-namespace-manager.c \
tracker-namespace-manager.h \
tracker-notifier.c \
tracker-notifier.h \
tracker-resource.c \
tracker-resource.h \
- tracker-utils.vala \
tracker-uri.c \
tracker-uri.h \
tracker-ontologies.h \
tracker-version.c \
tracker-version.h
-libtracker_sparql_la_LIBADD = \
- $(BUILD_LIBS) \
- $(LIBTRACKER_SPARQL_LIBS)
# Should only be one file
vala_header = tracker-generated.h
@@ -94,7 +97,7 @@ vapi_DATA = \
tracker-sparql-$(TRACKER_API_VERSION).deps
BUILT_SOURCES = \
- libtracker_sparql_la_vala.stamp
+ libtracker_sparql_intermediate_vala_la_vala.stamp
MAINTAINERCLEANFILES = \
tracker-sparql-$(TRACKER_API_VERSION).vapi \
@@ -111,22 +114,3 @@ EXTRA_DIST = \
$(vala_header:.h=-no-checks.h) \
tracker-sparql-add-include-guards.sh \
meson.build
-
-# Introspection foo
--include $(INTROSPECTION_MAKEFILE)
-
-if HAVE_INTROSPECTION
-Tracker-@TRACKER_API_VERSION@.typelib: Tracker-$(TRACKER_API_VERSION).gir
- @INTROSPECTION_COMPILER@ --shared-library=libtracker-sparql-@TRACKER_API_VERSION@.so.0 -o $@ $^
-
-girdir = $(datadir)/gir-1.0
-gir_DATA = Tracker-$(TRACKER_API_VERSION).gir
-
-typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = $(gir_DATA:.gir=.typelib)
-
-# We don't clean the gir/typelib data for *Vala* generated g-ir files.
-# However, we do for *C* generated g-ir files due to Vala not being
-# required when building from a tarball.
-DISTCLEANFILES = $(gir_DATA) $(typelib_DATA)
-endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]