summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-10-06 23:04:31 +0000
committerJens Arnold <amiconn@rockbox.org>2008-10-06 23:04:31 +0000
commit7433f843e78d98f63ea0d94e88e3861b36da8000 (patch)
tree1022ce0948a57cba89dce9c89c885285c12e512f
parent20fb47ec778abe215ca69692434ff753596319e6 (diff)
downloadrockbox-7433f843e78d98f63ea0d94e88e3861b36da8000.tar.gz
rockbox-7433f843e78d98f63ea0d94e88e3861b36da8000.zip
Let 'configure' figure out the full path to the various tools if possible. This has the advantage that the toolchain doesn't need to be in the path at build time if it was in the path at configure time, and at the same time it speeds up the build (to a varying degree - most noticeable on Cygwin and Interix).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18723 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/configure23
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure
index 8ce44b0c39..a3497ace6d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -64,6 +64,10 @@ findtool(){
64 return 64 return
65 fi 65 fi
66 done 66 done
67 # check whether caller wants literal return value if not found
68 if [ "$2" = "--lit" ]; then
69 echo "$file"
70 fi
67} 71}
68 72
69# parse the argument list, returns the value after the = in case of a 73# parse the argument list, returns the value after the = in case of a
@@ -2149,6 +2153,19 @@ else
2149 fi 2153 fi
2150fi 2154fi
2151 2155
2156# figure out the full path to the various commands if possible
2157HOSTCC=`findtool gcc --lit`
2158HOSTAR=`findtool ar --lit`
2159CC=`findtool ${CC} --lit`
2160LD=`findtool ${AR} --lit`
2161AR=`findtool ${AR} --lit`
2162AS=`findtool ${AS} --lit`
2163OC=`findtool ${OC} --lit`
2164WINDRES=`findtool ${WINDRES} --lit`
2165DLLTOOL=`findtool ${DLLTOOL} --lit`
2166DLLWRAP=`findtool ${DLLWRAP} --lit`
2167RANLIB=`findtool ${RANLIB} --lit`
2168
2152if test -n "$ccache"; then 2169if test -n "$ccache"; then
2153 CC="$ccache $CC" 2170 CC="$ccache $CC"
2154fi 2171fi
@@ -2222,6 +2239,8 @@ sed > Makefile \
2222 -e "s,@LANGUAGE@,${language},g" \ 2239 -e "s,@LANGUAGE@,${language},g" \
2223 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \ 2240 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2224 -e "s,@PWD@,${pwd},g" \ 2241 -e "s,@PWD@,${pwd},g" \
2242 -e "s,@HOSTCC@,${HOSTCC},g" \
2243 -e "s,@HOSTAR@,${HOSTAR},g" \
2225 -e "s,@CC@,${CC},g" \ 2244 -e "s,@CC@,${CC},g" \
2226 -e "s,@LD@,${LD},g" \ 2245 -e "s,@LD@,${LD},g" \
2227 -e "s,@AR@,${AR},g" \ 2246 -e "s,@AR@,${AR},g" \
@@ -2315,8 +2334,8 @@ export APPEXTRA=@APPEXTRA@
2315export ENABLEDPLUGINS=@PLUGINS@ 2334export ENABLEDPLUGINS=@PLUGINS@
2316export SOFTWARECODECS=@CODECS@ 2335export SOFTWARECODECS=@CODECS@
2317export EXTRA_DEFINES=@EXTRADEF@ 2336export EXTRA_DEFINES=@EXTRADEF@
2318export HOSTCC=gcc 2337export HOSTCC=@HOSTCC@
2319export HOSTAR=ar 2338export HOSTAR=@HOSTAR@
2320export CC=@CC@ 2339export CC=@CC@
2321export LD=@LD@ 2340export LD=@LD@
2322export AR=@AR@ 2341export AR=@AR@