radare2/libr/waitfordeps.sh
pancake e24453348a * Chop last '/' in r_fs_mount
* Add support for other partition types:
  - msdos, acorn, bsdlabel, amiga, sun, sunpc, apple, gpt
* Honour make return values
2011-01-23 21:54:18 +01:00

46 lines
656 B
Bash
Executable File

#!/bin/sh
# dependency checker -- pancake
deps="$@"
[ -z "$deps" ] && exit 0
getext() {
u=$(cat ../../config-user.mk| grep HOST_OS |cut -d = -f 2)
case $u in
windows)
echo dll
;;
darwin)
echo dylib
;;
#@*linux*)
*)
echo so
;;
esac
}; ext=$(getext)
a=0
count=3
cur=$(basename `pwd`)
while [ $a = 0 ] ; do
a=1
libs="$(echo $deps | sed -e s,r_,,g)"
for l in $libs ; do
if [ ! -f "../$l/libr_$l.$ext" ]; then
echo "NOT FOUND r_$l"
a=0
fi
done
if [ $a = 0 ]; then
echo "[$cur] waiting for $libs"
count=$(($count-1))
if [ $count = 0 ]; then
echo "[$cur] Compilation failed"
#exit 1
fi
sleep 1
fi
done
exit 0