From 44fe2270a2d1a2685c3682506ae92eeaa61ea4c5 Mon Sep 17 00:00:00 2001 From: Simon John Date: Sun, 13 Sep 2015 09:49:53 +0100 Subject: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is manually set by user, not just on Windows - fixes issue #381 Code around this area probably needs a tidy up at some point. --- Arduino.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Arduino.mk') diff --git a/Arduino.mk b/Arduino.mk index 43e1bb8..b77984e 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -452,11 +452,12 @@ ifndef AVR_TOOLS_DIR else $(call show_config_variable,AVR_TOOLS_DIR,[USER]) - # Check in Windows as Cygwin is being used, that the configuration file for the AVRDUDE is set - # Check if it works on MAC - ifeq ($(CURRENT_OS),WINDOWS) - ifndef AVRDUDE_CONF - AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + # ensure we can still find avrdude.conf + ifndef AVRDUDE_CONF + ifeq ($(shell expr $(ARDUINO_VERSION) '>' 157), 1) + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + else + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/../avrdude.conf endif endif -- cgit v1.2.3