[tracker] meson: Install generated headers without needing a script
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] meson: Install generated headers without needing a script
- Date: Sun, 22 Apr 2018 21:25:14 +0000 (UTC)
commit 7bcf86e4c3a29c0bae02837174bd3cbb5e09e3c7
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Apr 22 23:23:04 2018 +0200
meson: Install generated headers without needing a script
This script dates from a long time ago when Meson lacked ways to install
generated headers.
This fixes an issue where `ninja install` in tracker.git triggers a
rebuild of lots of stuff from tracker-miners.git, which happened because
the mtime of the installed generated headers would become newer than the
build files in tracker-miners.git and cause ninja to rebuild them all.
src/install-generated-header.sh | 12 ------------
src/libtracker-miner/meson.build | 7 ++-----
src/libtracker-sparql/meson.build | 10 +++-------
3 files changed, 5 insertions(+), 24 deletions(-)
---
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
index d3a8c7a..7036860 100644
--- a/src/libtracker-miner/meson.build
+++ b/src/libtracker-miner/meson.build
@@ -6,6 +6,8 @@ miner_enums = gnome.mkenums('tracker-miner-enum-types',
sources: 'tracker-miner-enums.h',
c_template: 'tracker-miner-enum-types.c.template',
h_template: 'tracker-miner-enum-types.h.template',
+ install_header: true,
+ install_dir: join_paths(get_option('includedir'), 'tracker-@0@'.format(tracker_api_version),
'libtracker-miner'),
)
private_sources = [
@@ -97,8 +99,3 @@ configure_file(
install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'))
install_headers(miner_headers, subdir: 'tracker-@0@/libtracker-miner'.format(tracker_api_version))
-
-# Work around https://github.com/mesonbuild/meson/issues/705
-meson.add_install_script('../install-generated-header.sh',
- join_paths(meson.current_build_dir(), 'tracker-miner-enum-types.h'),
- join_paths(get_option('prefix'), get_option('includedir'), 'tracker-@0@'.format(tracker_api_version),
'libtracker-miner'))
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index fc2b9b5..fa7d45f 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -50,7 +50,9 @@ tracker_sparql_generated_header = custom_target('tracker-sparql-generated-header
#
output: 'tracker-generated.h',
command: [join_paths(meson.current_source_dir(), 'tracker-sparql-add-include-guards.sh'),
join_paths(meson.current_build_dir(), 'tracker-generated-no-checks.h'), '@OUTPUT@'],
- depends: libtracker_sparql_intermediate_vala)
+ depends: libtracker_sparql_intermediate_vala,
+ install: true,
+ install_dir: join_paths(get_option('prefix'), get_option('includedir'),
'tracker-@0@'.format(tracker_api_version), 'libtracker-sparql'))
# Now build the C parts ...
@@ -95,12 +97,6 @@ install_headers(
'tracker-sparql.h',
subdir: 'tracker-@0@/libtracker-sparql'.format(tracker_api_version))
-# FIXME: we need a custom script to install generated Vala headers; see
-# <https://github.com/mesonbuild/meson/issues/705>.
-meson.add_install_script('../install-generated-header.sh',
- join_paths(meson.current_build_dir(), 'tracker-generated.h'),
- join_paths(get_option('prefix'), get_option('includedir'), 'tracker-@0@'.format(tracker_api_version),
'libtracker-sparql'))
-
# FIXME: we can't depend properly on the generated .vapi to do this.
custom_target('tracker-sparql-' + tracker_api_version + '.vapi',
#input: 'tracker-sparql-intermediate-vala.vapi',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]