Skip to content

Commit

Permalink
[Meson] Remove ambiguous prefix variable
Browse files Browse the repository at this point in the history
Instead, always use non-ambiguous `get_option('prefix')`.

Co-authored-by: Wojtek Porczyk <woju@invisiblethingslab.com>
Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
  • Loading branch information
Dmitrii Kuvaiskii and woju committed Aug 30, 2023
1 parent 02f7a85 commit 10c2668
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libos/test/regression/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 4 additions & 4 deletions tools/meson.build
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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(
Expand Down

0 comments on commit 10c2668

Please sign in to comment.