meson: download full syscall tables from hrw/syscalls-table

The target is renamed to 'update-syscall-tables'. (Other targets
with similar names will be added later.)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-01-15 11:43:47 +01:00
parent e363b0e4fc
commit 9a6da617db
6 changed files with 47 additions and 24 deletions

View file

@ -1617,6 +1617,16 @@ includes = include_directories('src/basic',
add_project_arguments('-include', 'config.h', language : 'c')
generate_gperfs = find_program('tools/generate-gperfs.py')
autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
hwdb_update_sh = find_program('tools/hwdb-update.sh')
make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-index.py')
syscall_table_update_sh = find_program('tools/syscall-table-update.sh')
xml_helper_py = find_program('tools/xml_helper.py')
update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
############################################################
subdir('po')
subdir('catalog')
@ -1685,17 +1695,6 @@ install_libsystemd_static = static_library(
############################################################
autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
hwdb_update_sh = find_program('tools/hwdb-update.sh')
make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-index.py')
syscall_names_update_sh = find_program('tools/syscall-names-update.sh')
xml_helper_py = find_program('tools/xml_helper.py')
update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
############################################################
# binaries that have --help and are intended for use by humans,
# usually, but not always, installed in /bin.
public_programs = []

View file

@ -356,3 +356,29 @@ libbasic_gcrypt = static_library(
include_directories : includes,
dependencies : [libgcrypt],
c_args : ['-fvisibility=default'])
############################################################
arch_list = [
'alpha',
'arc',
'arm',
'arm64',
'i386',
'ia64',
'm68k',
'mips64',
'mips64n32',
'mipso32',
'powerpc',
'powerpc64',
's390',
's390x',
'sparc',
'x86_64']
run_target(
'update-syscall-tables',
command : [syscall_table_update_sh, meson.current_source_dir()] + arch_list)
syscall_names_text = files('syscall-names.text')

View file

@ -283,7 +283,7 @@ generate_syscall_list = find_program('generate-syscall-list.py')
fname = 'syscall-list.h'
syscall_list_h = custom_target(
fname,
input : 'syscall-names.text',
input : syscall_names_text,
output : fname,
command : [generate_syscall_list,
'@INPUT@'],
@ -405,9 +405,3 @@ libshared = shared_library(
dependencies : libshared_deps,
install : true,
install_dir : rootlibexecdir)
############################################################
run_target(
'syscall-names-update',
command : [syscall_names_update_sh, meson.current_source_dir()])

View file

@ -1,6 +0,0 @@
#!/bin/sh
set -eu
cd "$1"
curl -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'

10
tools/syscall-table-update.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -eu
cd "$1" && shift
curl -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'
for arch in "$@"; do
curl -L -o syscalls-$arch "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch"
done