From d4d9be5ce4dcb837d36f233940752088febd538c Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Wed, 9 Aug 2023 13:20:05 +0200 Subject: [PATCH] make: COMPILE_COMMANDS_PATH adapt for external apps --- Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index cad5d27eda..609a1f8fec 100644 --- a/Makefile.include +++ b/Makefile.include @@ -730,7 +730,7 @@ else _LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $$(find $(BASELIBS:%.module=$(BINDIR)/%/) -name "*.o" 2> /dev/null | sort) $(ARCHIVES_GROUP) $(LINKFLAGS) $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map endif # BUILDOSXNATIVE -COMPILE_COMMANDS_PATH ?= $(RIOTBASE)/compile_commands.json +COMPILE_COMMANDS_PATH ?= $(if $(findstring $(RIOTBASE),$(APPDIR)),$(RIOTBASE)/compile_commands.json, $(APPDIR)/compile_commands.json) COMPILE_COMMANDS_FLAGS ?= --clangd .PHONY: compile-commands compile-commands: $(BUILDDEPS)