]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blob - gator_events.sh
gator: ARM DS-5.6 Streamline gator driver
[android-sdk/arm-ds5-gator.git] / gator_events.sh
1 #!/bin/sh
3 EVENTS=`grep gator_events_init *.c | sed 's/.\+gator_events_init(\(.\+\)).\+/\1/'`
5 (
6         echo /\* This file is auto generated \*/
7         echo
8         for EVENT in $EVENTS; do
9                 echo __weak int $EVENT\(void\)\;
10         done
11         echo
12         echo static int \(*gator_events_list[]\)\(void\) = {
13         for EVENT in $EVENTS; do
14                 echo \  $EVENT,
15         done
16         echo }\;
17 ) > $1.tmp
19 cmp -s $1 $1.tmp && rm $1.tmp || mv $1.tmp $1