/
githubmirror
/
kmod
Обзор
Документация
Войти
/
githubmirror
/
kmod
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
man/meson.build
59 строк
1 KB
Lucas De Marchi
meson: Add 'man' alias target
10 авг 2026, 18:44
10 авг 2026, 18:44
65ac890
Код
Авторство
О чём код?
scdoc = find_program('scdoc') _man_pages = [ ['5', 'depmod.d'], ['5', 'modprobe.d'], ['5', 'modules.dep'], ['8', 'depmod'], ['8', 'insmod'], ['8', 'kmod'], ['8', 'lsmod'], ['8', 'modinfo'], ['8', 'modprobe'], ['8', 'rmmod'], ] man_targets = [] foreach tuple : _man_pages section = tuple[0] man = tuple[1] man_targets += custom_target( f'man_@section@_@man@', command : [ build_scdoc, scdoc, 's|@SYSCONFDIR@|@0@|g;'.format(sysconfdir) + 's|@DISTCONFDIR@|@0@|g;'.format(distconfdir) + 's|@MODULE_DIRECTORY@|@0@|g;'.format(moduledir), '@INPUT@', ], input : [f'@man@.@section@.scd', files('trailer.scd')], output : f'@man@.@section@', capture : true, install : true, install_dir : get_option('mandir') / f'man@section@', ) endforeach _man_aliases = [ ['5', 'modprobe.conf', 'modprobe.d.5'], ['5', 'modules.dep.bin', 'modules.dep.5'], ] foreach tuple : _man_aliases section = tuple[0] man = tuple[1] dest = tuple[2] man_targets += custom_target( f'man_@section@_@man@', command : ['echo', f'.so @dest@'], output : f'@man@.@section@', capture : true, install : true, install_dir : get_option('mandir') / f'man@section@', ) endforeach alias_target('man', man_targets)