aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk
diff options
context:
space:
mode:
authorRalf Doering <ralf@rdoering.net>2013-06-25 20:04:11 +0200
committerRalf Doering <ralf@rdoering.net>2013-06-25 20:07:56 +0200
commit25a31afbd92f03a1df1b50e3620f40afedd2e67e (patch)
treedcd3f0dbbe02a2c6c3ac834f32d813239000e24f /arduino-mk
parent74882aa13ac27e53ba76bbe2f2cc67bd3974bd67 (diff)
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.
Diffstat (limited to 'arduino-mk')
-rw-r--r--arduino-mk/Arduino.mk10
1 files 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))/..))