toolbox/meson.build
Debarshi Ray 04426a04e5 build: Add an option for the migration path for coreos/toolbox users
Commit 6c86cabbe5 changed the command line interface to behave
a lot similar to that of github.com/coreos/toolbox, which makes things
easier for those switching over from it.

However, it makes things confusing for the vast majority of users who
have never used coreos/toolbox. The Toolbox CLI aims to be friendly to
new users by being self-documenting and offering a smooth onboarding
experience. It's jarring to new users when 'toolbox', without any
commands specified, suggests that it needs to perform a big download.

It's difficult to document two different sets of CLIs, and if the
manuals don't mention the second behaviour, then it just leaves the
users even more confused.

Hence, it will be good to keep the migration path for coreos/toolbox
behind a build-time option, so that only those OS distributors who
truly need it may enable it without impacting others. Fortunately,
coreos/toolbox doesn't have any manuals, which means that there's no
need to conditionalize the documentation.

This commit merely adds the build-time option. Subsequent commits will
use this to actually conditionalize the code.

https://github.com/containers/toolbox/pull/951
2021-12-10 00:35:13 +01:00

64 lines
1.7 KiB
Meson

project(
'toolbox',
'c',
version: '0.0.99.2',
license: 'ASL 2.0',
meson_version: '>= 0.58.0',
)
cc = meson.get_compiler('c')
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)
migration_path_for_coreos_toolbox = get_option('migration_path_for_coreos_toolbox')
profiledir = get_option('profile_dir')
tmpfilesdir = get_option('tmpfiles_dir')
if tmpfilesdir == ''
systemd_dep = dependency('systemd')
tmpfilesdir = systemd_dep.get_variable(pkgconfig: 'tmpfilesdir')
endif
if bash_completion.found()
install_data(
'completion/bash/toolbox',
install_dir: bash_completion.get_variable(pkgconfig: 'completionsdir')
)
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')