Skip to content

Commit

Permalink
changes to summon-arm-toolchain: start at support of out of place bui…
Browse files Browse the repository at this point in the history
…ld before install
  • Loading branch information
lamestllama committed Feb 24, 2011
1 parent 9bf2218 commit 4ff1990
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion linux/linux32/arm-none-eabi-gcc-linaro/Makefile
Expand Up @@ -26,7 +26,7 @@
#

all:
./summon-arm-toolchain LIBSTM32_EN=1
./summon-arm-toolchain LIBSTM32_EN=1 DESTDIR=~/sat PREFIX=/usr


install:
Expand Down
23 changes: 14 additions & 9 deletions linux/linux32/arm-none-eabi-gcc-linaro/summon-arm-toolchain
Expand Up @@ -20,7 +20,8 @@ set -e
# You can also pass them as parameters to the script
##############################################################################
TARGET=arm-none-eabi # Or: TARGET=arm-elf
PREFIX=${HOME}/sat # Install location of your final toolchain
DESTDIR = ${HOME}
PREFIX= /sat # Install location of your final toolchain
DARWIN_OPT_PATH=/opt/local # Path in which MacPorts or Fink is installed
# Set to 'sudo' if you need superuser privileges while installing
SUDO=
Expand All @@ -46,6 +47,9 @@ while [ $# -gt 0 ]; do
TARGET=*)
TARGET=$(echo $1 | sed 's,^TARGET=,,')
;;
DESTDIR=*)
DESTDIR=$(echo $1 | sed 's,^DESTDIR=,,')
;;
PREFIX=*)
PREFIX=$(echo $1 | sed 's,^PREFIX=,,')
;;
Expand Down Expand Up @@ -84,6 +88,7 @@ done

echo "Settings used for this build are:"
echo "TARGET=$TARGET"
echo "DESTDIR=$DESTDIR"
echo "PREFIX=$PREFIX"
echo "DARWIN_OPT_PATH=$DARWIN_OPT_PATH"
echo "SUDO=$SUDO"
Expand Down Expand Up @@ -154,7 +159,7 @@ if [ ${QUIET} != 0 ]; then
MAKEFLAGS="${MAKEFLAGS} -s"
fi

export PATH="${PREFIX}/bin:${PATH}"
export PATH="${DESTDIR}/${PREFIX}/bin:${PATH}"

SUMMON_DIR=$(pwd)
SOURCES=${SUMMON_DIR}/sources
Expand Down Expand Up @@ -333,7 +338,7 @@ if [ ! -e ${STAMPS}/${BINUTILS}.build ]; then
${BINUTILFLAGS}
log "Building ${BINUTILS}"
make ${MAKEFLAGS}
install ${BINUTILS} install
install ${BINUTILS} DESTDIR=${DESTDIR} install
cd ..
log "Cleaning up ${BINUTILS}"
touch ${STAMPS}/${BINUTILS}.build
Expand Down Expand Up @@ -380,7 +385,7 @@ if [ ! -e ${STAMPS}/${GCC}-${NEWLIB}.build ]; then
${GCCFLAGS}
log "Building ${GCC} and ${NEWLIB}"
make ${MAKEFLAGS}
install ${GCC} install
install ${GCC} DESTDIR=${DESTDIR} install
cd ..
log "Cleaning up ${GCC} and ${NEWLIB}"
touch ${STAMPS}/${GCC}-${NEWLIB}.build
Expand All @@ -399,7 +404,7 @@ if [ ! -e ${STAMPS}/${GDB}.build ]; then
${GDBFLAGS}
log "Building ${GDB}"
make ${MAKEFLAGS}
install ${GDB} install
install ${GDB} DESTDIR=${DESTDIR} install
cd ..
log "Cleaning up ${GDB}"
touch ${STAMPS}/${GDB}.build
Expand Down Expand Up @@ -428,7 +433,7 @@ if [ ! -e ${STAMPS}/openocd-${OOCD}.build ]; then
--enable-arm-jtag-ew
log "Building openocd-${OOCD}"
make ${MAKEFLAGS}
install openocd-${OOCD} install
install openocd-${OOCD} DESTDIR=${DESTDIR} install
cd ..
log "Cleaning up openocd-${OOCD}"
touch ${STAMPS}/openocd-${OOCD}.build
Expand All @@ -442,7 +447,7 @@ if [ ! -e ${STAMPS}/libcmsis-${LIBCMSIS}.build ]; then
cd libcmsis-${LIBCMSIS}
log "Building libcmsis-${LIBCMSIS}"
make arch_prefix=${TARGET} prefix=${PREFIX}
install libcmsis-${LIBCMSIS} arch_prefix=${TARGET} prefix=${PREFIX} install
install libcmsis-${LIBCMSIS} arch_prefix=${TARGET} DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ..
log "Cleaning up libcmsis-${LIBCMSIS}"
touch ${STAMPS}/libcmsis-${LIBCMSIS}.build
Expand All @@ -454,7 +459,7 @@ if [ ! -e ${STAMPS}/libstm32-${LIBSTM32}.build ]; then
cd libstm32-${LIBSTM32}
log "Building libstm32-${LIBSTM32}"
make arch_prefix=${TARGET} prefix=${PREFIX}
install libstm32-${LIBSTM32} arch_prefix=${TARGET} prefix=${PREFIX} install
install libstm32-${LIBSTM32} arch_prefix=${TARGET} DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ..
log "Cleaning up libstm32-${LIBSTM32}"
touch ${STAMPS}/libstm32-${LIBSTM32}.build
Expand All @@ -466,7 +471,7 @@ if [ ! -e ${STAMPS}/libstm32usb-${LIBSTM32USB}.build ]; then
cd libstm32usb-${LIBSTM32USB}
log "Building libstm32usb-${LIBSTM32USB}"
make arch_prefix=${TARGET} prefix=${PREFIX}
install libstm32usb-${LIBSTM32USB} arch_prefix=${TARGET} prefix=${PREFIX} install
install libstm32usb-${LIBSTM32USB} arch_prefix=${TARGET} DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ..
log "Cleaning up libstm32usb-${LIBSTM32USB}"
touch ${STAMPS}/libstm32usb-${LIBSTM32USB}.build
Expand Down

0 comments on commit 4ff1990

Please sign in to comment.