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,16 +225,12 @@ 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
else
echo $(error "ARDMK_DIR is not defined")
endif
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
# git checkout

View file

@ -31,13 +31,9 @@ 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")
endif
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
# git checkout