Check for $(TOOLCHAIN) before checking for $(TOOLCHAIN)/bin

if TOOLCHAIN is blank, wildcard can still detect the `/bin` directory.
This commit is contained in:
luckytyphlosion 2020-12-16 19:54:12 -05:00
parent 3b1cbc5861
commit 2783eed825
4 changed files with 8 additions and 0 deletions

View File

@ -8,9 +8,11 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system # files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system # if dkP is not installed on tihs system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),) ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH) export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif endif
endif
PREFIX := arm-none-eabi- PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy OBJCOPY := $(PREFIX)objcopy

View File

@ -8,9 +8,11 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system # files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system # if dkP is not installed on tihs system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),) ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH) export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif endif
endif
PREFIX := arm-none-eabi- PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy OBJCOPY := $(PREFIX)objcopy

View File

@ -8,9 +8,11 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system # files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system # if dkP is not installed on tihs system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),) ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH) export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif endif
endif
PREFIX := arm-none-eabi- PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy OBJCOPY := $(PREFIX)objcopy

View File

@ -8,9 +8,11 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system # files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system # if dkP is not installed on tihs system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),) ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH) export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif endif
endif
PREFIX := arm-none-eabi- PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy OBJCOPY := $(PREFIX)objcopy