Created
August 17, 2022 08:35
-
-
Save MrThanlon/3a534a7e12c3ac918bb5259b27a92f91 to your computer and use it in GitHub Desktop.
compile_commands.json for Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make --always-make --dry-run \ | |
| grep -wE 'gcc|g\+\+' \ | |
| grep -w '\-c' \ | |
| jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' \ | |
> compile_commands.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment