lift more paths out to the makefile

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 712db15f3e
commit d8c8549e1d
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -93,17 +93,6 @@ _set_executable_paths() {
} }
_set_build_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="$( GIT_VERSION="$(
cd "${SKETCH_DIR}" cd "${SKETCH_DIR}"
if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi

@ -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_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): $(SKETCH_FILE_PATH):
@echo "Sketch is $(SKETCH_FILE_PATH)" @echo "Sketch is $(SKETCH_FILE_PATH)"

Loading…
Cancel
Save