提交 0c196fd4 编写于 作者: B Brian Anderson

configure: Fix CDPATH bug

上级 93b7b411
......@@ -337,6 +337,15 @@ to_gnu_triple() {
esac
}
# Prints the absolute path of a directory to stdout
abs_path() {
local _path="$1"
# Unset CDPATH because it causes havok: it makes the destination unpredictable
# and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null
# for good measure.
(unset CDPATH && cd "$_path" > /dev/null && pwd)
}
msg "looking for configure programs"
need_cmd cmp
need_cmd mkdir
......@@ -509,7 +518,7 @@ fi
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
CFG_SRC_DIR="$(abs_path $(dirname $0))/"
CFG_BUILD_DIR="$(pwd)/"
CFG_SELF="$0"
CFG_CONFIGURE_ARGS="$@"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册