56a18d2a15
The subsequent commit will touch the POSIX shell implementation, and
hence ShellCheck needs to be run on it.
As long as the POSIX shell implementation is part of the Git repository,
ShellCheck needs to keep running on it, unless it causes some serious
problems. The ShellCheck test is very fast, and the reassurance and
mental peace that it provides is invaluable.
This reverts commit 8c1d441916
.
https://github.com/containers/toolbox/pull/1094
77 lines
2 KiB
Meson
77 lines
2 KiB
Meson
project(
|
|
'toolbox',
|
|
'c',
|
|
version: '0.0.99.3',
|
|
license: 'ASL 2.0',
|
|
meson_version: '>= 0.58.0',
|
|
)
|
|
|
|
fs = import('fs')
|
|
|
|
cc = meson.get_compiler('c')
|
|
if not cc.has_argument('-print-file-name=libc.so')
|
|
error('C compiler does not support the -print-file-name argument.')
|
|
endif
|
|
|
|
go = find_program('go')
|
|
go_md2man = find_program('go-md2man')
|
|
shellcheck = find_program('shellcheck', required: false)
|
|
skopeo = find_program('skopeo', required: false)
|
|
|
|
bash_completion = dependency('bash-completion', required: false)
|
|
fish = dependency('fish', required: false)
|
|
|
|
migration_path_for_coreos_toolbox = get_option('migration_path_for_coreos_toolbox')
|
|
profiledir = get_option('profile_dir')
|
|
|
|
tmpfilesdir = get_option('tmpfiles_dir')
|
|
if tmpfilesdir == '' or not fs.exists('/run/.containerenv')
|
|
systemd_dep = dependency('systemd')
|
|
|
|
if tmpfilesdir == ''
|
|
tmpfilesdir = systemd_dep.get_variable(pkgconfig: 'tmpfilesdir')
|
|
endif
|
|
endif
|
|
|
|
toolbox = files('toolbox')
|
|
|
|
if shellcheck.found()
|
|
test('shellcheck', shellcheck, args: [toolbox])
|
|
endif
|
|
|
|
if not skopeo.found()
|
|
message('Running system tests requires Skopeo for OCI image manipulation.')
|
|
endif
|
|
|
|
install_subdir(
|
|
'test',
|
|
install_dir: join_paths(get_option('datadir'), meson.project_name()),
|
|
exclude_files: [
|
|
'system/libs/bats-assert/.git',
|
|
'system/libs/bats-assert/.gitignore',
|
|
'system/libs/bats-assert/.travis.yml',
|
|
'system/libs/bats-assert/package.json',
|
|
'system/libs/bats-support/.git',
|
|
'system/libs/bats-support/.gitignore',
|
|
'system/libs/bats-support/.travis.yml',
|
|
'system/libs/bats-support/package.json'
|
|
],
|
|
exclude_directories: [
|
|
'system/libs/bats-assert/.git',
|
|
'system/libs/bats-assert/script',
|
|
'system/libs/bats-assert/test',
|
|
'system/libs/bats-support/.git',
|
|
'system/libs/bats-support/script',
|
|
'system/libs/bats-support/test'
|
|
]
|
|
)
|
|
|
|
subdir('data')
|
|
subdir('doc')
|
|
subdir('profile.d')
|
|
subdir('src')
|
|
if get_option('install_completions')
|
|
subdir('completion')
|
|
endif
|
|
|
|
meson.add_install_script('meson_post_install.py')
|