Skip to content

Commit

Permalink
make-binaries: Check for native OTP installation
Browse files Browse the repository at this point in the history
Make sure a native Erlang/OTP installation is available for
bootstrapping and running Rebar3.
  • Loading branch information
weiss committed Jul 23, 2023
1 parent 39823a8 commit 382a9f6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/make-binaries
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ then
elif [ $# -eq 0 ]
then
targets="$supported_targets"
build_native='true'
else
build_native='false'
for target in "$@"
do
is_supported='false'
Expand All @@ -472,6 +474,10 @@ else
if [ "$target" = "$supported_target" ]
then
is_supported='true'
if [ "$target" = "$platform" ]
then
build_native='true'
fi
break
fi
done
Expand All @@ -487,6 +493,13 @@ else
targets="$*"
fi

if [ "$build_native" = 'false' ] && [ ! -z "${INSTALL_DIR_FOR_OTP:+x}" ]
then
error 'Native Erlang/OTP installation not found.'
error "Set INSTALL_DIR_FOR_OTP or add the '$platform' target."
exit 1
fi

if [ "${CHECK_DEPS:-true}" = 'true' ]
then
if have_browser
Expand Down

0 comments on commit 382a9f6

Please sign in to comment.