X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=buildtools%2Fgen-pmdinfo-cfile.sh;h=43059cf3646ba4eadc3c8cb397183488320c640c;hb=a617494eeb01ff;hp=565e08913178d918bec8b4d838aa54535cce2655;hpb=6c9457c27954f16d99f3798711eb253fbaf05fa3;p=dpdk.git diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh index 565e089131..43059cf364 100755 --- a/buildtools/gen-pmdinfo-cfile.sh +++ b/buildtools/gen-pmdinfo-cfile.sh @@ -6,7 +6,9 @@ arfile=$1 output=$2 pmdinfogen=$3 -tmp_o=${output%.c.pmd.c}.tmp.o - -ar p $arfile > $tmp_o && \ - $pmdinfogen $tmp_o $output +# 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 2> /dev/null +done +exit 0