From 10c2668e35b11eacc0182c831f285113eeedc2b9 Mon Sep 17 00:00:00 2001 From: Dmitrii Kuvaiskii Date: Fri, 23 Jun 2023 00:25:05 -0700 Subject: [PATCH] [Meson] Remove ambiguous `prefix` variable Instead, always use non-ambiguous `get_option('prefix')`. Co-authored-by: Wojtek Porczyk Signed-off-by: Dmitrii Kuvaiskii Signed-off-by: Wojtek Porczyk --- libos/test/regression/meson.build | 2 +- meson.build | 1 - tools/meson.build | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libos/test/regression/meson.build b/libos/test/regression/meson.build index c2a79f4958..19ad0218d7 100644 --- a/libos/test/regression/meson.build +++ b/libos/test/regression/meson.build @@ -310,7 +310,7 @@ endforeach if get_option('libc') == 'musl' meson.add_install_script( find_program('install_musl_tests.sh'), - prefix / install_dir / 'musl', + get_option('prefix') / install_dir / 'musl', musl_execs, ) endif diff --git a/meson.build b/meson.build index 1a1c86a11d..7b9e97a32f 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,6 @@ project( # we need this subdir() early, because we need scripts defined there for setting up global vars subdir('scripts') -prefix = get_option('prefix') pkglibdir = get_option('libdir') / meson.project_name() pkgdatadir = get_option('datadir') / meson.project_name() diff --git a/tools/meson.build b/tools/meson.build index e27d79079f..2ca5497c0c 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,10 +1,10 @@ conf = configuration_data() conf.set_quoted('IN_GIT', '') -conf.set_quoted('PREFIX', prefix) +conf.set_quoted('PREFIX', get_option('prefix')) conf.set_quoted('BINDIR', get_option('bindir')) if direct - hostpalpath_direct = prefix / pkglibdir / 'direct' + hostpalpath_direct = get_option('prefix') / pkglibdir / 'direct' conf_gramine_direct = configuration_data() conf_gramine_direct.merge_from(conf) conf_gramine_direct.set('SGX', 0) @@ -24,13 +24,13 @@ endif if sgx subdir('sgx') - hostpalpath_linux_sgx = prefix / pkglibdir / 'sgx' + hostpalpath_linux_sgx = get_option('prefix') / pkglibdir / 'sgx' conf_gramine_sgx = configuration_data() conf_gramine_sgx.merge_from(conf) conf_gramine_sgx.set('SGX', 1) conf_gramine_sgx.set_quoted('HOST_PAL_PATH', hostpalpath_linux_sgx) conf_gramine_sgx.set_quoted('LIBPAL_PATH', hostpalpath_linux_sgx / 'libpal.so') - conf_gramine_sgx.set_quoted('PAL_CMD', prefix / pkglibdir / 'sgx' / 'loader') + conf_gramine_sgx.set_quoted('PAL_CMD', get_option('prefix') / pkglibdir / 'sgx' / 'loader') conf_gramine_sgx.set_quoted('CONFIG_SGX_DRIVER', sgx_driver) configure_file(