c44b0e228a920b350e09ad412dcd9796291c9dd7
[dpdk.git] / devtools / gen-abi.sh
1 #!/bin/sh -e
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright (c) 2019 Red Hat, Inc.
4
5 if [ $# != 1 ]; then
6         echo "Usage: $0 installdir"
7         exit 1
8 fi
9
10 installdir=$1
11 if [ ! -d $installdir ]; then
12         echo "Error: install directory '$installdir' does not exist."
13         exit 1
14 fi
15
16 dumpdir=$installdir/dump
17 rm -rf $dumpdir
18 mkdir -p $dumpdir
19 for f in $(find $installdir -name "*.so.*"); do
20         if test -L $f; then
21                 continue
22         fi
23
24         libname=$(basename $f)
25         abidw --out-file $dumpdir/${libname%.so*}.dump $f
26 done