buildtools: allow pedantic empty pmdinfo
[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 pmdinfogen=$3
8
9 # The generated file must not be empty if compiled in pedantic mode
10 echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output
11 for ofile in `ar t $arfile` ; do
12         ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null
13 done
14 exit 0