From 646ed5af0013accacac1f4ac048371bebec52f60 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Wed, 3 Jul 2024 23:18:41 -0700 Subject: [PATCH] src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build The GIT_VERSION is changed to use VERSION_TAG, but in case of cross build for src/boot/efi, it's not set, causing build error because the compiler cannot know it's a macro thus treating it as some variable and error out. Signed-off-by: Chen Qi --- src/boot/efi/meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index f916b6a441c..e620cc1b18a 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -63,13 +63,14 @@ foreach ctype : ['color-normal', 'color-entry', 'color-highlight', 'color-edit'] 'EFI_' + c[1].strip().underscorify().to_upper())) endforeach +efi_conf.set_quoted('PROJECT_VERSION', meson.project_version().split('~')[0]) +efi_conf.set_quoted('VERSION_TAG', version_tag) +efi_conf.set('PROJECT_URL', conf.get('PROJECT_URL')) + if meson.is_cross_build() and get_option('sbat-distro') == 'auto' warning('Auto detection of SBAT information not supported when cross-building, disabling SBAT.') elif get_option('sbat-distro') != '' efi_conf.set_quoted('SBAT_PROJECT', meson.project_name()) - efi_conf.set_quoted('PROJECT_VERSION', meson.project_version().split('~')[0]) - efi_conf.set_quoted('VERSION_TAG', version_tag) - efi_conf.set('PROJECT_URL', conf.get('PROJECT_URL')) if get_option('sbat-distro-generation') < 1 error('SBAT Distro Generation must be a positive integer') endif -- 2.47.3