Skip to content

Commit

Permalink
Add an option to skip updating submodules if only building for java
Browse files Browse the repository at this point in the history
Summary:
When invoking `./build-infer.sh java`, there is no need to update the facebook-clang-plugins submodule that is done as part of the `autogen.sh` script. The submodule update takes a very long time and can be skipped when building only for java
Closes facebook#557

Reviewed By: dkgi

Differential Revision: D4387800

Pulled By: sblackshear

fbshipit-source-id: 1662f7b
  • Loading branch information
Gautam Korlam authored and facebook-github-bot committed Jan 10, 2017
1 parent af83d1e commit 9174db0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -e
# try to pull submodules if we are in a git repo
# might fail if git is not installed (how did you even checkout the
# repo in the first place?)
if test -d '.git'; then
if test -d '.git' && [ -z "$SKIP_SUBMODULES" ] ; then
printf 'git repository detected, updating submodule... '
git submodule update --init > /dev/null
printf 'done\n'
Expand Down
6 changes: 5 additions & 1 deletion build-infer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ install_opam_deps

echo "preparing build... "
if [ ! -f .release ]; then
./autogen.sh > /dev/null
if [ "$BUILD_CLANG" = "no" ]; then
SKIP_SUBMODULES=true ./autogen.sh > /dev/null
else
./autogen.sh > /dev/null
fi
fi

if [ "$BUILD_CLANG" = "no" ]; then
Expand Down

0 comments on commit 9174db0

Please sign in to comment.