From 18f4f305fdd7e14c8941658a29c7b85c27d41de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 11 Nov 2024 15:07:12 +0400 Subject: [PATCH] build: fix -Dtools=false build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When configuring the project, meson fails with: tests/meson.build:107:27: ERROR: Unknown variable "util_dep" Declare the util_dep dependency regardless if 'tools' are enabled, so tests can be built with it. Fixes: bdc5c8793a1 ("meson: allow disabling tests") Signed-off-by: Marc-André Lureau Signed-off-by: David Gibson --- meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 310699f..6dbf633 100644 --- a/meson.build +++ b/meson.build @@ -61,16 +61,16 @@ version_gen_h = vcs_tag( subdir('libfdt') dtc_tools = [] +util_dep = declare_dependency( + sources: ['util.c', version_gen_h], + include_directories: '.', + dependencies: libfdt_dep +) + if get_option('tools') flex = find_program('flex', required: true) bison = find_program('bison', required: true) - util_dep = declare_dependency( - sources: ['util.c', version_gen_h], - include_directories: '.', - dependencies: libfdt_dep - ) - lgen = generator( flex, output: '@PLAINNAME@.lex.c',