summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRobert Hak <adiamas@rockbox.org>2002-10-17 09:08:05 +0000
committerRobert Hak <adiamas@rockbox.org>2002-10-17 09:08:05 +0000
commitc3320ae1caa52be9aa1f590ad6a594b4758a7467 (patch)
tree7c0ed7486f1ab3a822024efc1ed5a9a7e0344bab /tools
parent7ff0324d8a198b464d7f5c6c8092280526babf46 (diff)
downloadrockbox-c3320ae1caa52be9aa1f590ad6a594b4758a7467.tar.gz
rockbox-c3320ae1caa52be9aa1f590ad6a594b4758a7467.tar.bz2
rockbox-c3320ae1caa52be9aa1f590ad6a594b4758a7467.zip
sim questions are in order now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2693 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure147
1 files changed, 85 insertions, 62 deletions
diff --git a/tools/configure b/tools/configure
index f02866d652..620d9941a7 100755
--- a/tools/configure
+++ b/tools/configure
@@ -8,34 +8,10 @@
# $Id$
#
-target=$1
-debug=$2
-
-if test "$1" = "--help"; then
- echo "Rockbox configure script."
- echo "Invoke this in a directory to generate a Makefile to build Rockbox"
- echo "Do *NOT* run this within the tools directory!"
- exit
-fi
-
-if test -r "configure"; then
- # this is a check for a configure script in the current directory, it there
- # is one, try to figure out if it is this one!
-
- if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
- echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
- echo "It will only cause you pain and grief. Instead do this:"
- echo ""
- echo " cd .."
- echo " mkdir build-dir"
- echo " cd build-dir"
- echo " ../tools/configure"
- echo ""
- echo "Much happiness will arise from this. Enjoy"
- exit
- fi
-fi
+#
+# Begin Function Definitions
+#
input() {
read response
echo $response
@@ -67,7 +43,8 @@ fi
# Figure out where the firmware code is!
#
- simfile="$simver/lcd-$simver.c" # a file to check for in the uisimulator root dir
+ # a file to check for in the uisimulator root dir
+ simfile="$simver/lcd-$simver.c"
for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
if [ -f "$dir/$simfile" ]; then
@@ -134,6 +111,67 @@ EOF
}
+picklang() {
+ # figure out which languages that are around
+ for file in $appsdir/lang/*.lang; do
+ clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
+ langs="$langs $clean"
+ done
+
+ num=1
+ for one in $langs; do
+ echo "$num. $one"
+ num=`expr $num + 1`
+ done
+
+ read pick
+ return $pick;
+}
+
+whichlang() {
+ num=1
+ for one in $langs; do
+ if [ "$num" = "$pick" ]; then
+ echo $one
+ return
+ fi
+ num=`expr $num + 1`
+ done
+}
+
+
+#
+# Beging Build Script
+#
+
+target=$1
+debug=$2
+
+if test "$1" = "--help"; then
+ echo "Rockbox configure script."
+ echo "Invoke this in a directory to generate a Makefile to build Rockbox"
+ echo "Do *NOT* run this within the tools directory!"
+ exit
+fi
+
+if test -r "configure"; then
+ # this is a check for a configure script in the current directory, it there
+ # is one, try to figure out if it is this one!
+
+ if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
+ echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
+ echo "It will only cause you pain and grief. Instead do this:"
+ echo ""
+ echo " cd .."
+ echo " mkdir build-dir"
+ echo " cd build-dir"
+ echo " ../tools/configure"
+ echo ""
+ echo "Much happiness will arise from this. Enjoy"
+ exit
+ fi
+fi
+
if [ "$target" = "--help" -o \
"$target" = "-h" ]; then
echo "Just invoke the script and answer the questions."
@@ -286,33 +324,11 @@ if [ -z "$appsdir" ]; then
appsdir=`input`
fi
-picklang() {
- # figure out which languages that are around
- for file in $appsdir/lang/*.lang; do
- clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
- langs="$langs $clean"
- done
-
- num=1
- for one in $langs; do
- echo "$num. $one"
- num=`expr $num + 1`
- done
-
- read pick
- return $pick;
-}
-
-whichlang() {
- num=1
- for one in $langs; do
- if [ "$num" = "$pick" ]; then
- echo $one
- return
- fi
- num=`expr $num + 1`
- done
-}
+if [ "yes" = "$simulator" ]; then
+ # we have already dealt with the simulator Makefile separately
+ simul
+ exit
+fi
if [ -z "$language" ]; then
@@ -327,13 +343,6 @@ if [ -z "$language" ]; then
fi
fi
-
-if [ "yes" = "$simulator" ]; then
- # we deal with the simulator Makefile separately
- simul
- exit
-fi
-
sed > Makefile \
-e "s,@FIRMDIR@,${firmdir},g" \
-e "s,@APPSDIR@,${appsdir},g" \
@@ -385,3 +394,17 @@ tags:
EOF
echo "Created Makefile"
+
+
+
+
+
+
+
+
+
+
+
+
+
+