From 25a31afbd92f03a1df1b50e3620f40afedd2e67e Mon Sep 17 00:00:00 2001 From: Ralf Doering Date: Tue, 25 Jun 2013 20:04:11 +0200 Subject: [PATCH] Don't overwrite AVRDUDE_CONF if AVR_TOOLS_DIR is not set. If one likes to use avrdude from outside of Arduino together with Arduino-bundled gcc crosstolchain, the setting of AVRDUDE_CONF got overwritten. --- arduino-mk/Arduino.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index b217592..aaec9aa 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -306,10 +306,12 @@ ifndef AVR_TOOLS_DIR BUNDLED_AVR_TOOLS_DIR := $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr) ifdef BUNDLED_AVR_TOOLS_DIR AVR_TOOLS_DIR = $(BUNDLED_AVR_TOOLS_DIR) - # The avrdude bundled with Arduino can't find it's config - AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf - $(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution)) - + # if AVRDUDE_CONF is already defined, don't overwrite it + ifndef AVRDUDE_CONF + # The avrdude bundled with Arduino can't find it's config + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + $(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution)) + endif else SYSTEMPATH_AVR_TOOLS_DIR := $(call dir_if_exists,$(abspath $(dir $(shell which avr-gcc))/..))