mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 23:21:22 +03:00
meson: rework test-efi-disk.img creation to not require variables
The primary goal is to make the name of the custom_target() rule match the output file again. Having them different is confusing.
This commit is contained in:
parent
36c5f589fb
commit
4f3dca78bb
@ -259,24 +259,19 @@ if have_gnu_efi
|
||||
stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
|
||||
no_undefined_symbols = find_program('no-undefined-symbols.sh')
|
||||
|
||||
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, 'systemd_boot.so', false],
|
||||
['stub.so', stub_efi_name, stub_objects, stub_elf_name, true]]
|
||||
efi_stubs = []
|
||||
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[3],
|
||||
command : [efi_ld, '-o', '@OUTPUT@'] +
|
||||
efi_ldflags + tuple[2] +
|
||||
['-lefi', '-lgnuefi', libgcc_file_name],
|
||||
install : tuple[4],
|
||||
output : tuple[0],
|
||||
command : [efi_ld, '-o', '@OUTPUT@',
|
||||
efi_ldflags, tuple[2],
|
||||
'-lefi', '-lgnuefi', libgcc_file_name],
|
||||
install : tuple[3],
|
||||
install_dir : bootlibdir)
|
||||
|
||||
if want_tests != 'false'
|
||||
test('no-undefined-symbols-' + tuple[0],
|
||||
no_undefined_symbols,
|
||||
args : [so])
|
||||
endif
|
||||
|
||||
stub = custom_target(
|
||||
tuple[1],
|
||||
input : so,
|
||||
@ -288,22 +283,26 @@ if have_gnu_efi
|
||||
'-j', '.data',
|
||||
'-j', '.dynamic',
|
||||
'-j', '.dynsym',
|
||||
'-j', '.rel*']
|
||||
+ efi_format +
|
||||
['@INPUT@', '@OUTPUT@'],
|
||||
'-j', '.rel*',
|
||||
efi_format,
|
||||
'@INPUT@', '@OUTPUT@'],
|
||||
install : true,
|
||||
install_dir : bootlibdir)
|
||||
|
||||
set_variable(tuple[0].underscorify(), so)
|
||||
set_variable(tuple[0].underscorify() + '_stub', stub)
|
||||
efi_stubs += [[so, stub]]
|
||||
|
||||
if want_tests != 'false'
|
||||
test('no-undefined-symbols-' + tuple[0],
|
||||
no_undefined_symbols,
|
||||
args : so)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
############################################################
|
||||
|
||||
test_efi_disk_img = custom_target(
|
||||
'test-efi-disk.img',
|
||||
input : [systemd_boot_so, stub_so_stub],
|
||||
input : [efi_stubs[0][0], efi_stubs[1][1]],
|
||||
output : 'test-efi-disk.img',
|
||||
command : [test_efi_create_disk_sh, '@OUTPUT@',
|
||||
'@INPUT0@', '@INPUT1@', splash_bmp])
|
||||
command : [test_efi_create_disk_sh, '@OUTPUT@','@INPUT@', splash_bmp])
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user