]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Use same name format for efi binary intermediates
authorJan Janssen <medhefgo@web.de>
Wed, 26 Jan 2022 09:20:46 +0000 (10:20 +0100)
committerJan Janssen <medhefgo@web.de>
Wed, 26 Jan 2022 13:40:55 +0000 (14:40 +0100)
src/boot/efi/meson.build
tools/debug-sd-boot.sh

index 20b0c4bf7c0dea74dc8b9c2fb191fc25f38889f2..84021c3f3600b6aa4aebc2d13276c2c7a4a730ef 100644 (file)
@@ -397,16 +397,12 @@ foreach file : fundamental_source_paths + common_sources + systemd_boot_sources
         endif
 endforeach
 
-systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(efi_arch[0])
-stub_elf_name = 'linux@0@.elf.stub'.format(efi_arch[0])
-stub_efi_name = 'linux@0@.efi.stub'.format(efi_arch[0])
-
-foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, false],
-                 [stub_elf_name, stub_efi_name, stub_objects, true]]
-        so = custom_target(
-                tuple[0],
-                input : tuple[2],
-                output : tuple[0],
+foreach tuple : [['systemd-boot@0@.@1@', systemd_boot_objects, false],
+                 ['linux@0@.@1@.stub', stub_objects, true]]
+        elf = custom_target(
+                tuple[0].format(efi_arch[0], 'elf'),
+                input : tuple[1],
+                output : tuple[0].format(efi_arch[0], 'elf'),
                 command : [cc.cmd_array(),
                            '-o', '@OUTPUT@',
                            efi_cflags,
@@ -415,13 +411,13 @@ foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects
                            '-lefi',
                            '-lgnuefi',
                            '-lgcc'],
-                install : tuple[3],
+                install : tuple[2],
                 install_dir : bootlibdir)
 
         custom_target(
-                tuple[1],
-                input : so,
-                output : tuple[1],
+                tuple[0].format(efi_arch[0], 'efi'),
+                input : elf,
+                output : tuple[0].format(efi_arch[0], 'efi'),
                 command : [objcopy,
                            '-j', '.bss*',
                            '-j', '.data',
index 816eead22df8b0e9ca92f5afa38193d696fc37ec..1bd2cc406db168226f217992c91861ed3e4bcf14 100755 (executable)
@@ -32,10 +32,10 @@ fi
 binary=$(realpath "${1}")
 if [[ "${1}" =~ systemd-boot([[:alnum:]]+).efi ]]; then
     target="systemd-boot"
-    symbols=$(realpath "$(dirname "${1}")/systemd_boot.so")
+    symbols=$(realpath "${1%efi}elf")
 elif [[ "${1}" =~ linux([[:alnum:]]+).efi.stub ]]; then
     target="systemd-stub"
-    symbols=$(realpath "$(dirname "${1}")/linux${BASH_REMATCH[1]}.elf.stub")
+    symbols=$(realpath "${1%efi.stub}elf.stub")
 else
     echo "Cannot detect EFI binary '${1}'."
     exit 1