diff options
Diffstat (limited to 'otp_build')
-rwxr-xr-x | otp_build | 84 |
1 files changed, 26 insertions, 58 deletions
@@ -2,7 +2,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2012. All Rights Reserved. +# Copyright Ericsson AB 2002-2014. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -170,6 +170,14 @@ determine_version_controller () # Special static config flags for certain platforms are set here set_config_flags () { + # + # NOTE! Do not add special flags here without a *very good* + # reason. We normally do not want "./otp_build configure" + # and "./configure" to produce different results. + # However, in the Windows case this does not matter, since + # the only supported way to build on Windows is using + # otp_build. + # # * Extra flags to pass to configure are placed in `CONFIG_FLAGS'. # * The command line is no longer added to `CONFIG_FLAGS' by # `set_config_flags'. It is instead passed directly to @@ -180,16 +188,6 @@ set_config_flags () # (in the cross compilation case the whole command line as well as # the cross configuration have been moved here). - if target_contains linux; then - XX=`echo $* | grep -v able-fp-exceptions` - if [ "$*" = "$XX" ]; then - CONFIG_FLAGS="$CONFIG_FLAGS --disable-fp-exceptions" - fi - fi - if target_contains "univel-sysv4"; then - CONFIG_FLAGS="$CONFIG_FLAGS --x-libraries=/usr/lib/X11" - fi - if target_contains free_source; then CONFIG_FLAGS="$CONFIG_FLAGS --host=$TARGET" fi @@ -262,62 +260,32 @@ create_lib_configure_in() } } -find_sum() -{ - candidates="sum cksum md5sum sha1sum" - SUM_CMD="wc" - for x in $candidates; do - if (echo foo | $x > /dev/null 2>&1); then - SUM_CMD=$x - break - fi - done -} - -chk_eq() -{ - master=$1 - shift - slaves="$@" - master_sum=`$SUM_CMD $master | awk '{print $1}'` - for x in $slaves; do - s=`$SUM_CMD $x | awk '{print $1}'` - if test "$s" != "$master_sum"; then - echo "Error: $master and $x are not equal, make sure they are!" >&2 - echo "Maybe you would want to:" >&2 - echo "for x in $slaves; do cp $master \$x; done" >&2 - echo "? Or something else is wrong." 2>&1 - exit 2 - fi - done -} - -check_config_helpers () +distribute_config_helpers () { - - aclocals="./aclocal.m4 ./lib/erl_interface/aclocal.m4 ./lib/odbc/aclocal.m4 ./lib/wx/aclocal.m4 ./lib/megaco/aclocal.m4" - install_shs="./lib/common_test/priv/auxdir/install-sh ./lib/erl_interface/src/auxdir/install-sh ./lib/test_server/src/install-sh" - config_guesses="./lib/common_test/priv/auxdir/config.guess ./lib/erl_interface/src/auxdir/config.guess ./lib/test_server/src/config.guess" - config_subs="./lib/common_test/priv/auxdir/config.sub ./lib/erl_interface/src/auxdir/config.sub ./lib/test_server/src/config.sub" + aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco" + autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/test_server/src ./lib/wx/autoconf" aclocal_master="./erts/aclocal.m4" install_sh_master="./erts/autoconf/install-sh" config_guess_master="./erts/autoconf/config.guess" config_sub_master="./erts/autoconf/config.sub" - find_sum - - chk_eq $aclocal_master $aclocals - chk_eq $install_sh_master $install_shs - chk_eq $config_guess_master $config_guesses - chk_eq $config_sub_master $config_subs + for dir in $aclocal_dirs; do + $install_sh_master -m 644 -t "$dir" "$aclocal_master" + done + for dir in $autoconf_aux_dirs; do + $install_sh_master -d "$dir" + $install_sh_master -t "$dir" "$install_sh_master" + $install_sh_master -t "$dir" "$config_guess_master" + $install_sh_master -t "$dir" "$config_sub_master" + done } do_autoconf () { create_lib_configure_in - check_config_helpers + distribute_config_helpers if target_contains win32; then # Select the correct autoconf on cygwin @@ -1308,12 +1276,12 @@ cd $ERL_TOP determine_version_controller -# Unset ERL_FLAGS and ERL_<Release>_FLAGS during bootstrap to +# Unset ERL_FLAGS and ERL_OTP<OTP Release>_FLAGS during bootstrap to # prevent potential problems -sys_vsn=`awk '/SYSTEM_VSN = / {print $3}' < erts/vsn.mk` -sys_erl_flags="ERL_${sys_vsn}_FLAGS" +otp_major_vsn=`cat OTP_VERSION | sed "s|\([0-9]*\).*|\1|"` +erl_otp_flags="ERL_OTP${otp_major_vsn}_FLAGS" unset ERL_FLAGS -#unset ${sys_erl_flags} +unset ${erl_otp_flags} # Target first guess, won't necessarily hold, may be changed for # certain parameters. |