mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 18:56:31 +00:00
./configure: fix the tools pattern recognition
- when a variable name was given, with no regexp, the pattern did not correctly extract the variable name /trunk/configure | 11 8 3 0 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
This commit is contained in:
parent
1007fb528d
commit
f685a014e7
11
configure
vendored
11
configure
vendored
@ -84,7 +84,7 @@ has_or_abort() {
|
|||||||
local tool_pattern
|
local tool_pattern
|
||||||
local field
|
local field
|
||||||
|
|
||||||
var_name="$( echo "${1}" |"${sed}" -r -e 's/^((([^=:]+):.+|[^:=]+)=.+|[^:=]+)$/\3/;' )"
|
var_name="$( echo "${1}" |"${sed}" -r -e 's/^(([^=:]+):.+|[^:=]+=.+|[^:=]+)$/\2/;' )"
|
||||||
field="${var_name:+2}"
|
field="${var_name:+2}"
|
||||||
field="${field:-1}"
|
field="${field:-1}"
|
||||||
tool_pattern="$( echo "${1}" |cut -d : -f ${field}- |"${sed}" -r -e 's/ *\|\| */\n/g;' )"
|
tool_pattern="$( echo "${1}" |cut -d : -f ${field}- |"${sed}" -r -e 's/ *\|\| */\n/g;' )"
|
||||||
@ -139,10 +139,15 @@ has_or_abort() {
|
|||||||
regexp=
|
regexp=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo " could not find '${tool}' matching regexp '${regexp}'"
|
printf " could not find '${tool}'"
|
||||||
|
[ -n "${regexp}" ] && printf " matching regexp '${regexp}'"
|
||||||
|
echo
|
||||||
done
|
done
|
||||||
echo "Either you are missing entirely the needed tool,"
|
echo "Either you are missing entirely the needed tool,"
|
||||||
echo "or the version you have is tool old."
|
echo "or the version you have is tool old."
|
||||||
|
if [ -n "${var_name}" ]; then
|
||||||
|
echo "You can give the path to this tool using: --with-${var_name}=PATH"
|
||||||
|
fi
|
||||||
# FORCE can be set in the environment
|
# FORCE can be set in the environment
|
||||||
[ -z "${FORCE}" ] && do_error "Bailing out..."
|
[ -z "${FORCE}" ] && do_error "Bailing out..."
|
||||||
else
|
else
|
||||||
@ -369,7 +374,7 @@ printf "Building up Makefile... "
|
|||||||
var_list="grep
|
var_list="grep
|
||||||
sed
|
sed
|
||||||
$( printf "${TOOLS_TO_CHECK}" \
|
$( printf "${TOOLS_TO_CHECK}" \
|
||||||
|"${sed}" -r -e 's/^((([^=:]+):.+|[^:=]+)=.+|[^:=]+)$/\3/;'
|
|"${sed}" -r -e 's/^(([^=:]+):.+|[^:=]+=.+|[^:=]+)$/\2/;'
|
||||||
)"
|
)"
|
||||||
var_sed="$( for var_name in ${var_list}; do
|
var_sed="$( for var_name in ${var_list}; do
|
||||||
eval echo 's,@@${var_name}@@,${'"${var_name}"'},g'
|
eval echo 's,@@${var_name}@@,${'"${var_name}"'},g'
|
||||||
|
Loading…
Reference in New Issue
Block a user