#!/bin/bash -e compile_commands=$1 input=$2 output=$3 dep=$4 flags=$(python - </{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}' > $output # sed magic was copied from the linux kernel build system