]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build
authorChen Qi <Qi.Chen@windriver.com>
Thu, 4 Jul 2024 06:18:41 +0000 (23:18 -0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 4 Jul 2024 10:42:35 +0000 (12:42 +0200)
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 <Qi.Chen@windriver.com>
src/boot/efi/meson.build

index f916b6a441c2f863ea02796fe9e07e3b9b45bffb..e620cc1b18a2db938ed5b710da933fe7a4c6ba24 100644 (file)
@@ -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