[recipes/recipes-1.0] Fix dependencies for generated sources
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/recipes-1.0] Fix dependencies for generated sources
- Date: Tue, 11 Apr 2017 01:47:04 +0000 (UTC)
commit 587430342cd17e908c5be7baeaac6a9d3266012c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 10 21:44:11 2017 -0400
Fix dependencies for generated sources
This patch was suggested by Tim-Philipp Müller,
and seems to work in a quick test.
src/meson.build | 12 ++++++++----
tests/meson.build | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index f4fe823..ce5c2ac 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,7 @@
gnome = import('gnome')
src = []
+src_incs = []
enums = []
# These generated files are #included
@@ -8,11 +9,14 @@ list_to_c = find_program('list_to_c.py')
foreach f : ['segments', 'ingredients']
ofile = f + '.inc'
ifile = files('../data/' + f + '.list')
- src += [custom_target(f,
- output : ofile,
- input : ifile,
- command : [list_to_c, '@INPUT@', '@OUTPUT@', ''])]
+ src_incs += [custom_target(f,
+ output : ofile,
+ input : ifile,
+ command : [list_to_c, '@INPUT@', '@OUTPUT@', ''])]
endforeach
+
+src += src_incs
+
ofile = 'no-ingredients.inc'
ifile = files('../data/ingredients.list')
src += [custom_target('no-ingredients',
diff --git a/tests/meson.build b/tests/meson.build
index b484f6e..4da7f76 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -7,7 +7,7 @@ env.set('MALLOC_CHECK_', '2')
# FIXME: Add a meson helper to get a random number
env.set('MALLOC_PERTURB_', '113') # Guaranteed random!
-ingredients = executable('ingredients', 'ingredients-test.c',
+ingredients = executable('ingredients', 'ingredients-test.c', src_incs,
include_directories : tests_inc,
dependencies: deps)
test('ingredients', ingredients, env : env)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]