diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index db66696c..0d17f6af 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -93,17 +93,6 @@ _set_executable_paths() { } _set_build_paths() { - # We need that echo because we\re piping to cksum - # shellcheck disable=SC2005 - SKETCH_IDENTIFIER="$(echo "${SKETCH_FILE_PATH}" | cksum | cut -d ' ' -f 1)-${SKETCH_FILE_NAME}" - - : "${SKETCH_BUILD_DIR:=${SKETCH_IDENTIFIER}/build}" - : "${SKETCH_OUTPUT_DIR:=${SKETCH_IDENTIFIER}/output}" - - : "${BUILD_PATH:=${KALEIDOSCOPE_BUILD_PATH}/${SKETCH_BUILD_DIR}}" - : "${OUTPUT_PATH:=${KALEIDOSCOPE_OUTPUT_PATH}/${SKETCH_OUTPUT_DIR}}" - - : "${LIB_PROPERTIES_PATH:="../.."}" GIT_VERSION="$( cd "${SKETCH_DIR}" if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi diff --git a/etc/sketch-arduino-cli.mk b/etc/sketch-arduino-cli.mk index e7aaaee8..05c63a76 100644 --- a/etc/sketch-arduino-cli.mk +++ b/etc/sketch-arduino-cli.mk @@ -63,6 +63,24 @@ sketch_exists_p = $(realpath $(wildcard $(dir)/$(SKETCH_FILE_NAME))) export SKETCH_FILE_PATH := $(firstword $(foreach dir,$(sketch_dir_candidates),$(sketch_exists_p))) + + + + +export SKETCH_IDENTIFIER := $(shell echo "$${SKETCH_FILE_PATH}" | cksum | cut -d ' ' -f 1)-$(SKETCH_FILE_NAME) + +export SKETCH_BUILD_DIR := $(SKETCH_IDENTIFIER)/build +export SKETCH_OUTPUT_DIR := $(SKETCH_IDENTIFIER)/output + +export BUILD_PATH := $(KALEIDOSCOPE_BUILD_PATH)/$(SKETCH_BUILD_DIR) +export OUTPUT_PATH := $(KALEIDOSCOPE_OUTPUT_PATH)/$(SKETCH_OUTPUT_DIR) + +export LIB_PROPERTIES_PATH := "../.." + + + + + $(SKETCH_FILE_PATH): @echo "Sketch is $(SKETCH_FILE_PATH)"