109ee461e8071fa260f4be3bcf8e97e72ed6b2cb
[dpdk.git] / buildtools / gen-pmdinfo-cfile.sh
1 #! /bin/sh
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2017 Intel Corporation
4
5 arfile=$1
6 output=$2
7 shift 2
8 pmdinfogen=$*
9
10 # The generated file must not be empty if compiled in pedantic mode
11 echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output
12 for ofile in `ar t $arfile` ; do
13         ar p $arfile $ofile | $pmdinfogen - - >> $output
14 done