aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk
diff options
context:
space:
mode:
authorSudar <sudar@sudarmuthu.com>2013-07-25 21:14:24 +0530
committerSudar <sudar@sudarmuthu.com>2013-07-28 11:42:20 +0530
commit65b426e4adb0d651e2ac1f3fffe4a5adec81e4fe (patch)
tree620045ed901fa0e4d79eedfc7342beb1cee30ed9 /arduino-mk
parent288c53c3120650624c8c146db32e49930829bab5 (diff)
Remove unnecessary checks for `ARDMK_DIR`
If `ARDMK_DIR` is not defined, then it is assumed to be the directory where `Arduino.mk` or `chipKIT.mk` is present. Since this assumption is made, `ARDMK_DIR` will always be set, whether the user has explicitly set it or not. Therefore checking whether `ARDMK_DIR` is not set is unnecessary. This commit removes these unnecessary checks.
Diffstat (limited to 'arduino-mk')
-rw-r--r--arduino-mk/Arduino.mk12
-rw-r--r--arduino-mk/chipKIT.mk8
2 files changed, 6 insertions, 14 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 17fb167..70b256c 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -225,15 +225,11 @@ else
$(call show_config_variable,ARDMK_DIR,[USER])
endif
-ifdef ARDMK_DIR
- ifndef ARDMK_PATH
- ARDMK_PATH = $(ARDMK_DIR)/bin
- $(call show_config_variable,ARDMK_PATH,[COMPUTED],(relative to ARDMK_DIR))
- else
- $(call show_config_variable,ARDMK_PATH,[USER])
- endif
+ifndef ARDMK_PATH
+ ARDMK_PATH = $(ARDMK_DIR)/bin
+ $(call show_config_variable,ARDMK_PATH,[COMPUTED],(relative to ARDMK_DIR))
else
- echo $(error "ARDMK_DIR is not defined")
+ $(call show_config_variable,ARDMK_PATH,[USER])
endif
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
diff --git a/arduino-mk/chipKIT.mk b/arduino-mk/chipKIT.mk
index 874b65e..8c98a1d 100644
--- a/arduino-mk/chipKIT.mk
+++ b/arduino-mk/chipKIT.mk
@@ -31,12 +31,8 @@ ifndef ARDMK_DIR
ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))/..)
endif
-ifdef ARDMK_DIR
- ifndef ARDMK_PATH
- ARDMK_PATH = $(ARDMK_DIR)/bin
- endif
-else
- echo $(error "ARDMK_DIR is not defined")
+ifndef ARDMK_PATH
+ ARDMK_PATH = $(ARDMK_DIR)/bin
endif
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)