~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to lib/tevent/abi_checks.sh

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
make clean
 
3
 
 
4
mkdir abi
 
5
ABI_CHECKS="-aux-info abi/\$@.X"
 
6
make ABI_CHECK="$ABI_CHECKS" CC="/usr/bin/gcc"
 
7
 
 
8
for i in abi/*.X; do cat $i | grep 'tevent\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' | sort> abi/signatures
 
9
 
 
10
cat > abi/exports << EOF
 
11
{
 
12
    global:
 
13
EOF
 
14
cat abi/signatures | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print "           "$NF";" }' | tr -d '*' | sort >> abi/exports
 
15
cat >> abi/exports << EOF
 
16
 
 
17
    local: *;
 
18
};
 
19
EOF
 
20
 
 
21
rm -fr abi/*.X
 
22
 
 
23
diff -u tevent.signatures abi/signatures
 
24
if [ "$?" != "0" ]; then
 
25
    echo "WARNING: Possible ABI Change!!"
 
26
fi
 
27
 
 
28
diff -u tevent.exports abi/exports
 
29
if [ "$?" != "0" ]; then
 
30
    echo "WARNING: Export file may be outdated!!"
 
31
fi