Skip to content

Commit

Permalink
make-binaries: Simplify setting of ERL_DIST_PORT
Browse files Browse the repository at this point in the history
The default ERL_DIST_PORT value can now be specified as an environment
variable at build time (since commit
cc25bb0).
  • Loading branch information
weiss committed Dec 4, 2023
1 parent 75a5dea commit 9d61885
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/make-binaries
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,14 @@ build_rel()
if [ "$mode" = 'native' ]
then
ERL_COMPILER_OPTIONS="$erl_compiler_options" \
ERL_DIST_PORT='3470' \
rebar3 as "$(rebar3_profile "$mode")" tar
else
ln -s "$prefix/lib" # As expected by the 'cross' profile.
ei_inc="$prefix/lib/erlang/lib/erl_interface-"*'/include'
ei_lib="$prefix/lib/erlang/lib/erl_interface-"*'/lib'
ERL_COMPILER_OPTIONS="$erl_compiler_options" \
ERL_DIST_PORT='3470' \
ERL_EI_INCLUDE_DIR=$(ls -1d $ei_inc) \
ERL_EI_LIBDIR=$(ls -1d $ei_lib) \
LDLIBS='-lpthread' \
Expand All @@ -484,8 +486,6 @@ build_rel()
info "Editing $rel_name $rel_vsn for $arch-$libc ..."
mkdir "$target_dst_dir"
tar -C "$target_dst_dir" -xzf "$rel_dir/$rel_tar"
sed -i 's/^dist_port="${ERL_DIST_PORT:-}"/dist_port="${ERL_DIST_PORT:-3470}"/' \
"$target_dst_dir/bin/${rel_name}ctl"
find "$target_dst_dir/lib" -type f -name 'otp_test_engine.so' \
-delete # Remove shared object file used only in test suite.
find "$target_dst_dir/lib/crypto-"* "$target_dst_dir/lib/asn1-"* \
Expand Down

0 comments on commit 9d61885

Please sign in to comment.