configure: Treat ~ literal in long options as user's $HOME
Also, fix the way how fio's src dir is looked up and make sure check_dir() is called before resolving the path. Fixes issue #2487 Signed-off-by: Michal Berger <michallinuxstuff@gmail.com> Change-Id: Ifb418abf8c51fdb469a3ba52c77c71c56d708142 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12388 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
1e6db5fb89
commit
11a5716da3
6
configure
vendored
6
configure
vendored
@ -128,6 +128,9 @@ declare -A CONFIG
|
||||
source $rootdir/CONFIG.sh
|
||||
rm $rootdir/CONFIG.sh
|
||||
|
||||
# Try to expand literal ~ that might have been passed as an option via --long-opt=~/dir.
|
||||
set -- "${@//\~/~}"
|
||||
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
--cross-prefix=*)
|
||||
@ -535,9 +538,10 @@ for i in "$@"; do
|
||||
--with-fio) ;&
|
||||
--with-fio=*)
|
||||
if [[ ${i#*=} != "$i" ]]; then
|
||||
CONFIG[FIO_SOURCE_DIR]=$(readlink -f "${i#*=}")
|
||||
CONFIG[FIO_SOURCE_DIR]=${i#*=}
|
||||
fi
|
||||
check_dir "--with-fio=${CONFIG[FIO_SOURCE_DIR]}"
|
||||
CONFIG[FIO_SOURCE_DIR]=$(readlink -f "${CONFIG[FIO_SOURCE_DIR]}")
|
||||
CONFIG[FIO_PLUGIN]=y
|
||||
;;
|
||||
--without-fio)
|
||||
|
Loading…
Reference in New Issue
Block a user