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.
This commit is contained in:
Sudar 2013-07-25 21:14:24 +05:30
parent 288c53c312
commit 65b426e4ad
2 changed files with 6 additions and 14 deletions

View file

@ -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),)

View file

@ -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),)