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,
'-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