diff --git a/sys/apia/apia.sh b/sys/apia/apia.sh index 0444631b09..7ca6bc3c2b 100644 --- a/sys/apia/apia.sh +++ b/sys/apia/apia.sh @@ -1,8 +1,9 @@ #!/bin/sh +E=$(r2 -HLIBEXT) A=r_$1 -B=../../libr/$1/libr_$1.dylib -C=tmp/libr_$1.dylib +B=../../libr/$1/libr_$1.$E +C=tmp/libr_$1.$E echo "Public" rabin2 -qs $B | awk '{print $3}' | grep $A | sed -e 's,_r_, r_,' @@ -11,7 +12,7 @@ echo "Internal" r2 -qcaac -c "ax~r_$1" $B | grep -v imp | sed -e 's, + ,+,g' | sed -e 's,code ,code,' | awk '{print $7" -> "$1}' | sort | sed -e 's,^, ,' | grep -v str. echo "External" -grep $A tmp/*.i | sed -e 's,^, ,' | sed -e 's,tmp/lib,,' -e 's,.dylib.i:, -> ,' +grep $A tmp/*.i | sed -e 's,^, ,' | sed -e 's,tmp/lib,,' -e "s,.$E.i:, -> ," echo "Unused" for a in `cat $C.s | grep $A` ; do diff --git a/sys/apia/apis.sh b/sys/apia/apis.sh index 109a38e1ff..782d0b3493 100755 --- a/sys/apia/apis.sh +++ b/sys/apia/apis.sh @@ -1,5 +1,6 @@ #!/bin/sh -LIBS=$(ls ../../libr/*/*.dylib) +EXT=$(r2 -H LIBEXT) +LIBS=$(ls ../../libr/*/*.${EXT}) mkdir tmp for LIB in $LIBS; do echo $LIB