diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-04-22 22:18:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-04-22 22:18:57 +0000 |
commit | 31e0cd67ff903bd2ea592dfeb9b2119ad556f03c (patch) | |
tree | debd8a97f2c12e8306fe1f53f3784c1954ffe149 /tools/configure | |
parent | 722216834b53250ce6175df6d0cd7794d15bd355 (diff) | |
download | rockbox-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
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 42 |
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` |
376 | fi | 376 | fi |
377 | 377 | ||
378 | ################################################################## | ||
379 | # Figure out where the tools directory is! | ||
380 | # | ||
381 | |||
382 | toolsfile="descramble.c" # a file to check for in the tools root dir | ||
383 | |||
384 | for dir in tools . .. ../tools ../../tools $firmdir/tools $firmdir/../tools; do | ||
385 | if [ -f $dir/$toolsfile ]; then | ||
386 | toolsdir="$dir" | ||
387 | break | ||
388 | fi | ||
389 | done | ||
390 | |||
391 | if [ -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 | |||
405 | fi | ||
406 | |||
407 | if [ -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` | ||
412 | fi | ||
413 | |||
378 | if [ -z "$language" ]; then | 414 | if [ -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 | |||
398 | sed > Makefile \ | 434 | sed > 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 | ||
411 | FIRMDIR=@FIRMDIR@ | 448 | FIRMDIR=@FIRMDIR@ |
412 | APPSDIR=@APPSDIR@ | 449 | APPSDIR=@APPSDIR@ |
450 | TOOLSDIR=@TOOLSDIR@ | ||
413 | DEBUG=@DEBUG@ | 451 | DEBUG=@DEBUG@ |
414 | ARCHOS=@ARCHOS@ | 452 | ARCHOS=@ARCHOS@ |
415 | TARGET=@TARGET@ | 453 | TARGET=@TARGET@ |
@@ -424,10 +462,10 @@ EXTRA_DEFINES=@EXTRA_DEFINES@ | |||
424 | all: firmware apps | 462 | all: firmware apps |
425 | 463 | ||
426 | firmware: | 464 | firmware: |
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 | ||
429 | apps: | 467 | apps: |
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 | ||
432 | clean-firmware: | 470 | clean-firmware: |
433 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean | 471 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean |