diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-23 10:10:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-23 10:10:44 +0000 |
commit | 670965876893d9e5a0dbe7b9392622ac6977e38f (patch) | |
tree | c4ec5bc09df88f4b196d3645d338a8b598d43abb /tools | |
parent | fcf56299f2aa4259f2e5d79c3abe89d3692530a3 (diff) |
escape $ properly, added 'update' support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@662 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/configure | 49 |
1 files changed, 33 insertions, 16 deletions
diff --git a/tools/configure b/tools/configure index 282b625b9b..5f08c658f6 100755 --- a/tools/configure +++ b/tools/configure @@ -9,6 +9,7 @@ # target=$1 +debug=$2 input() { read response @@ -19,6 +20,17 @@ echo "Setup your Rockbox build environment." echo "http://bjorn.haxx.se/rockbox/" echo "" +if [ "$target" = "update" ]; then + target="" + if [ -f Makefile ]; then + if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then + echo "Existing generated Makefile found. Getting defaults from it." + target=`grep "^TARGET=" Makefile | cut -d= -f2-` + debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` + fi + fi +fi + if [ -z "$target" ]; then ################################################################## @@ -53,23 +65,26 @@ if [ -z "$target" ]; then fi -################################################################## -# Figure out debug on/off -# -echo "" -echo "Build DEBUG version? (y/N)" +if [ -z "$debug" ]; then + ################################################################## + # Figure out debug on/off + # + echo "" + echo "Build DEBUG version? (y/N)" -option=`input`; + option=`input`; -case $option in - [Yy]) - debug="DEBUG=1" - ;; - *) - debug="" - ;; + case $option in + [Yy]) + debug="DEBUG=1" + ;; + *) + debug="" + ;; + + esac +fi -esac ################################################################## # Figure out where the firmware code is! @@ -120,6 +135,8 @@ sed > Makefile \ -e "s,@TARGET@,${target},g" \ -e "s,@PWD@,${pwd},g" \ <<EOF +## Automaticly generated. http://bjorn.haxx.se/rockbox/ + FIRMDIR=@FIRMDIR@ APPSDIR=@APPSDIR@ DEBUG=@DEBUG@ @@ -127,8 +144,8 @@ TARGET=@TARGET@ THISDIR="@PWD@" all: - make -C \$(FIRMDIR) TARGET=\$(TARGET) $(DEBUG) OBJDIR=\$(THISDIR) - make -C \$(APPSDIR) TARGET=\$(TARGET) $(DEBUG) OBJDIR=\$(THISDIR) + make -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) + make -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EOF |