check_symbols 588 Bytes
Newer Older
1
2
3
4
5
6
#! /bin/sh
# Plugin API consistency check for VLC
# Copyright © 2007 Rémi Denis-Courmont.

rm -f libvlc-headers.sym

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
7
cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
8
sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
9
sed -e 's/[^a-zA-Z0-9_]*//' | \
10
sort -fdu > libvlc-headers.sym
11

Rafaël Carré's avatar
Rafaël Carré committed
12
if ! diff -u ${srcdir}/libvlccore.sym libvlc-headers.sym; then
13
14
15
	echo "Mismatching symbols found!"
	exit 1
fi
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
16
17
18
19
20
21
22

# TODO: we should pass this:
#if grep -e "^_" libvlc-headers.sym; then
#	echo "Illegal symbol name (starting with underscore) found!";
#	exit 1
#fi

Christophe Mutricy's avatar
Christophe Mutricy committed
23
rm -f libvlc-headers.sym