diff options
Diffstat (limited to 'drivers/gator/gator_events.sh')
-rwxr-xr-x | drivers/gator/gator_events.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gator/gator_events.sh b/drivers/gator/gator_events.sh new file mode 100755 index 00000000000..5467dd6d17d --- /dev/null +++ b/drivers/gator/gator_events.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +EVENTS=`grep gator_events_init *.c | sed 's/.\+gator_events_init(\(.\+\)).\+/\1/'` + +( + echo /\* This file is auto generated \*/ + echo + for EVENT in $EVENTS; do + echo __weak int $EVENT\(void\)\; + done + echo + echo static int \(*gator_events_list[]\)\(void\) = { + for EVENT in $EVENTS; do + echo \ $EVENT, + done + echo }\; +) > $1.tmp + +cmp -s $1 $1.tmp && rm $1.tmp || mv $1.tmp $1 |