cc-wrapper: Don't leave CMD defined after setup hook

Rename to `cmd` too, as uppercase typically means the variable is
exported.
This commit is contained in:
John Ericson 2017-11-28 15:03:50 -05:00
parent 43e00f7d18
commit 994cb76850
1 changed files with 4 additions and 4 deletions

View File

@ -138,15 +138,15 @@ export NIX_${role}CC=@out@
export ${role}CC=@named_cc@ export ${role}CC=@named_cc@
export ${role}CXX=@named_cxx@ export ${role}CXX=@named_cxx@
for CMD in \ for cmd in \
ar as nm objcopy ranlib strip strings size ld windres ar as nm objcopy ranlib strip strings size ld windres
do do
if if
PATH=$_PATH type -p "@targetPrefix@$CMD" > /dev/null PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
then then
export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@targetPrefix@${CMD}"; export "${role}$(echo "$cmd" | tr "[:lower:]" "[:upper:]")=@targetPrefix@${cmd}";
fi fi
done done
# No local scope in sourced file # No local scope in sourced file
unset role unset -v role cmd