Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.in: Export $MAKE to be used by other scripts #9164

Open
wants to merge 2 commits into
base: maint
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ ERTS = erts-@ERTS_VSN@
# Include verbose output variables
include $(ERL_TOP)/make/output.mk

# Export the name of the actual make(1) command for executed scripts that
# execute make again.
export MAKE

# ----------------------------------------------------------------------

#
Expand Down
14 changes: 7 additions & 7 deletions make/test_target_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ EOM

release_erlang () {
local RELEASE_ROOT="${1}"
if ! (cd $ERL_TOP && make release TYPE= release_docs DOC_TARGETS=chunks RELEASE_ROOT="${RELEASE_ROOT}"); then
if ! (cd $ERL_TOP && ${MAKE:-make} release TYPE= release_docs DOC_TARGETS=chunks RELEASE_ROOT="${RELEASE_ROOT}"); then
return 1
fi
if ! (cd "$RELEASE_ROOT" && ./Install -minimal "`pwd`"); then
return 1
fi
## Need to release both TYPE= and TYPE=$TYPE for tests to work
if [ "$TYPE" != "" ]; then
if ! (cd $ERL_TOP && make release TYPE=$TYPE RELEASE_ROOT="${RELEASE_ROOT}"); then
if ! (cd $ERL_TOP && ${MAKE:-make} release TYPE=$TYPE RELEASE_ROOT="${RELEASE_ROOT}"); then
return 1
fi
fi
Expand Down Expand Up @@ -214,7 +214,7 @@ EOF
release_erlang "${RELEASE_ROOT}" > "${RELEASE_LOG}" 2>&1
if [ $? != 0 ]
then
print_highlighted_msg $RED "\"make release RELEASE_ROOT=${RELEASE_ROOT}\" failed.\nSee ${RELEASE_LOG} for full logs"
print_highlighted_msg $RED "\"${MAKE:-make} release RELEASE_ROOT=${RELEASE_ROOT}\" failed.\nSee ${RELEASE_LOG} for full logs"
tail -30 "${RELEASE_LOG}"
exit 1
fi
Expand All @@ -231,12 +231,12 @@ then
fi
fi

make RELEASE_PATH=$MAKE_TEST_DIR release_tests_spec > $RELEASE_TEST_SPEC_LOG 2>&1
${MAKE:-make} RELEASE_PATH=$MAKE_TEST_DIR release_tests_spec > $RELEASE_TEST_SPEC_LOG 2>&1

if [ $? != 0 ]
then
cat $RELEASE_TEST_SPEC_LOG
print_highlighted_msg $RED "\"make RELEASE_PATH="$MAKE_TEST_DIR" release_tests_spec\" failed."
print_highlighted_msg $RED "\"${MAKE:-make} RELEASE_PATH="$MAKE_TEST_DIR" release_tests_spec\" failed."
exit 1
fi
if [ -z "${ARGS}" ]
Expand Down Expand Up @@ -271,11 +271,11 @@ fi
# Compile test server and configure
if [ ! -f "$ERL_TOP/lib/common_test/test_server/variables" ]; then
cd "$ERL_TOP/lib/common_test/test_server"
( make && erl -noshell -eval "ts:install()." -s init stop ) > "$INSTALL_TEST_LOG" 2>&1
( ${MAKE:-make} && erl -noshell -eval "ts:install()." -s init stop ) > "$INSTALL_TEST_LOG" 2>&1
if [ $? != 0 ]
then
cat "$INSTALL_TEST_LOG"
print_highlighted_msg $RED "\"make && erl -eval 'ts:install()'\" in common_test/test_server failed."
print_highlighted_msg $RED "\"${MAKE:-make} && erl -eval 'ts:install()'\" in common_test/test_server failed."
exit 1
fi
fi
Expand Down
Loading