aboutsummaryrefslogtreecommitdiff
path: root/drivers/gator/gator_events.sh
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2012-12-19 23:28:33 +0400
committerAndrey Konovalov <andrey.konovalov@linaro.org>2012-12-19 23:28:33 +0400
commitf98c538cec678b563e907890a062d5be4340b2c3 (patch)
tree23b13837be612158b1d76b545e1cb721f570e67a /drivers/gator/gator_events.sh
parent22fcbd778cc18c3a0311d52d74a7061bdafdb944 (diff)
parent4ec372435cad16c639b583d29069d7f9d5745839 (diff)
Merge branch 'tracking-gator' into merge-linux-linaro-core-3.4llc-3.4-20121219.0linux-linaro-core-3.4
Diffstat (limited to 'drivers/gator/gator_events.sh')
-rwxr-xr-xdrivers/gator/gator_events.sh19
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 000000000000..5467dd6d17d6
--- /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