From 3754e5c0126cf1989be3e70bc879d8b66ab3b65b Mon Sep 17 00:00:00 2001 From: Gabrielius Mickevicius Date: Sun, 28 Dec 2014 23:13:56 +0200 Subject: [PATCH] Let user skip MONITOR_PORT existance check Define FORCE_MONITOR_PORT to enable. Useful if one uses 'ssh root@remotemachine avrdude' instead of the usual AVRDUDE command. --- Arduino.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index b0bac01..014f69b 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1031,11 +1031,16 @@ else $(call show_config_variable,DEVICE_PATH,[AUTODETECTED]) endif -# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors. -ifeq ($(CURRENT_OS), WINDOWS) - get_monitor_port = $(COM_STYLE_MONITOR_PORT) +ifdef FORCE_MONITOR_PORT + # Skips the DEVICE_PATH existance check. + get_monitor_port = $(DEVICE_PATH) else - get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!)) + # Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors. + ifeq ($(CURRENT_OS), WINDOWS) + get_monitor_port = $(COM_STYLE_MONITOR_PORT) + else + get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!)) + endif endif # Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.