Add script to generate kmod/compile_commands.json

This commit is contained in:
Francesco Mazzoli
2023-09-18 12:44:22 +00:00
parent 77ac15af8d
commit b43a31eb24

11
kmod/gen_compile_commands.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -eu -o pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
set -x
./linux/scripts/gen_compile_commands.py
sed -i 's:-I .:-I ./linux:g' ./compile_commands.json
sed -i 's:-include .:-include ./linux:g' ./compile_commands.json