mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
meson: use maps for udev program paths
This commit is contained in:
parent
68e101da7a
commit
0b5f1bd49e
@ -115,7 +115,7 @@ libudevd_core = static_library(
|
|||||||
link_with : udev_link_with,
|
link_with : udev_link_with,
|
||||||
dependencies : [libblkid, libkmod])
|
dependencies : [libblkid, libkmod])
|
||||||
|
|
||||||
udev_id_progs = [['ata_id/ata_id.c'],
|
udev_progs = [['ata_id/ata_id.c'],
|
||||||
['cdrom_id/cdrom_id.c'],
|
['cdrom_id/cdrom_id.c'],
|
||||||
['fido_id/fido_id.c',
|
['fido_id/fido_id.c',
|
||||||
'fido_id/fido_id_desc.c',
|
'fido_id/fido_id_desc.c',
|
||||||
@ -131,26 +131,24 @@ udev_id_progs = [['ata_id/ata_id.c'],
|
|||||||
|
|
||||||
dmi_arches = ['x86', 'x86_64', 'aarch64', 'arm', 'ia64', 'mips']
|
dmi_arches = ['x86', 'x86_64', 'aarch64', 'arm', 'ia64', 'mips']
|
||||||
if dmi_arches.contains(host_machine.cpu_family())
|
if dmi_arches.contains(host_machine.cpu_family())
|
||||||
udev_id_progs += [['dmi_memory_id/dmi_memory_id.c']]
|
udev_progs += [['dmi_memory_id/dmi_memory_id.c']]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach prog : udev_id_progs
|
udev_prog_paths = {}
|
||||||
|
foreach prog : udev_progs
|
||||||
name = prog[0].split('/')[0]
|
name = prog[0].split('/')[0]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
name,
|
name,
|
||||||
prog,
|
prog,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
dependencies : [versiondep],
|
dependencies : versiondep,
|
||||||
link_with : udev_link_with,
|
link_with : udev_link_with,
|
||||||
install_rpath : udev_rpath,
|
install_rpath : udev_rpath,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : udevlibexecdir)
|
install_dir : udevlibexecdir)
|
||||||
|
|
||||||
# TODO: let's use a dictionary instead as soon as we can depend on meson >= 0.47.
|
udev_prog_paths += {name : exe.full_path()}
|
||||||
if name == 'dmi_memory_id'
|
|
||||||
dmi_memory_id_path = exe.full_path()
|
|
||||||
endif
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if install_sysconfdir_samples
|
if install_sysconfdir_samples
|
||||||
|
@ -145,7 +145,9 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
|
|||||||
|
|
||||||
test(name,
|
test(name,
|
||||||
udev_dmi_memory_id_test,
|
udev_dmi_memory_id_test,
|
||||||
args : [dmi_memory_id_path, source, source + '.txt'])
|
args : [udev_prog_paths['dmi_memory_id'],
|
||||||
|
source,
|
||||||
|
source + '.txt'])
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user