diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-22 10:39:39 +0100 |
commit | e59a93e1d5689ae174051f4179f3a8a283492f46 (patch) | |
tree | d9938ce3c87eab8b88e27e1c72f3b790bc18eb97 /Makefile | |
parent | 9eff9ce48c2e2398a52f0d9d572c0a15f1a50de9 (diff) | |
parent | 87d6abb654b993948a9eea2169ffe7d5fc631154 (diff) | |
download | barebox-e59a93e1d5689ae174051f4179f3a8a283492f46.tar.gz barebox-e59a93e1d5689ae174051f4179f3a8a283492f46.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -541,7 +541,7 @@ endif # in addition to whatever we do anyway. # Just "make" or "make all" shall build modules as well -ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) +ifneq ($(filter all _all modules %compile_commands.json,$(MAKECMDGOALS)),) KBUILD_MODULES := 1 endif @@ -1104,7 +1104,7 @@ endif # CONFIG_MODULES CLEAN_DIRS += $(MODVERDIR) CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \ .tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \ - .tmp_kallsyms* barebox.ldr \ + .tmp_kallsyms* barebox.ldr compile_commands.json \ scripts/bareboxenv-target barebox-flash-image \ barebox.srec barebox.s5p barebox.ubl barebox.zynq \ barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \ @@ -1162,6 +1162,18 @@ distclean: mrproper -o -name 'core' \) \ -type f -print | xargs rm -f +# Clang Tooling +# --------------------------------------------------------------------------- + +quiet_cmd_gen_compile_commands = GEN $@ + cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs)) + +compile_commands.json: scripts/clang-tools/gen_compile_commands.py \ + $(BAREBOX_OBJS) $(if $(CONFIG_PBL_IMAGE),$(BAREBOX_PBL_OBJS),) FORCE + $(call if_changed,gen_compile_commands) + +PHONY += compile_commands.json + # Brief documentation of the typical targets used # --------------------------------------------------------------------------- |