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.
This commit is contained in:
Gabrielius Mickevicius 2014-12-28 23:13:56 +02:00
parent dcc7512284
commit 3754e5c012

View file

@ -1031,11 +1031,16 @@ else
$(call show_config_variable,DEVICE_PATH,[AUTODETECTED]) $(call show_config_variable,DEVICE_PATH,[AUTODETECTED])
endif endif
# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors. ifdef FORCE_MONITOR_PORT
ifeq ($(CURRENT_OS), WINDOWS) # Skips the DEVICE_PATH existance check.
get_monitor_port = $(COM_STYLE_MONITOR_PORT) get_monitor_port = $(DEVICE_PATH)
else else
# 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!)) get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!))
endif
endif endif
# Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors. # Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.