wxWidgets/build/elfabi/check_all.sh
Vadim Zeitlin 973fc9a897 Distinguish between all and incompatible ABI changes in the check
abidiff returns 4 when the ABI has changed but not necessarily in an
incompatible way, which is something we want to allow as the new
functions may be added to the stable branch.
2022-08-01 22:14:09 +02:00

38 lines
801 B
Bash
Executable File

#!/bin/sh
#
# This script is used to check that the ABI of the libraries in the "lib"
# subdirecotry is compatible with the ABI description in the directory
# containing this script itself.
libraries=$(ls -1 lib/*.so)
if [ -z "$libraries" ]; then
echo 'Please run the script from the build directory and build the libraries first.' >&2
exit 1
fi
thisdir=$(dirname "$0")
rc=0
for l in $libraries; do
name=$(basename $l .so)
echo -n "Checking ${name}... "
abidiff ${thisdir}/${name}.abi $l
case $? in
0)
echo 'ok'
;;
4)
echo "*** ABI changes detected in ${name} ***"
;;
*)
echo "!!! INCOMPATIBLE ABI changes detected in ${name} !!!"
rc=1
;;
esac
done
exit $rc