configure 235 B

123456789
  1. #!/bin/sh
  2. cp Makefile.src Makefile
  3. make --always-make --dry-run \
  4. | grep -wE 'gcc|g\+\+' \
  5. | grep -w '\-c' \
  6. | jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' \
  7. > compile_commands.json