A small optimization for recursive makefile calls to stop shelling out to look for arduino-cli when we already know the answer

pull/999/head
Jesse Vincent 4 years ago
parent f17786a9c3
commit 82515e46d9
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -75,19 +75,20 @@ endif
endif
system_arduino_cli := $(shell command -v arduino-cli || true)
arduino_env = ARDUINO_DIRECTORIES_USER=$(ARDUINO_DIRECTORIES_USER) \
ARDUINO_DIRECTORIES_DATA=$(ARDUINO_DIRECTORIES_DATA)
ifeq ($(ARDUINO_CLI_PATH),)
system_arduino_cli ?= $(shell command -v arduino-cli || true)
ifeq ($(system_arduino_cli),)
export ARDUINO_CLI_PATH ?= $(KALEIDOSCOPE_BIN_DIR)/arduino-cli
else
export ARDUINO_CLI_PATH ?= $(system_arduino_cli)
endif
endif
export ARDUINO_CLI ?= $(arduino_env) $(ARDUINO_CLI_PATH)

Loading…
Cancel
Save