mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +02:00
Create compile-commands.json with Make
This commit is contained in:
parent
5c8983b9e6
commit
83fc988bec
5 changed files with 55 additions and 3 deletions
|
@ -68,6 +68,7 @@ include mk/patterns.mk
|
|||
include mk/templates.mk
|
||||
include mk/cxx-big-literal.mk
|
||||
include mk/tests.mk
|
||||
include mk/compilation-database.mk
|
||||
|
||||
|
||||
# Include all sub-Makefiles.
|
||||
|
@ -97,6 +98,13 @@ $(foreach test-group, $(install-tests-groups), \
|
|||
$(eval $(call run-test,$(test),$(install_test_init))) \
|
||||
$(eval $(test-group).test-group: $(test).test)))
|
||||
|
||||
# Compilation database.
|
||||
$(foreach lib, $(libraries), $(eval $(call write-compile-commands,$(lib))))
|
||||
$(foreach prog, $(programs), $(eval $(call write-compile-commands,$(prog))))
|
||||
|
||||
compile_commands.json: $(compile-commands-json-files)
|
||||
@jq --slurp '.' $^ >$@
|
||||
|
||||
# Include makefiles requiring built programs.
|
||||
$(foreach mf, $(makefiles-late), $(eval $(call include-sub-makefile,$(mf))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue