summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-02-05 22:51:16 +0000
committerpeter <peter@FreeBSD.org>2004-02-05 22:51:16 +0000
commit1236c1c0f0eb6f78b0a1aa580374b5f0a0ac547c (patch)
treec421c7ad26d8245b82ef418fddc51fe25194027a /sys/tools
parent743cc6d00297660ac72c8a7b391b0048d5699479 (diff)
downloadFreeBSD-src-1236c1c0f0eb6f78b0a1aa580374b5f0a0ac547c.zip
FreeBSD-src-1236c1c0f0eb6f78b0a1aa580374b5f0a0ac547c.tar.gz
Attempt to clean up the emu10k1-alsa.h stuff so that config doesn't
delete it each time its run and have it regenerated each time by make. I used a quick hackish script rather than putting it in the files file and used the before-depend rule to avoid the depend/no-depend hacks.
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/emu10k1-mkalsa.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/tools/emu10k1-mkalsa.sh b/sys/tools/emu10k1-mkalsa.sh
new file mode 100644
index 0000000..2e78f5b
--- /dev/null
+++ b/sys/tools/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
OpenPOWER on IntegriCloud