numam-dpdk/buildtools/gen-pmdinfo-cfile.sh
Dmitry Kozlyuk f0f93a7adf buildtools: use Python pmdinfogen
Use the same interpreter to run pmdinfogen as for other build scripts.
Adjust wrapper script accordingly and also don't suppress stderr from ar
and pmdinfogen. Add configure-time check for elftools Python module for
Unix hosts.

Add pyelftools to CI configuration and build requirements for Linux and
FreeBSD. Windows targets are not currently using pmdinfogen.

Suppress ABI warnings about generated PMD information strings.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Jie Zhou <jizh@microsoft.com>
2021-01-25 23:23:41 +01:00

15 lines
369 B
Bash
Executable File

#! /bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
arfile=$1
output=$2
shift 2
pmdinfogen=$*
# The generated file must not be empty if compiled in pedantic mode
echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output
for ofile in `ar t $arfile` ; do
ar p $arfile $ofile | $pmdinfogen - - >> $output
done