* mingw: Use a better method to find where mingw directory lives.
This commit is contained in:
parent
9401a0f805
commit
12c819e204
|
@ -1,3 +1,7 @@
|
|||
2008-10-11 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* mingw: Use a better method to find where mingw directory lives.
|
||||
|
||||
2008-10-11 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* mingw: New front-end script to control building of MinGW files
|
||||
|
|
|
@ -6,18 +6,12 @@
|
|||
# Find the path to the compiler.
|
||||
#
|
||||
compiler=$1; shift
|
||||
case "$compiler" in
|
||||
*/*) ;;
|
||||
*) compiler=($(type "$compiler"))
|
||||
compiler=${compiler[2]} ;;
|
||||
esac
|
||||
dir=$(cd $(dirname $("$compiler" -print-prog-name=ld))/../..; pwd)
|
||||
|
||||
#
|
||||
# The mingw32 directory should live somewhere close by to the
|
||||
# compiler. Search for it.
|
||||
#
|
||||
updir=$(dirname "$compiler")
|
||||
dir=$(cd "$updir"/..; pwd)
|
||||
[ "$dir" = '/' ] && dir=''
|
||||
mingw_dir=''
|
||||
for d in "$dir"/*-mingw32 "$dir"/usr/*-mingw32 "$dir"/*-mingw* "$dir"/usr/*-mingw*; do
|
||||
|
|
Loading…
Reference in New Issue