From 202f4b818d2bfe7f46ea8211e0f6130d44b8a2ce Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 26 Aug 2020 00:15:05 +0200 Subject: [PATCH] wip: kaleidoscope-builder: respect the prefix/suffix/basename env vars Signed-off-by: Gergely Nagy --- etc/kaleidoscope-builder.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index 72cedfa3..44467853 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -26,7 +26,9 @@ if [ "${ARCH}" = "virtual" ]; then COMPILER_PATH="/usr/bin/" fi - COMPILER_PREFIX="" + if [ "${COMPILER_PREFIX}" = "avr-" ]; then + COMPILER_PREFIX="" + fi else ARCH="avr" fi @@ -260,12 +262,10 @@ ARDUINO_IDE_VERSION="10607" # Allow the compiler path to be empty for virtual builds COMPILER_PATH="${COMPILER_PATH-${ARDUINO_TOOLS_PATH}/avr/bin/}" -COMPILER_SUFFIX="" - -C_COMPILER_BASENAME=$(basename ${CC:-gcc}) -CXX_COMPILER_BASENAME=$(basename ${CXX:-g++}) -AR_BASENAME=$(basename ${AR:-ar}) -OBJCOPY_BASENAME=$(basename ${OBJCOPY:-objcopy}) +C_COMPILER_BASENAME="${C_COMPILER_BASENAME:-$(basename ${CC:-gcc})}" +CXX_COMPILER_BASENAME="${CXX_COMPILER_BASENAME:-$(basename ${CXX:-g++})}" +AR_BASENAME="${AR_BASENAME:-$(basename ${AR:-ar})}" +OBJCOPY_BASENAME="${OBJCOPY_BASENAME:-$(basename ${OBJCOPY:-objcopy})}" # Allow the compiler prefix to be empty for virtual builds COMPILER_PREFIX="${COMPILER_PREFIX-avr-}"