From 321b1b8c2d98a3bd48c55e2a9ebafe79a2b94162 Mon Sep 17 00:00:00 2001
From: Benoit Rapidel <benoit.rapidel+devs@exmachina.fr>
Date: Thu, 24 Sep 2015 16:56:19 +0200
Subject: [PATCH] Added FORCE_ISP_PORT to skip verification.

---
 Arduino.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Arduino.mk b/Arduino.mk
index eb94a3c..5cb1de4 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -1092,8 +1092,13 @@ else
     endif
 endif
 
-# Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.
-get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(if $(findstring Xusb,X$(ISP_PORT)),$(ISP_PORT),$(error ISP port $(ISP_PORT) not found!)))
+ifdef FORCE_ISP_PORT
+    # Skips the ISP_PORT existance check.
+    get_isp_port = $(ISP_PORT)
+else
+    # Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.
+    get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(if $(findstring Xusb,X$(ISP_PORT)),$(ISP_PORT),$(error ISP port $(ISP_PORT) not found!)))
+endif
 
 # Command for avr_size: do $(call avr_size,elffile,hexfile)
 ifneq (,$(findstring AVR,$(shell $(SIZE) --help)))