Merge pull request #646 from kpfleming/improve-detection-ard-reset-arduino

Improve detection of ard-reset-arduino location
This commit is contained in:
Simon John 2020-10-20 12:20:30 +01:00 committed by GitHub
commit 7ac13de7f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -863,12 +863,13 @@ endif
# Reset # Reset
ifndef RESET_CMD ifndef RESET_CMD
ARD_RESET_ARDUINO := $(PYTHON_CMD) $(shell which ard-reset-arduino 2> /dev/null) ARD_RESET_ARDUINO_PATH := $(shell which ard-reset-arduino 2> /dev/null)
ifndef ARD_RESET_ARDUINO ifndef ARD_RESET_ARDUINO_PATH
# same level as *.mk in bin directory when checked out from git # same level as *.mk in bin directory when checked out from git
# or in $PATH when packaged # or in $PATH when packaged
ARD_RESET_ARDUINO = $(PYTHON_CMD) $(ARDMK_DIR)/bin/ard-reset-arduino ARD_RESET_ARDUINO_PATH = $(ARDMK_DIR)/bin/ard-reset-arduino
endif endif
ARD_RESET_ARDUINO := $(PYTHON_CMD) $(ARD_RESET_ARDUINO_PATH)
ifneq (,$(findstring CYGWIN,$(shell uname -s))) ifneq (,$(findstring CYGWIN,$(shell uname -s)))
# confirm user is using default cygwin unix Python (which uses ttySx) and not Windows Python (which uses COMx) # confirm user is using default cygwin unix Python (which uses ttySx) and not Windows Python (which uses COMx)
ifeq ($(PYTHON_CMD),/usr/bin/python) ifeq ($(PYTHON_CMD),/usr/bin/python)
@ -879,6 +880,9 @@ ifndef RESET_CMD
else else
RESET_CMD = $(ARD_RESET_ARDUINO) $(ARD_RESET_OPTS) $(call get_monitor_port) RESET_CMD = $(ARD_RESET_ARDUINO) $(ARD_RESET_OPTS) $(call get_monitor_port)
endif endif
$(call show_config_variable,RESET_CMD,[COMPUTED],(from PYTHON_CMD, ARD_RESET_OPTS and MONITOR_PORT))
else
$(call show_config_variable,RESET_CMD,[USER])
endif endif
ifneq ($(CATERINA),) ifneq ($(CATERINA),)