Check we could actually build something.

This commit is contained in:
Daniel O'Connor 2012-09-06 15:27:26 +09:30
parent 03275f410f
commit d9cfc3ed48

View File

@ -67,6 +67,7 @@ printf("The compilation worked.\n");
}
EOF
worked=0
for ar in $arlist; do
arch=`basename \`dirname $ar\``
incpath=`dirname $ar`/../../include/$arch
@ -76,11 +77,17 @@ for ar in $arlist; do
naclbuilddir=`echo $ar | sed -e s,/libnacl.a,,`
echo "${incpath}" >naclinc.txt
echo "${ar}" >nacllib.txt
worked=1
break
fi
done
rm -f test test.c
if [ $worked -eq 0 ]; then
echo "Library present but couldn't build the test program"
exit 1
fi
# Create nacl.h for lazy programmers
(cd ${incpath} ; find . -name \*.h -a \! -name mphlr.h -a \! -name nacl.h | sed -e 's,\./\(.*\),#include <\1>,') >${incpath}/nacl.h