[tracker/wip/sam/meson: 90/90] Attempt to implement enum generation properly
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/sam/meson: 90/90] Attempt to implement enum generation properly
- Date: Thu, 1 Dec 2016 11:02:25 +0000 (UTC)
commit 4256465c7f4659d26ed01e2cf8ef561afaa8e910
Author: Sam Thursfield <sam afuera me uk>
Date: Tue Nov 29 12:48:23 2016 +0000
Attempt to implement enum generation properly
src/libtracker-common/meson.build | 9 +++++++++
src/libtracker-data/meson.build | 13 ++++---------
src/libtracker-direct/meson.build | 8 +-------
src/libtracker-extract/meson.build | 11 ++++++-----
src/libtracker-fts/meson.build | 4 ++--
src/libtracker-miner/meson.build | 8 ++++----
src/libtracker-remote/meson.build | 20 ++++++++++++++++++++
src/libtracker-sparql-backend/meson.build | 12 ++++--------
src/libtracker-sparql/meson.build | 26 +++++++++-----------------
9 files changed, 59 insertions(+), 52 deletions(-)
---
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
index fd936a2..565f9e7 100644
--- a/src/libtracker-common/meson.build
+++ b/src/libtracker-common/meson.build
@@ -1,3 +1,9 @@
+enums = gnome.mkenums('tracker-enum-types',
+ sources: 'tracker-enums.h',
+ c_template: 'tracker-enum-types.c.template',
+ h_template: 'tracker-enum-types.h.template',
+)
+
tracker_common_sources = [
'tracker-date-time.c',
'tracker-dbus.c',
@@ -10,6 +16,7 @@ tracker_common_sources = [
'tracker-locale.c',
'tracker-parser-utils.c',
'tracker-language.c',
+ enums[0], enums[1],
]
if unicode_library_name == 'icu'
@@ -30,7 +37,9 @@ libtracker_common = library('tracker-common',
include_directories: [configinc, srcinc],
install_dir: get_option('libdir') + '/tracker-' + tracker_api_version,
)
+
tracker_common_dep = declare_dependency(
+ sources: enums[1],
link_with: libtracker_common,
dependencies: tracker_common_dependencies,
include_directories: [configinc, srcinc],
diff --git a/src/libtracker-data/meson.build b/src/libtracker-data/meson.build
index 5ba2420..18ca504 100644
--- a/src/libtracker-data/meson.build
+++ b/src/libtracker-data/meson.build
@@ -10,8 +10,6 @@ libtracker_data_vala = static_library('tracker-data-vala',
'tracker-turtle-reader.vala',
'../libtracker-common/libtracker-common.vapi',
'../libtracker-data/libtracker-data.vapi',
- #link_with: [libtracker_common, libtracker_sparql_intermediate, libtracker_sparql_intermediate_vala],
- #dependencies: [gio_unix, glib, uuid, zlib],
dependencies: [tracker_common_dep, tracker_sparql_intermediate_dep],
c_args: [
'-DTRACKER_COMPILATION',
@@ -26,12 +24,11 @@ libtracker_data_vala = static_library('tracker-data-vala',
)
tracker_data_dependencies = [
- gvdb_dep, tracker_common_dep,
- sqlite, uuid,
+ tracker_common_dep, gvdb_dep, sqlite, uuid,
]
if get_option('fts')
- tracker_data_dependencies += tracker_fts_dep
+ tracker_data_dependencies += tracker_fts_dep
endif
#[gio_unix, glib, libmath, sqlite, uuid]
@@ -53,11 +50,9 @@ libtracker_data = library('tracker-data',
'tracker-ontology.c',
'tracker-ontologies.c',
'tracker-property.c',
- #link_with: [gvdb, libtracker_common, libtracker_sparql_intermediate,
- # libtracker_sparql_intermediate_vala, libtracker_data_vala, libtracker_fts],
- #dependencies: tracker_data_dependencies + [unicode_library],
link_with: [libtracker_data_vala],
- dependencies: tracker_data_dependencies + [unicode_library, tracker_sparql_intermediate_dep],
+ dependencies: tracker_data_dependencies + [unicode_library],
+ include_directories: configinc,
c_args: [
'-DTRACKER_COMPILATION',
],
diff --git a/src/libtracker-direct/meson.build b/src/libtracker-direct/meson.build
index f23fb91..684e324 100644
--- a/src/libtracker-direct/meson.build
+++ b/src/libtracker-direct/meson.build
@@ -4,8 +4,7 @@ libtracker_direct = static_library('tracker-direct',
'../libtracker-common/libtracker-common.vapi',
'../libtracker-data/libtracker-data.vapi',
'../libtracker-data/tracker-sparql-query.vapi',
- link_with: [libtracker_common, libtracker_data],
- dependencies: [tracker_sparql_intermediate_dep],
+ link_with: [libtracker_common, libtracker_data, libtracker_sparql_intermediate],
c_args: [
'-DTRACKER_COMPILATION',
],
@@ -17,8 +16,3 @@ libtracker_direct = static_library('tracker-direct',
'--target-glib', glib_required,
],
)
-tracker_direct_dep = declare_dependency(
- link_with: [libtracker_direct],
- dependencies: [tracker_sparql_intermediate_dep],
- include_directories: include_directories('.')
-)
diff --git a/src/libtracker-extract/meson.build b/src/libtracker-extract/meson.build
index 6c08f7b..7b25c65 100644
--- a/src/libtracker-extract/meson.build
+++ b/src/libtracker-extract/meson.build
@@ -20,19 +20,20 @@ if have_meegotouch
libtracker_extract_sources += 'tracker-encoding-meegotouch.cpp'
endif
-libtracker_extract_dependencies = [charset_library, gmodule]
+tracker_extract_dependencies = [charset_library, gmodule]
if libexif.found()
- libtracker_extract_dependencies += libexif
+ tracker_extract_dependencies += libexif
endif
if libiptcdata.found()
- libtracker_extract_dependencies += libiptcdata
+ tracker_extract_dependencies += libiptcdata
endif
libtracker_extract = library('tracker-extract',
libtracker_extract_sources,
- dependencies: [tracker_common_dep, tracker_sparql_dep] + libtracker_extract_dependencies,
+ link_with: libtracker_common,
+ dependencies: [tracker_sparql_dep] + tracker_extract_dependencies,
c_args: [
'-DTRACKER_COMPILATION',
'-DTRACKER_EXTRACTOR_RULES_DIR="@0@"'.format(tracker_extract_rules_dir),
@@ -42,4 +43,4 @@ libtracker_extract = library('tracker-extract',
tracker_extract_dep = declare_dependency(
link_with: libtracker_extract,
- dependencies: libtracker_extract_dependencies)
+ dependencies: tracker_extract_dependencies)
diff --git a/src/libtracker-fts/meson.build b/src/libtracker-fts/meson.build
index fea60dc..d08bc5d 100644
--- a/src/libtracker-fts/meson.build
+++ b/src/libtracker-fts/meson.build
@@ -4,14 +4,14 @@ else
libtracker_fts_fts5 = files('fts5.c')
endif
-libtracker_fts_dependencies = [tracker_common_dep, sqlite]
+libtracker_fts_dependencies = [sqlite]
libtracker_fts = static_library('libtracker-fts',
'tracker-fts.c',
'tracker-fts-config.c',
'tracker-fts-tokenizer.c',
libtracker_fts_fts5,
- dependencies: libtracker_fts_dependencies,
+ dependencies: tracker_common_dep,
c_args: [
'-DTRACKER_COMPILATION',
],
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
index 256a162..660aae8 100644
--- a/src/libtracker-miner/meson.build
+++ b/src/libtracker-miner/meson.build
@@ -33,6 +33,7 @@ if libmediaart.found()
endif
miner_sources = [
+ tracker_miner_enum_types_code,
shared_libtracker_miner_monitor_sources,
shared_libtracker_miner_file_system_sources,
shared_libtracker_miner_crawler_sources,
@@ -41,7 +42,6 @@ miner_sources = [
'tracker-decorator-fs.c',
'tracker-enumerator.c',
'tracker-indexing-tree.c',
- 'tracker-miner-enum-types.c',
'tracker-miner-object.c',
'tracker-miner-online.c',
'tracker-miner-fs.c']
@@ -49,7 +49,7 @@ miner_sources = [
libtracker_miner_private = static_library(
'tracker-miner-private',
private_sources,
- dependencies: [tracker_common_dep, tracker_sparql_dep],
+ dependencies: [tracker_sparql_dep],
c_args: [
'-DTRACKER_COMPILATION',
],
@@ -59,7 +59,7 @@ libtracker_miner = library(
'tracker-miner-' + tracker_api_version,
miner_sources,
link_with: [libtracker_miner_private],
- dependencies: [tracker_common_dep, tracker_sparql_dep],
+ dependencies: [tracker_sparql_dep],
c_args: [
'-DTRACKER_COMPILATION',
],
@@ -67,6 +67,6 @@ libtracker_miner = library(
tracker_miner_dep = declare_dependency(
link_with: libtracker_miner,
- dependencies: [tracker_common_dep, tracker_sparql_dep],
+ dependencies: [tracker_sparql_dep],
include_directories: include_directories('.')
)
diff --git a/src/libtracker-remote/meson.build b/src/libtracker-remote/meson.build
new file mode 100644
index 0000000..a625f9d
--- /dev/null
+++ b/src/libtracker-remote/meson.build
@@ -0,0 +1,20 @@
+tracker_remote_dependencies = [json_glib, libsoup, libxml2]
+
+libtracker_remote = static_library('tracker-remote',
+ 'tracker-json-cursor.vala',
+ 'tracker-xml-cursor.vala',
+ 'tracker-remote.vala',
+ '../libtracker-common/libtracker-common.vapi',
+ dependencies: tracker_remote_dependencies,
+ link_with: [libtracker_common],
+ c_args: [
+ '-DTRACKER_COMPILATION',
+ ],
+ vala_args: [
+ '--debug',
+ '--pkg', 'posix',
+ # FIXME: Meson has code to add --target-glib automatically, but it
+ # doesn't seem to work here.
+ '--target-glib', glib_required,
+ ],
+)
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index aa66457..492606a 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -1,14 +1,10 @@
libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
'tracker-backend.vala',
- dependencies: [
- tracker_common_dep, tracker_bus_dep, tracker_direct_dep,
- tracker_remote_dep
- ]
+ link_with: [libtracker_common, libtracker_bus, libtracker_direct,
+ libtracker_remote],
+ dependencies: tracker_sparql_intermediate_dependencies
)
tracker_sparql_dep = declare_dependency(
link_with: [libtracker_sparql, libtracker_common],
- dependencies: [
- tracker_common_dep, tracker_data_dep, tracker_sparql_intermediate_dep,
- json_glib, libsoup, libxml2
- ],
+ dependencies: tracker_common_dependencies + tracker_remote_dependencies
)
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index 732282c..76b14f4 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -1,22 +1,16 @@
-tracker_sparql_intermediate_dependencies = [tracker_common_dep]
-
-
-tracker_sparql_enum_types_header = custom_target('tracker-sparql-enum-types-header',
- input: ['tracker-sparql -enum-types.h.template', 'tracker-sparql-enums.h'],
- output: 'tracker-sparql-enum-types.h',
- command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
- capture: true
+enums_c = gnome.mkenums('tracker-sparql-enum-types',
+ sources: 'tracker-notifier.h',
+ c_template: 'tracker-sparql-enum-types.c.template',
)
-
-tracker_sparql_enum_types_code = custom_target('tracker-sparql-enum-types-code',
- input: ['tracker-sparql-enum-types.c.template', 'tracker-sparql-enums.h'],
- output: 'tracker-sparql-enum-types.c',
- command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
- capture: true
+enums_h = gnome.mkenums('tracker-sparql-enum-types',
+ sources: 'tracker-notifier.h',
+ h_template: 'tracker-sparql-enum-types.h.template',
)
+tracker_sparql_intermediate_dependencies = [gio, glib, uuid]
libtracker_sparql_intermediate = static_library('tracker-sparql-' + tracker_api_version,
+ enums_c, enums_h,
'tracker-namespace.vala',
'tracker-builder.vala',
'tracker-connection.vala',
@@ -25,12 +19,10 @@ libtracker_sparql_intermediate = static_library('tracker-sparql-' + tracker_api_
'tracker-namespace-manager.c',
'tracker-notifier.c',
'tracker-resource.c',
- 'tracker-sparql-enum-types.c',
'tracker-uri.c',
'tracker-version.c',
vala_header: 'tracker-generated.h',
- #link_with: [libtracker_common],
- #dependencies: [gio, glib, gobject, uuid],
+ link_with: [libtracker_common],
dependencies: tracker_sparql_intermediate_dependencies,
c_args: [
'-DTRACKER_COMPILATION',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]