diff options
Diffstat (limited to 'sys/tools/sound/emu10k1-mkalsa.sh')
-rw-r--r-- | sys/tools/sound/emu10k1-mkalsa.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/tools/sound/emu10k1-mkalsa.sh b/sys/tools/sound/emu10k1-mkalsa.sh new file mode 100644 index 0000000..2e78f5b --- /dev/null +++ b/sys/tools/sound/emu10k1-mkalsa.sh @@ -0,0 +1,21 @@ +# $FreeBSD$ + +GREP=${GREP:-grep} +CC=${CC:-cc} +AWK=${AWK:-awk} +MV=${MV:=mv} +RM=${RM:=rm} +IN=$1 +OUT=$2 + +trap "${RM} -f $OUT.tmp" EXIT + +$GREP -v '#include' $IN | \ +$CC -E -D__KERNEL__ -dM - | \ +$AWK -F"[ (]" ' +/define/ { + print "#ifndef " $2; + print; + print "#endif"; +}' > $OUT.tmp +${MV} -f $OUT.tmp $OUT |