* mingw: Use a better method to find where mingw directory lives.

This commit is contained in:
Christopher Faylor 2008-10-12 03:20:37 +00:00
parent 9401a0f805
commit 12c819e204
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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