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:
parent
288c53c312
commit
65b426e4ad
2 changed files with 6 additions and 14 deletions
|
@ -225,15 +225,11 @@ else
|
||||||
$(call show_config_variable,ARDMK_DIR,[USER])
|
$(call show_config_variable,ARDMK_DIR,[USER])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef ARDMK_DIR
|
ifndef ARDMK_PATH
|
||||||
ifndef ARDMK_PATH
|
ARDMK_PATH = $(ARDMK_DIR)/bin
|
||||||
ARDMK_PATH = $(ARDMK_DIR)/bin
|
$(call show_config_variable,ARDMK_PATH,[COMPUTED],(relative to ARDMK_DIR))
|
||||||
$(call show_config_variable,ARDMK_PATH,[COMPUTED],(relative to ARDMK_DIR))
|
|
||||||
else
|
|
||||||
$(call show_config_variable,ARDMK_PATH,[USER])
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
echo $(error "ARDMK_DIR is not defined")
|
$(call show_config_variable,ARDMK_PATH,[USER])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
||||||
|
|
|
@ -31,12 +31,8 @@ ifndef ARDMK_DIR
|
||||||
ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))/..)
|
ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))/..)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef ARDMK_DIR
|
ifndef ARDMK_PATH
|
||||||
ifndef ARDMK_PATH
|
ARDMK_PATH = $(ARDMK_DIR)/bin
|
||||||
ARDMK_PATH = $(ARDMK_DIR)/bin
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
echo $(error "ARDMK_DIR is not defined")
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
ifneq ($(wildcard $(ARDMK_DIR)/arduino-mk/Common.mk),)
|
||||||
|
|
Loading…
Reference in a new issue