summaryrefslogtreecommitdiff
path: root/themes/compile_commands.sh
blob: 08a9eed0a1ffac6cf8551122f1cb092fb59dbdb3 (plain)
1
2
3
4
5
6
7
make --always-make --dry-run \
 | grep -wE 'em++|emcc|gcc|g\+\+|c\+\+' \
 | grep -w '\-c' \
 | jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' \
 > compile_commands.json

sed -i -e 's/em++/g++/g' compile_commands.json