aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2004-02-05 22:51:16 +0000
committerPeter Wemm <peter@FreeBSD.org>2004-02-05 22:51:16 +0000
commit0ec876a2f03355e068a9ab527062862bd24ca5ce (patch)
treec421c7ad26d8245b82ef418fddc51fe25194027a /sys/tools
parent47d7e8a96f52d91b1f0fe5184f0f5d88c897db38 (diff)
downloadsrc-0ec876a2f03355e068a9ab527062862bd24ca5ce.tar.gz
src-0ec876a2f03355e068a9ab527062862bd24ca5ce.zip
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.
Notes
Notes: svn path=/head/; revision=125504
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 000000000000..2e78f5bd0499
--- /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