1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 08:53:55 +02:00

Create compile-commands.json with Make

This commit is contained in:
Andrea Bedini 2024-03-18 23:57:15 +08:00
parent 5c8983b9e6
commit 83fc988bec
5 changed files with 55 additions and 3 deletions

View file

@ -0,0 +1,11 @@
compile-commands-json-files :=
define write-compile-commands
_srcs := $$(sort $$(foreach src, $$($(1)_SOURCES), $$(src)))
$(1)_COMPILE_COMMANDS_JSON := $$(addprefix $(buildprefix), $$(addsuffix .compile_commands.json, $$(basename $$(_srcs))))
compile-commands-json-files += $$($(1)_COMPILE_COMMANDS_JSON)
clean-files += $$($(1)_COMPILE_COMMANDS_JSON)
endef