aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-05-09 20:18:53 +0200
committerLukas Larsson <[email protected]>2016-05-09 20:18:53 +0200
commit929039adce30e62592cec1e8334dab99c4581b83 (patch)
treee4362b3c7db9e9fb8f4e81086116e1daf1f72467
parent2c3faa179d8c32f99d3a7365b808cbb746b36f38 (diff)
parent98b8650d22e94a5ff839170833f691294f6276d0 (diff)
downloadotp-929039adce30e62592cec1e8334dab99c4581b83.tar.gz
otp-929039adce30e62592cec1e8334dab99c4581b83.tar.bz2
otp-929039adce30e62592cec1e8334dab99c4581b83.zip
Merge branch 'binarin/fix-build-tool-paths/PR-1023/OTP-13562'
* binarin/fix-build-tool-paths/PR-1023/OTP-13562: Fix program paths used in build process Conflicts: erts/configure.in
-rw-r--r--erts/configure.in48
-rw-r--r--lib/odbc/configure.in12
-rwxr-xr-xotp_build4
3 files changed, 38 insertions, 26 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 11c428ced7..6765f47a88 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -62,9 +62,6 @@ if test x"${ERL_TOP}/erts" != x"$srcdir"; then
fi
erl_top=${ERL_TOP}
-# Remove old configuration information
-/bin/rm -f "$ERL_TOP/erts/CONF_INFO"
-
# echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# echo X
# echo "X srcdir = $srcdir"
@@ -729,8 +726,27 @@ esac
AC_SUBST(LIBCARBON)
-dnl Check if we should/can build a sharing-preserving emulator
+_search_path=/bin:/usr/bin:/usr/local/bin:$PATH
+
+AC_PATH_PROG(RM, rm, false, $_search_path)
+if test "$ac_cv_path_RM" = false; then
+ AC_MSG_ERROR([No 'rm' command found])
+fi
+
+AC_PATH_PROG(MKDIR, mkdir, false, $_search_path)
+if test "$ac_cv_path_MKDIR" = false; then
+ AC_MSG_ERROR([No 'mkdir' command found])
+fi
+
+_search_path=
+
+# Remove old configuration information.
+# Next line should be placed after AC_PATH_PROG(RM, ...), but before
+# first output to CONN_INFO. So this is just the right place.
+$RM -f "$ERL_TOP/erts/CONF_INFO"
+
+dnl Check if we should/can build a sharing-preserving emulator
AC_MSG_CHECKING(if we are building a sharing-preserving emulator)
if test "$enable_sharing_preserving" = "yes"; then
AC_DEFINE(SHCOPY, [1],
@@ -760,27 +776,13 @@ if test "$ac_cv_prog_AR" = false; then
AC_MSG_ERROR([No 'ar' command found in PATH])
fi
-_search_path=/bin:/usr/bin:/usr/local/bin:$PATH
-
-AC_PATH_PROG(RM, rm, false, $_search_path)
-if test "$ac_cv_path_RM" = false; then
- AC_MSG_ERROR([No 'rm' command found])
-fi
-
-AC_PATH_PROG(MKDIR, mkdir, false, $_search_path)
-if test "$ac_cv_path_MKDIR" = false; then
- AC_MSG_ERROR([No 'mkdir' command found])
-fi
-
-_search_path=
-
#
# Get programs needed for building the documentation
#
## Delete previous failed configure results
if test -f doc/CONF_INFO; then
- rm doc/CONF_INFO
+ $RM doc/CONF_INFO
fi
AC_CHECK_PROGS(XSLTPROC, xsltproc)
@@ -3823,7 +3825,7 @@ if test "$enable_dtrace_test" = "yes" ; then
[$RM -f $DTRACE_2STEP_TEST
dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d conftest.$OBJEXT 2>&AS_MESSAGE_LOG_FD
if test -f $DTRACE_2STEP_TEST; then
- rm $DTRACE_2STEP_TEST
+ $RM $DTRACE_2STEP_TEST
DTRACE_ENABLED_2STEP=yes
fi],
[])
@@ -4030,7 +4032,7 @@ ssl_done=yes # Default only one run
# Remove all SKIP files from previous runs
for a in ssl crypto ssh; do
- /bin/rm -f $ERL_TOP/lib/$a/SKIP
+ $RM -f $ERL_TOP/lib/$a/SKIP
done
SSL_DYNAMIC_ONLY=$enable_dynamic_ssl
@@ -4627,7 +4629,7 @@ need_java="jinterface ic/java_src"
# Remove all SKIP files from previous runs
for a in $need_java ; do
- /bin/rm -f $ERL_TOP/lib/$a/SKIP
+ $RM -f $ERL_TOP/lib/$a/SKIP
done
if test "X$with_javac" = "Xno"; then
@@ -4678,7 +4680,7 @@ dnl this deliberately does not believe that 'gcc' is a C++ compiler
AC_CHECK_TOOLS(CXX, [$CCC c++ g++ CC cxx cc++ cl], false)
# Remove SKIP file from previous run
-/bin/rm -f $ERL_TOP/lib/orber/SKIP
+$RM -f $ERL_TOP/lib/orber/SKIP
if test "$CXX" = false; then
echo "No C++ compiler found" > $ERL_TOP/lib/orber/SKIP
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index 2871d91a1c..cb2b23d534 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -73,6 +73,16 @@ AC_CHECK_TOOL(LD, ld, '$(CC)')
AC_SUBST(LD)
+_search_path=/bin:/usr/bin:/usr/local/bin:$PATH
+
+AC_PATH_PROG(RM, rm, false, $_search_path)
+if test "$ac_cv_path_RM" = false; then
+ AC_MSG_ERROR([No 'rm' command found])
+fi
+
+_search_path=
+
+
# Sockets
#--------------------------------------------------------------------
# Check for the existence of the -lsocket and -lnsl libraries.
@@ -128,7 +138,7 @@ dnl Checks for library functions.
AC_CHECK_FUNCS([memset socket])
# ODBC
-/bin/rm -f "$ERL_TOP/lib/odbc/SKIP"
+$RM -f "$ERL_TOP/lib/odbc/SKIP"
LM_CHECK_THR_LIB
AC_SUBST(THR_DEFS)
diff --git a/otp_build b/otp_build
index 57dc2e3a9c..1b79b0b0fe 100755
--- a/otp_build
+++ b/otp_build
@@ -139,7 +139,7 @@ check_erltop ()
if [ "X$ERL_TOP" = "X" ]; then
if [ -f ./otp_build -a -f ./erts/autoconf/config.guess ]; then
ERLTOP_FORCED=true
- ERL_TOP=`/bin/pwd`
+ ERL_TOP=`pwd`
export ERL_TOP
else
echo "The environment variable ERL_TOP must be set." >&2
@@ -679,7 +679,7 @@ echo_env_erltop ()
if [ X"$ERL_TOP" = X"" -o "$ERLTOP_FORCED" = "true" ]; then
if [ -f ./otp_build ]; then
# Seems to be current directory...
- echo_setenv ERL_TOP `/bin/pwd` ';'
+ echo_setenv ERL_TOP `pwd` ';'
else
echo "You need to either set ERL_TOP first or stand in the same" \
"directory as this script resides in." >&2