blob: 727a49df771904ce9d3f671ed397c6840239c17f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
EVENTS=`grep gator_events_init $2/*.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 }\;
) > $2/$1.tmp
cmp -s $2/$1 $2/$1.tmp && rm $2/$1.tmp || mv $2/$1.tmp $2/$1
|