X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=buildtools%2Fcheck-experimental-syms.sh;h=7d1f3a568aae46e804f3b84b6b8d573e5b0e847c;hb=6927f8dbf3db975cd968287c511122ddccc076bb;hp=7d21de35cc56ae35e1191a2db32d1f477303342c;hpb=a4bcd61de82d821b7e81c186c9254f816e9653bd;p=dpdk.git diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh index 7d21de35cc..7d1f3a568a 100755 --- a/buildtools/check-experimental-syms.sh +++ b/buildtools/check-experimental-syms.sh @@ -5,6 +5,12 @@ MAPFILE=$1 OBJFILE=$2 +# added check for "make -C test/" usage +if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ] +then + exit 0 +fi + if [ -d $MAPFILE ] then exit 0 @@ -16,15 +22,17 @@ for i in `awk 'BEGIN {found=0} /.*;/ {if (found == 1) print $1}' $MAPFILE` do SYM=`echo $i | sed -e"s/;//"` - objdump -t $OBJFILE | grep -q "\.text.*$SYM" + objdump -t $OBJFILE | grep -q "\.text.*$SYM$" IN_TEXT=$? - objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM" + objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$" IN_EXP=$? if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ] then - echo "$SYM is not flagged as experimental" - echo "but is listed in version map" - echo "Please add __rte_experimental to the definition of $SYM" + cat >&2 <<- END_OF_MESSAGE + $SYM is not flagged as experimental + but is listed in version map + Please add __rte_experimental to the definition of $SYM + END_OF_MESSAGE exit 1 fi done