Index: tools/rockboxdev.sh =================================================================== --- tools/rockboxdev.sh (revision 18363) +++ tools/rockboxdev.sh (working copy) @@ -17,7 +17,7 @@ # This script needs to use GNU Make. On Linux systems, GNU Make is invoked # by running the "make" command, on most BSD systems, GNU Make is invoked # by running the "gmake" command. Set the "make" variable accordingly. -if [ -f "`which gmake`" ]; then +if [ -f "`which gmake 2> /dev/null`" ]; then make="gmake" else make="make" @@ -197,7 +197,10 @@ pathadd="$bindir" fi -mkdir $builddir +if ! test -d $builddir; then + mkdir $builddir +fi + cd $builddir summary="summary-$1" @@ -231,12 +234,16 @@ else getfile binutils-$binutils.tar.bz2 $GNU_MIRROR/binutils fi +echo "ROCKBOXDEV: extracting binutils-$binutils in $builddir" +tar xjf $dlwhere/binutils-$binutils.tar.bz2 if test -f "$dlwhere/gcc-core-$gccver.tar.bz2"; then echo "gcc $gccver already downloaded" else getfile gcc-core-$gccver.tar.bz2 $GNU_MIRROR/gcc/gcc-$gccver fi +echo "ROCKBOXDEV: extracting gcc-$gccver in $builddir" +tar xjf $dlwhere/gcc-core-$gccver.tar.bz2 if test -n "$gccpatch"; then if test -f "$dlwhere/$gccpatch"; then @@ -244,16 +251,9 @@ else getfile "$gccpatch" "$gccurl" fi -fi -echo "ROCKBOXDEV: extracting binutils-$binutils in $builddir" -tar xjf $dlwhere/binutils-$binutils.tar.bz2 -echo "ROCKBOXDEV: extracting gcc-$gccver in $builddir" -tar xjf $dlwhere/gcc-core-$gccver.tar.bz2 - -if test -n "$gccpatch"; then echo "ROCKBOXDEV: applying gcc patch" - patch -p0 < "$dlwhere/$gccpatch" + patch -N -p0 -i "$dlwhere/$gccpatch" fi echo "ROCKBOXDEV: mkdir build-binu"