summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-04-22 22:18:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-04-22 22:18:57 +0000
commit31e0cd67ff903bd2ea592dfeb9b2119ad556f03c (patch)
treedebd8a97f2c12e8306fe1f53f3784c1954ffe149
parent722216834b53250ce6175df6d0cd7794d15bd355 (diff)
downloadrockbox-31e0cd67ff903bd2ea592dfeb9b2119ad556f03c.tar.gz
rockbox-31e0cd67ff903bd2ea592dfeb9b2119ad556f03c.zip
made the script detect the toolsdir and pass that on to the sub-makefiles
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3579 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/configure42
1 files changed, 40 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure
index e3f678a95c..99f1d7dbf6 100755
--- a/tools/configure
+++ b/tools/configure
@@ -375,6 +375,42 @@ if [ -z "$appsdir" ]; then
375 appsdir=`input` 375 appsdir=`input`
376fi 376fi
377 377
378##################################################################
379# Figure out where the tools directory is!
380#
381
382toolsfile="descramble.c" # a file to check for in the tools root dir
383
384for dir in tools . .. ../tools ../../tools $firmdir/tools $firmdir/../tools; do
385 if [ -f $dir/$toolsfile ]; then
386 toolsdir="$dir"
387 break
388 fi
389done
390
391if [ -z "$toolsdir" ]; then
392 # no file found, check if (some of) the necessary tools are in the PATH
393 # already
394
395 toolsexe="scramble"
396
397 for dir in `echo $PATH | tr ':' ' '`; do
398 if [ -x "$dir/$toolsexe" ]; then
399 echo "found $toolsexe in $dir"
400 toolsdir="$dir"
401 break
402 fi
403 done
404
405fi
406
407if [ -z "$toolsdir" ]; then
408 echo "This script couldn't find your tools directory. Please enter the"
409 echo "full path to the tools directory here:"
410
411 toolsdir=`input`
412fi
413
378if [ -z "$language" ]; then 414if [ -z "$language" ]; then
379 415
380 echo "Select a number for the language to use (default is english)" 416 echo "Select a number for the language to use (default is english)"
@@ -398,6 +434,7 @@ fi
398sed > Makefile \ 434sed > Makefile \
399 -e "s,@FIRMDIR@,${firmdir},g" \ 435 -e "s,@FIRMDIR@,${firmdir},g" \
400 -e "s,@APPSDIR@,${appsdir},g" \ 436 -e "s,@APPSDIR@,${appsdir},g" \
437 -e "s,@TOOLSDIR@,${toolsdir},g" \
401 -e "s,@DEBUG@,${debug},g" \ 438 -e "s,@DEBUG@,${debug},g" \
402 -e "s,@MEMORY@,${memory},g" \ 439 -e "s,@MEMORY@,${memory},g" \
403 -e "s,@TARGET@,${target},g" \ 440 -e "s,@TARGET@,${target},g" \
@@ -410,6 +447,7 @@ sed > Makefile \
410 447
411FIRMDIR=@FIRMDIR@ 448FIRMDIR=@FIRMDIR@
412APPSDIR=@APPSDIR@ 449APPSDIR=@APPSDIR@
450TOOLSDIR=@TOOLSDIR@
413DEBUG=@DEBUG@ 451DEBUG=@DEBUG@
414ARCHOS=@ARCHOS@ 452ARCHOS=@ARCHOS@
415TARGET=@TARGET@ 453TARGET=@TARGET@
@@ -424,10 +462,10 @@ EXTRA_DEFINES=@EXTRA_DEFINES@
424all: firmware apps 462all: firmware apps
425 463
426firmware: 464firmware:
427 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE) 465 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)
428 466
429apps: 467apps:
430 \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE) 468 \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE) TOOLSDIR=\$(TOOLSDIR)
431 469
432clean-firmware: 470clean-firmware:
433 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean 471 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean