make sure shasum is installed before running f-c-p/clang/setup.sh

Summary:
public
Because we ran `./configure` *after* checking if clang was to be compiled, we
could fail mysteriously if `shasum` was not present. Now, we fail at the
`./configure` step with a clear error message.

closes #275

Reviewed By: akotulski

Differential Revision: D2921841

fb-gh-sync-id: b8edd8b
shipit-source-id: b8edd8b
master
Jules Villard 9 years ago committed by facebook-github-bot-7
parent 173bc5e996
commit 2f42941389

@ -118,7 +118,19 @@ if [ "$BUILD_JAVA" = "yes" ]; then
fi fi
if [ "$BUILD_CLANG" = "yes" ]; then if [ "$BUILD_CLANG" = "yes" ]; then
TARGETS+=" clang" TARGETS+=" clang"
if ! facebook-clang-plugins/clang/setup.sh --only-check-install; then fi
CONFIGURE_ARGS=
if [ "$BUILD_CLANG" = "no" ]; then
CONFIGURE_ARGS+=" --disable-c-analyzers"
fi
if [ "$BUILD_JAVA" = "no" ]; then
CONFIGURE_ARGS+=" --disable-java-analyzers"
fi
./configure $CONFIGURE_ARGS
if [ "$BUILD_CLANG" = "yes" ] && ! facebook-clang-plugins/clang/setup.sh --only-check-install; then
echo "" echo ""
echo " Warning: you are not using a release of Infer. The C and" echo " Warning: you are not using a release of Infer. The C and"
echo " Objective-C analyses require a custom clang to be compiled" echo " Objective-C analyses require a custom clang to be compiled"
@ -147,26 +159,8 @@ if [ "$BUILD_CLANG" = "yes" ]; then
if [ "x$confirm" != "xy" ]; then if [ "x$confirm" != "xy" ]; then
exit 0 exit 0
fi fi
fi
fi fi
CONFIGURE_ARGS=
if [ "$BUILD_CLANG" = "no" ]; then
CONFIGURE_ARGS+=" --disable-c-analyzers"
fi
if [ "$BUILD_JAVA" = "no" ]; then
CONFIGURE_ARGS+=" --disable-java-analyzers"
fi
echo
echo " *************************"
echo " ** **"
echo " ** Building Infer **"
echo " ** **"
echo " *************************"
echo
./configure $CONFIGURE_ARGS
make -j $TARGETS || ( make -j $TARGETS || (
echo echo
echo ' compilation failure; you can try running' echo ' compilation failure; you can try running'

Loading…
Cancel
Save