Skip to content

Commit b95c9ed

Browse files
committed
makefile: when make goal is run or gui, check openocd executable
Signed-off-by: Jingru Wang <jingru@synopsys.com>
1 parent 221cf89 commit b95c9ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

options/toolchain/toolchain_gnu.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ endif
150150

151151
OPENOCD_EXECUTABLE_ROOT = $(dir $(shell $(WHICH) openocd))
152152
ifeq ($(OPENOCD_EXECUTABLE_ROOT), )
153+
ifneq ($(MAKECMDGOALS), )
154+
ifeq ($(findstring $(MAKECMDGOALS),run gui),)
153155
$(info "Tool openocd - openocd doesn't exist, please install it!")
156+
endif
157+
endif
154158
else
155159
OPENOCD_SCRIPT_ROOT = $(OPENOCD_EXECUTABLE_ROOT)/share/openocd/scripts
156160
endif

0 commit comments

Comments
 (0)