From: Chen Qi Date: Thu, 4 Jul 2024 06:18:41 +0000 (-0700) Subject: src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build X-Git-Tag: v257-rc1~970 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=646ed5af0013accacac1f4ac048371bebec52f60;p=thirdparty%2Fsystemd.git 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 --- 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