diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-10-06 23:04:31 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-10-06 23:04:31 +0000 |
commit | 7433f843e78d98f63ea0d94e88e3861b36da8000 (patch) | |
tree | 1022ce0948a57cba89dce9c89c885285c12e512f | |
parent | 20fb47ec778abe215ca69692434ff753596319e6 (diff) | |
download | rockbox-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-x | tools/configure | 23 |
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 |
2150 | fi | 2154 | fi |
2151 | 2155 | ||
2156 | # figure out the full path to the various commands if possible | ||
2157 | HOSTCC=`findtool gcc --lit` | ||
2158 | HOSTAR=`findtool ar --lit` | ||
2159 | CC=`findtool ${CC} --lit` | ||
2160 | LD=`findtool ${AR} --lit` | ||
2161 | AR=`findtool ${AR} --lit` | ||
2162 | AS=`findtool ${AS} --lit` | ||
2163 | OC=`findtool ${OC} --lit` | ||
2164 | WINDRES=`findtool ${WINDRES} --lit` | ||
2165 | DLLTOOL=`findtool ${DLLTOOL} --lit` | ||
2166 | DLLWRAP=`findtool ${DLLWRAP} --lit` | ||
2167 | RANLIB=`findtool ${RANLIB} --lit` | ||
2168 | |||
2152 | if test -n "$ccache"; then | 2169 | if test -n "$ccache"; then |
2153 | CC="$ccache $CC" | 2170 | CC="$ccache $CC" |
2154 | fi | 2171 | fi |
@@ -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@ | |||
2315 | export ENABLEDPLUGINS=@PLUGINS@ | 2334 | export ENABLEDPLUGINS=@PLUGINS@ |
2316 | export SOFTWARECODECS=@CODECS@ | 2335 | export SOFTWARECODECS=@CODECS@ |
2317 | export EXTRA_DEFINES=@EXTRADEF@ | 2336 | export EXTRA_DEFINES=@EXTRADEF@ |
2318 | export HOSTCC=gcc | 2337 | export HOSTCC=@HOSTCC@ |
2319 | export HOSTAR=ar | 2338 | export HOSTAR=@HOSTAR@ |
2320 | export CC=@CC@ | 2339 | export CC=@CC@ |
2321 | export LD=@LD@ | 2340 | export LD=@LD@ |
2322 | export AR=@AR@ | 2341 | export AR=@AR@ |