summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--erts/aclocal.m465
-rw-r--r--erts/emulator/Makefile.in8
-rwxr-xr-xerts/emulator/utils/make_preload10
-rw-r--r--erts/etc/common/Makefile.in1
-rw-r--r--erts/etc/win32/cygwin_tools/reg_query.sh24
-rwxr-xr-xerts/etc/win32/cygwin_tools/w32_path.sh59
-rw-r--r--erts/etc/win32/msys_tools/reg_query.sh2
-rwxr-xr-xerts/etc/win32/msys_tools/w32_path.sh59
-rw-r--r--erts/etc/win32/nsis/Makefile25
-rw-r--r--erts/include/internal/ethread.h3
-rw-r--r--erts/lib_src/Makefile.in1
-rw-r--r--lib/crypto/configure.in44
-rw-r--r--lib/erl_interface/src/Makefile.in31
-rw-r--r--lib/tools/c_src/Makefile.in1
-rw-r--r--lib/wx/configure.in19
-rw-r--r--make/otp.mk.in6
-rwxr-xr-xotp_build192
17 files changed, 260 insertions, 290 deletions
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 9e2531cad9..a0df305686 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -116,8 +116,8 @@ dnl
dnl LM_WINDOWS_ENVIRONMENT
dnl
dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
+dnl Tries to determine the windows build environment, i.e.
+dnl MIXED_VC or MIXED_MINGW
dnl
AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
@@ -128,35 +128,31 @@ windows_environment_=checked
MIXED_CYGWIN=no
MIXED_MSYS=no
+dnl MIXED_VC is Microsoft Visual C++ used as standard compiler
+MIXED_VC=no
+dnl MIXED_MINGW is mingw(32|64) used as standard compiler
+MIXED_MINGW=no
+
AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
if test -x /usr/bin/msys-?.0.dll; then
CFLAGS="$CFLAGS -O2"
MIXED_MSYS=yes
AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
+ MIXED_VC=yes
+ CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC"
elif test -x /usr/bin/cygpath; then
CFLAGS="$CFLAGS -O2"
MIXED_CYGWIN=yes
AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- else
+ MIXED_VC=yes
+ CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC"
+ else
AC_MSG_RESULT([undeterminable])
AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
fi
else
AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
fi
AC_SUBST(MIXED_VC)
@@ -166,44 +162,51 @@ if test "x$MIXED_MSYS" != "xyes"; then
if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
if test -x /usr/bin/cygpath; then
CFLAGS="$CFLAGS -O2"
- MIXED_CYGWIN=yes
AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
+ MIXED_MINGW=yes
+ CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW"
else
AC_MSG_RESULT([undeterminable])
AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
fi
else
AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
fi
else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
+ AC_MSG_CHECKING(for mixed MSYS and native MinGW environment)
+ if test "x$GCC" = x"yes"; then
+ if test -x /usr/bin/msys-=.0.dll; then
+ CFLAGS="$CFLAGS -O2"
+ AC_MSG_RESULT([yes])
+ MIXED_MINGW=yes
+ CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW"
+ else
+ AC_MSG_RESULT([undeterminable])
+ AC_MSG_ERROR(Seems to be mixed windows but not with msys, cannot handle this!)
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+AC_SUBST(MIXED_MINGW)
AC_MSG_CHECKING(if we mix cygwin with any native compiler)
if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
-AC_SUBST(MIXED_CYGWIN)
-
AC_MSG_CHECKING(if we mix msys with another native compiler)
if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
-AC_SUBST(MIXED_MSYS)
-
fi
-])
-
+])
+
dnl ----------------------------------------------------------------------
dnl
dnl LM_FIND_EMU_CC
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 70718575e9..ef8854f827 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -269,8 +269,7 @@ STRIP = strip
PERL = @PERL@
MKDIR = @MKDIR@
-USING_MINGW=@MIXED_CYGWIN_MINGW@
-MIXED_MSYS=@MIXED_MSYS@
+USING_MINGW=@MIXED_MINGW@
ifeq ($(TARGET),win32)
LIB_PREFIX=
@@ -308,9 +307,6 @@ ifeq ($(TARGET), win32)
GEN_OPT_FLGS = $(OPT_LEVEL)
UNROLL_FLG =
RC=rc.sh
-ifeq ($(MIXED_MSYS), yes)
-MAKE_PRELOAD_EXTRA = -msys
-endif
ifeq ($(USING_MINGW), yes)
RES_EXT = @OBJEXT@
MAKE_PRELOAD_EXTRA += " -windres"
@@ -1215,7 +1211,7 @@ DEP_FLAGS=-MM $(subst -O2,,$(CFLAGS)) $(INCLUDES) -I../etc/win32 \
-Idrivers/common -Idrivers/$(ERLANG_OSTYPE) \
-Inifs/common -Inifs/$(ERLANG_OSTYPE)
-# ifeq (@MIXED_CYGWIN_VC@,yes)
+# ifeq (@MIXED_VC@,yes)
# VC++ used for compiling. If __GNUC__ is defined we will include
# other headers then when compiling which will result in faulty
# dependencies.
diff --git a/erts/emulator/utils/make_preload b/erts/emulator/utils/make_preload
index 0cd3509b62..04163bc63b 100755
--- a/erts/emulator/utils/make_preload
+++ b/erts/emulator/utils/make_preload
@@ -40,7 +40,6 @@ use File::Basename;
my $gen_rc = 0;
my $gen_old = 0;
my $windres = 0;
-my $msys = 0;
my $file;
my $progname = basename($0);
@@ -51,8 +50,6 @@ while (@ARGV && $ARGV[0] =~ /^-(\w+)/) {
$gen_rc = 1;
} elsif ($opt eq '-windres') {
$windres = 1;
- } elsif ($opt eq '-msys') {
- $msys = 1;
} elsif ($opt eq '-old') {
$gen_old = 1;
} else {
@@ -73,12 +70,7 @@ foreach $file (@ARGV) {
my $module = basename($file, ".beam");
if ($gen_rc) {
my $win_file;
- if ($msys) {
- ($win_file) = split("\n", `(msys2win_path.sh $file)`);
- } else {
- ($win_file) = split("\n", `(cygpath -d $file 2>/dev/null || cygpath -w $file)`);
- }
- $win_file =~ s&\\&\\\\&g;
+ ($win_file) = split("\n", `(w32_path.sh -d $file)`);
print "$num ERLANG_CODE \"$win_file\"\n";
push(@modules, " ", -s $file, "L, $num, ",
length($module), ",\"$module\",\n");
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
index 3a03374fbf..7173eb6595 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
@@ -23,7 +23,6 @@ include $(ERL_TOP)/make/target.mk
ERTS_LIB_TYPEMARKER=.$(TYPE)
-USING_MINGW=@MIXED_CYGWIN_MINGW@
USING_VC=@MIXED_VC@
ifeq ($(TYPE),debug)
diff --git a/erts/etc/win32/cygwin_tools/reg_query.sh b/erts/etc/win32/cygwin_tools/reg_query.sh
new file mode 100644
index 0000000000..c5c2566b7a
--- /dev/null
+++ b/erts/etc/win32/cygwin_tools/reg_query.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+BAT_FILE=/tmp/w$$.bat
+if [ -z "$1" -o -z "$2" ]; then
+ echo "Usage:" "$0" '<key> <valuename>'
+ exit 1
+fi
+BACKED=`echo "$1" | sed 's,/,\\\\,g'`
+# We need to get the 64bit part of the registry, hence we need to execute
+# a 64bit reg.exe, but c:\windows\system32 is redirected to 32bit versions
+# if we are in the 32bit virtual environment, so we need to use the
+# sysnative trick to get to the 64bit executable of reg.exe (ouch!)
+if [ -d $WINDIR/sysnative ]; then
+ REG_CMD="$WINDIR\\sysnative\\reg.exe"
+else
+ REG_CMD="reg.exe"
+fi
+cat > $BAT_FILE <<EOF
+@echo off
+$REG_CMD query "$BACKED" /v "$2"
+EOF
+#echo $BAT_FILE
+#cat $BAT_FILE
+RESULT=`cmd.exe //C $BAT_FILE`
+echo $RESULT | sed "s,.*$2 REG_[^ ]* ,,"
diff --git a/erts/etc/win32/cygwin_tools/w32_path.sh b/erts/etc/win32/cygwin_tools/w32_path.sh
new file mode 100755
index 0000000000..3b67ec853a
--- /dev/null
+++ b/erts/etc/win32/cygwin_tools/w32_path.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+WIN32=false
+SEPARATOR=""
+ABSOLUTE=""
+UNIX=false
+done=false
+while [ $done = false ]; do
+ case "$1" in
+ -w)
+ WIN32=true;
+ SEPARATOR=backslash;
+ shift;;
+ -d)
+ WIN32=true;
+ SEPARATOR=double;
+ shift;;
+ -m)
+ WIN32=true;
+ SEPARATOR=slash;
+ shift;;
+ -u)
+ UNIX=true;
+ shift;;
+ -a)
+ ABSOLUTE="-a";
+ shift;;
+
+ *)
+ done=true;;
+ esac
+done
+
+if [ $WIN32 = false -a $UNIX = false ]; then
+ echo "Usage: $0 -m|-w|-d|-u [-a] <path>" >&2
+ exit 1;
+fi
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 -m|-w|-u [-a] <path>" >&2
+ exit 1;
+fi
+
+if [ $UNIX = true ]; then
+ echo `cygpath $ABSOLUTE -u $1`
+else
+ case "$SEPARATOR" in
+ slash)
+ echo `cygpath $ABSOLUTE -m $1`;
+ ;;
+ backslash)
+ echo `cygpath $ABSOLUTE -w $1`;
+ ;;
+ double)
+ DOUBLE=`cygpath $ABSOLUTE -w $1 | sed 's,\\\\,\\\\\\\\,g'`;
+ echo $DOUBLE
+ ;;
+ esac
+fi
diff --git a/erts/etc/win32/msys_tools/reg_query.sh b/erts/etc/win32/msys_tools/reg_query.sh
index ae6d5c3218..70a7bf0d17 100644
--- a/erts/etc/win32/msys_tools/reg_query.sh
+++ b/erts/etc/win32/msys_tools/reg_query.sh
@@ -7,7 +7,7 @@ fi
BACKED=`echo "$1" | sed 's,/,\\\\,g'`
# We need to get the 64bit part of the registry, hence we need to execute
# a 64bit reg.exe, but c:\windows\system32 is redirected to 32bit versions
-# if we ate in the 32bit virtual environment, why we need to use the
+# if we are in the 32bit virtual environment, so we need to use the
# sysnative trick to get to the 64bit executable of reg.exe (ouch!)
if [ -d $WINDIR/sysnative ]; then
REG_CMD="$WINDIR\\sysnative\\reg.exe"
diff --git a/erts/etc/win32/msys_tools/w32_path.sh b/erts/etc/win32/msys_tools/w32_path.sh
new file mode 100755
index 0000000000..9a5089391d
--- /dev/null
+++ b/erts/etc/win32/msys_tools/w32_path.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+WIN32=false
+SEPARATOR=""
+ABSOLUTE=""
+UNIX=false
+done=false
+while [ $done = false ]; do
+ case "$1" in
+ -w)
+ WIN32=true;
+ SEPARATOR=backslash;
+ shift;;
+ -d)
+ WIN32=true;
+ SEPARATOR=double;
+ shift;;
+ -m)
+ WIN32=true;
+ SEPARATOR=slash;
+ shift;;
+ -u)
+ UNIX=true;
+ shift;;
+ -a)
+ ABSOLUTE="-a";
+ shift;;
+
+ *)
+ done=true;;
+ esac
+done
+
+if [ $WIN32 = false -a $UNIX = false ]; then
+ echo "Usage: $0 -m|-w|-d|-u [-a] <path>" >&2
+ exit 1;
+fi
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 -m|-w|-u [-a] <path>" >&2
+ exit 1;
+fi
+
+if [ $UNIX = true ]; then
+ echo `win2msys_path.sh $ABSOLUTE $1`
+else
+ case "$SEPARATOR" in
+ slash)
+ echo `msys2win_path.sh -m $ABSOLUTE -m $1`;
+ ;;
+ backslash)
+ echo `msys2win_path.sh $ABSOLUTE $1`;
+ ;;
+ double)
+ DOUBLE=`msys2win_path.sh $ABSOLUTE $1 | sed 's,\\\\,\\\\\\\\,g'`;
+ echo $DOUBLE
+ ;;
+ esac
+fi
diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile
index 0b4e0d0359..c541d2b293 100644
--- a/erts/etc/win32/nsis/Makefile
+++ b/erts/etc/win32/nsis/Makefile
@@ -27,7 +27,7 @@ MAKENSIS = makensis
MAKENSISFLAGS = /V2
CUSTOM_MODERN=custom_modern.exe
-# This is not the way we usually do in our makefiles,
+# This is not the way we usually do in our makefiles,
# but making release is the ONLY thing we do with this one,
# Its not called during ordinary recursive make.
all: release
@@ -44,23 +44,12 @@ TARGET_DIR = $(RELEASE_PATH)
ifdef MSYSTEM
ifeq ($(MSYSTEM),$(filter $(MSYSTEM),MSYS MINGW32 MINGW64))
- USEMSYS := true
+ MAKENSISFLAGS = //V2
endif
endif
-ifeq ($(USEMSYS),true)
-
- MAKENSISFLAGS = //V2
- WTESTROOT=$(shell (msys2win_path.sh "$(RELEASE_PATH)"))
- WTARGET_DIR=$(shell (msys2win_path.sh "$(TARGET_DIR)"))
-
-else
-
- MAKENSISFLAGS = /V2
- WTESTROOT=$(shell (cygpath -d "$(RELEASE_PATH)" 2>/dev/null || cygpath -w "$(RELEASE_PATH)"))
- WTARGET_DIR=$(shell (cygpath -d "$(TARGET_DIR)" 2>/dev/null || cygpath -d "$(TARGET_DIR)"))
-
-endif
+WTESTROOT=$(shell (w32_path.sh -d "$(RELEASE_PATH)"))
+WTARGET_DIR=$(shell (w32_path.sh -d "$(TARGET_DIR)"))
ifeq ($(CONFIG_SUBTYPE),win64)
WINTYPE=win64
@@ -69,11 +58,7 @@ else
endif
REDIST_FILE=$(shell (sh ./find_redist.sh || echo ""))
-ifeq ($(USEMSYS),true)
- NICEREDISTFILE=$(shell (msys2win_path.sh -m "$(REDIST_FILE)" 2>/dev/null || echo ""))
-else
- NICEREDISTFILE=$(shell (cygpath -d -m "$(REDIST_FILE)" 2>/dev/null || echo ""))
-endif
+NICEREDISTFILE=$(shell (w32_path.sh -d "$(REDIST_FILE)" 2>/dev/null || echo ""))
REDIST_TARGET=$(shell (sh ./find_redist.sh -n || echo ""))
REDIST_DLL_VERSION=$(shell (sh ./dll_version_helper.sh $(NICEREDISTFILE) || echo ""))
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h
index fa35bf3d0b..2fe826226c 100644
--- a/erts/include/internal/ethread.h
+++ b/erts/include/internal/ethread.h
@@ -54,8 +54,7 @@
#endif
#if defined(ETHR_DEBUG) || !defined(ETHR_INLINE) || ETHR_XCHK \
- || (defined(__GNUC__) && defined(ERTS_MIXED_CYGWIN_VC)) \
- || (defined(__GNUC__) && defined(ERTS_MIXED_MSYS_VC))
+ || (defined(__GNUC__) && defined(ERTS_MIXED_VC))
# undef ETHR_INLINE
# define ETHR_INLINE
# undef ETHR_FORCE_INLINE
diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in
index 1da11c2d0a..df87100a44 100644
--- a/erts/lib_src/Makefile.in
+++ b/erts/lib_src/Makefile.in
@@ -152,7 +152,6 @@ ERTS_INCL_INT=../include/internal
INCLUDES=-I$(ERTS_INCL) -I$(ERTS_INCL)/$(TARGET) -I$(ERTS_INCL_INT) -I$(ERTS_INCL_INT)/$(TARGET)
INCLUDES += -I../emulator/beam -I../emulator/sys/$(ERLANG_OSTYPE)
-USING_MINGW=@MIXED_CYGWIN_MINGW@
USING_VC=@MIXED_VC@
ifeq ($(USING_VC),yes)
diff --git a/lib/crypto/configure.in b/lib/crypto/configure.in
index a3b6673f29..5f270e8ffb 100644
--- a/lib/crypto/configure.in
+++ b/lib/crypto/configure.in
@@ -84,7 +84,7 @@ elif test "x$with_ssl_zlib" = "xyes" || test "x$with_ssl_zlib" = "x"; then
AC_MSG_WARN([Cannot search for zlib; missing cross system root (erl_xcomp_sysroot).])
SSL_LINK_WITH_ZLIB=no
STATIC_ZLIB_LIBS=
- elif test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
+ elif test "$host_os" = "win32"; then
SSL_LINK_WITH_ZLIB=no
STATIC_ZLIB_LIBS=
else
@@ -216,46 +216,18 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
# of Shining Light OpenSSL, which can be found by poking in
# the uninstall section in the registry, it's worth a try...
extra_dir=""
- if test "x$MIXED_CYGWIN" = "xyes"; then
- AC_CHECK_PROG(REGTOOL, regtool, regtool, false)
- if test "$ac_cv_prog_REGTOOL" != false; then
- wrp="/machine/software/microsoft/windows/currentversion/"
- if test "x$ac_cv_sizeof_void_p" = "x8"; then
- urp="uninstall/openssl (64-bit)_is1/inno setup: app path"
- regtool_subsystem=-w
- else
- urp="uninstall/openssl (32-bit)_is1/inno setup: app path"
- regtool_subsystem=-W
- fi
- rp="$wrp$urp"
- if regtool -q $regtool_subsystem get "$rp" > /dev/null; then
- true
- else
- # Fallback to unspecified wordlength
- urp="uninstall/openssl_is1/inno setup: app path"
- rp="$wrp$urp"
- fi
- if regtool -q $regtool_subsystem get "$rp" > /dev/null; then
- ssl_install_dir=`regtool -q $regtool_subsystem get "$rp"`
- # Try hard to get rid of spaces...
- if cygpath -d "$ssl_install_dir" > /dev/null 2>&1; then
- ssl_install_dir=`cygpath -d "$ssl_install_dir"`
- fi
- extra_dir=`cygpath $ssl_install_dir`
- fi
- fi
- elif test "x$MIXED_MSYS" = "xyes"; then
+ if test "$host_os" = "win32"; then
AC_CHECK_PROG(REGTOOL, reg_query.sh, reg_query.sh, false)
if test "$ac_cv_prog_REGTOOL" != false; then
if test "x$ac_cv_sizeof_void_p" = "x8"; then
rp="HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/OpenSSL (64-bit)_is1"
else
rp="HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/OpenSSL_is1"
- fi
+ fi
key="Inno Setup: App Path"
if "$ac_cv_prog_REGTOOL" "$rp" "$key" > /dev/null; then
ssl_install_dir=`"$ac_cv_prog_REGTOOL" "$rp" "$key"`
- extra_dir=`win2msys_path.sh "$ssl_install_dir"`
+ extra_dir=`win32_path.sh "$ssl_install_dir"`
fi
fi
fi
@@ -267,7 +239,7 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
SSL_CRYPTO_LIBNAME=crypto
SSL_SSL_LIBNAME=ssl
- if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
+ if test "$host_os" = "win32" ; then
if test "x$ac_cv_sizeof_void_p" = "x8"; then
std_win_ssl_locations="/cygdrive/c/OpenSSL-Win64 /c/OpenSSL-Win64 /opt/local64/pgm/OpenSSL"
else
@@ -284,7 +256,7 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then
is_real_ssl=yes
SSL_INCDIR="$dir"
- if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
+ if test "$host_os" = "win32" ; then
if test -f "$dir/lib/VC/libeay32.lib"; then
SSL_RUNTIME_LIBDIR="$rdir/lib/VC"
SSL_LIBDIR="$dir/lib/VC"
@@ -365,7 +337,7 @@ yes
])
CPPFLAGS=$old_CPPFLAGS
if test "x$ssl_found" = "xyes"; then
- if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
+ if test "x$host_os" = "xwin32" ; then
ssl_linkable=yes
elif test "x${SSL_CRYPTO_LIBNAME}" = "xsslcrypto"; then
# This should only be triggered seen OSE
@@ -485,7 +457,7 @@ dnl so it is - be adoptable
SSL_INCDIR="$with_ssl_incl"
SSL_CRYPTO_LIBNAME=crypto
SSL_SSL_LIBNAME=ssl
- if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes" && test -d "$with_ssl/lib/VC"; then
+ if test "x$host_os" = "xwin32" && test -d "$with_ssl/lib/VC"; then
if test -f "$with_ssl/lib/VC/libeay32.lib"; then
SSL_LIBDIR="$with_ssl/lib/VC"
SSL_CRYPTO_LIBNAME=libeay32
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
index 6e0d3476c7..5dee4dc5ed 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
@@ -52,9 +52,7 @@ APPUP_FILE= erl_interface.appup
APPUP_SRC= $(APPUP_FILE).src
APPUP_TARGET= $(EBINDIR)/$(APPUP_FILE)
-USING_MINGW=@MIXED_CYGWIN_MINGW@
-USING_MSYS_VC==@MIXED_MSYS_VC@
-USING_CYGWIN_VC==@MIXED_MSYS_VC@
+USING_MINGW=@MIXED_MINGW@
USING_VC=@MIXED_VC@
ifdef TESTROOT
@@ -790,22 +788,17 @@ $(TARGET)/depend.mk: $(TARGET)/config.h
$(gen_verbose)
$(V_colon)echo "Generating dependency file depend.mk..."
@echo "# Generated dependency rules" > $@
- $(V_CC) $(CFLAGS) -MM $(SOURCES) | \
- sed 's&$(TARGET)&\$$\(TARGET\)&g' | \
- sed 's/^.*:/\$$\(ST_OBJDIR\)\/&/' >> $@
- @echo >> $@
- $(V_CC) $(CFLAGS) -MM $(SOURCES) | \
- sed 's&$(TARGET)&\$$\(TARGET\)&g' | \
- sed 's/^.*:/\$$\(MT_OBJDIR\)\/&/' >> $@
- @echo >> $@
- $(V_CC) $(CFLAGS) -MM $(SOURCES) | \
- sed 's&$(TARGET)&\$$\(TARGET\)&g' | \
- sed 's/^.*:/\$$\(MD_OBJDIR\)\/&/' >> $@
- @echo >> $@
- $(V_CC) $(CFLAGS) -MM $(SOURCES) | \
- sed 's&$(TARGET)&\$$\(TARGET\)&g' | \
- sed 's/^.*:/\$$\(MDD_OBJDIR\)\/&/' >> $@
- @echo >> $@
+ $(V_CC) $(CFLAGS) -MM $(SOURCES) | \
+ sed 's&$(TARGET)&\$$\(TARGET\)&g' > $@.$$$$; \
+ sed 's/^.*:/\$$\(ST_OBJDIR\)\/&/' < $@.$$$$ >> $@; \
+ echo >> $@; \
+ sed 's/^.*:/\$$\(MT_OBJDIR\)\/&/' < $@.$$$$ >> $@; \
+ echo >> $@; \
+ sed 's/^.*:/\$$\(MD_OBJDIR\)\/&/' < $@.$$$$ >> $@; \
+ echo >> $@; \
+ sed 's/^.*:/\$$\(MDD_OBJDIR\)\/&/' < $@.$$$$ >> $@; \
+ echo >> $@; \
+ rm -f $@.$$$$
# For some reason this has to be after 'opt' target
-include $(TARGET)/depend.mk
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
index 289322b6fa..19f1fd746b 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
@@ -22,7 +22,6 @@ include $(ERL_TOP)/make/output.mk
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/erts/include/internal/$(TARGET)/ethread.mk
-USING_MINGW=@MIXED_CYGWIN_MINGW@
USING_VC=@MIXED_VC@
CC=@CC@
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index f35e6cdbd0..9e62d81c5f 100644
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -82,7 +82,7 @@ LM_WINDOWS_ENVIRONMENT
USER_CFLAGS=$CFLAGS
-if test X"$MIXED_CYGWIN_VC" = X"yes" -o X"$MIXED_MSYS_VC" = X"yes"; then
+if test X"$MIXED_VC" = X"yes" ; then
CFLAGS="-Owx"
fi
@@ -319,7 +319,7 @@ dnl
if test "$cross_compiling" = "yes"; then
echo "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >> ./CONF_INFO
WXERL_CAN_BUILD_DRIVER=false
-elif test X"$MIXED_CYGWIN_VC" = X"no" -a X"$MIXED_MSYS_VC" = X"no"; then
+elif test X"$MIXED_VC" = X"no"; then
WX_VERSION=`wx-config --version`
case $WX_VERSION in
2.8.*)
@@ -408,24 +408,15 @@ else
fi
fi
- if test "x$MIXED_MSYS" = "xyes"; then
- CWXWIN_CONFIG=`win2msys_path.sh $wx_config_name 2>/dev/null`
- else
- CWXWIN_CONFIG=`cygpath $wx_config_name 2>/dev/null`
- fi
+ CWXWIN_CONFIG=`win32_path.sh -u $wx_config_name 2>/dev/null`
CWXWIN1=`dirname $CWXWIN_CONFIG 2>/dev/null`
CWXWIN2=`dirname $CWXWIN1 2>/dev/null`
if test -z "$PROGRAMFILES" ; then
- PROGRAMFILES=c:/Program Files
+ PROGRAMFILES="c:/Program\ Files"
fi
-
- if test "x$MIXED_MSYS" = "xyes"; then
- CWXWIN_PROG=`win2msys_path.sh "$PROGRAMFILES" 2>/dev/null`
- else
- CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null`
- fi
+ CWXWIN_PROG=`win32_path.sh -u "$PROGRAMFILES" 2>/dev/null`
CWXWIN3="$CWXWIN_PROG/wxWidgets-3.*.* $CWXWIN_PROG/wxWidgets-2.*.*"
CWXWIN4="$CWXWIN_PROG/wxMSW-3.*.* $CWXWIN_PROG/wxMSW-2.*.*"
diff --git a/make/otp.mk.in b/make/otp.mk.in
index 63748c2f2b..54ec6b7a53 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -90,12 +90,8 @@ AR = @AR@
PERL = @PERL@
LLVM_PROFDATA = @LLVM_PROFDATA@
-MIXED_CYGWIN_VC = @MIXED_CYGWIN_VC@
-MIXED_MSYS_VC = @MIXED_MSYS_VC@
MIXED_VC = @MIXED_VC@
-MIXED_CYGWIN_MINGW = @MIXED_CYGWIN_MINGW@
-MIXED_CYGWIN = @MIXED_CYGWIN@
-MIXED_MSYS = @MIXED_MSYS@
+MIXED_MINGW = @MIXED_MINGW@
BITS64 = @BITS64@
diff --git a/otp_build b/otp_build
index 244f0c3e25..76bdc8d2f8 100755
--- a/otp_build
+++ b/otp_build
@@ -65,15 +65,10 @@ usage ()
echo ""
echo "Before trying to build on windows, consider the following option"
echo " env_win32 [<arch>] - echo environment settings for win32 with visual C++, use with eval"
- echo " The optional <arch> can be x64 for 64bit Windows 7"
- echo " or x86 for 32bit Windows XP+"
+ echo " The optional <arch> can be x64 for 64bit Windows"
+ echo " or x86 for 32bit Windows"
echo " env_win64 - echo environment settings for win32 with visual C++, use with eval"
- echo " Note that env_win32 x64 gives the same result, Windows 7 64bit"
- echo " env_mingw32 - echo environment settings for win32 with MinGW, use with eval"
- echo " - experimental!"
- echo " env_msys64 - echo environment settings for win32 with visual C++ running "
- echo " msys and mingw, use with eval"
- echo " - experimental!"
+ echo " Note that env_win32 x64 gives the same result, Windows 64bit"
echo ""
echo "Before trying to build for vxworks, consider the following option"
echo " env_vxworks <cpu> - echo environment settings for vxworks, use with eval"
@@ -549,62 +544,9 @@ echo_env_vxworks ()
echo_envinfo
}
-echo_env_win32 ()
-{
- #echo_envinfo
- if [ X"$SHELL" = X"" ]; then
- echo "You need to export the shell variable first," \
- "for bourne-like shells, type:" >&2
- echo 'export SHELL' >&2
- echo "and for csh-like shells, type:" >&2
- echo 'setenv SHELL $SHELL' >&2
- echo " - then try again." >&2
- exit 1
- fi
- echo_env_erltop
- # Try to cope with paths containing unexpected things like stray
- # mixed paths (c:/something/bin) and quotes. Only C and D drive
- # handled.
- CCYGPATH=`cygpath c:\\`
- DCYGPATH=`cygpath d:\\`
- P2=`echo :$PATH | \
- sed "s,\",,g;s,:[cC]:,:$CCYGPATH,g;s,:[dD]:,:$DCYGPATH,g;s,^:,,"`
- P3=""
- save_ifs=$IFS
- IFS=:
- for p in $P2; do
- if [ -d "$p" ]; then
- C1="`(cygpath -d $p 2>/dev/null || cygpath -w $p)`" 2> /dev/null
- C2=`cygpath "$C1" 2> /dev/null` 2> /dev/null
- else
- C2=""
- fi
- if [ ! -z "$C2" ]; then
- if [ -z "$P3" ];then
- P3="$C2"
- else
- P3="$P3:$C2"
- fi
- fi
- done
- IFS=$save_ifs
- WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools"
-
-
- echo_setenv OVERRIDE_TARGET win32 ';'
- echo_setenv CC cc.sh ';'
- echo_setenv CXX cc.sh ';'
- echo_setenv AR ar.sh ';'
- echo_setenv RANLIB true ';'
- if [ -f "$ERL_TOP/erts/autoconf/win32.config.cache.static" ]; then
- echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win32.config.cache.static" ';'
- fi
- echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win32.config.cache" ';'
- echo_setenv WIN32_WRAPPER_PATH "$WIN32_WRAPPER_PATH" ';'
- echo_setenv PATH "$WIN32_WRAPPER_PATH:$P3" ';'
- echo_envinfo
-}
-
+#
+# Cygwin build without microsoft visual C++ (dead?)
+#
echo_env_mingw32 ()
{
#echo_envinfo
@@ -681,8 +623,9 @@ echo_env_mingw32 ()
# N.B. In Erlang, and the build system, win32 means windows, so we keep
# everything as terget win32, but add the CONFIG_SUBTYPE win64, which can
# be handled by configure, setting WINDOWS_64BIT in headers and such
-echo_env_win64 ()
+echo_env_cygwin ()
{
+ X64=$1
#echo_envinfo
if [ X"$SHELL" = X"" ]; then
echo "You need to export the shell variable first," \
@@ -722,80 +665,33 @@ echo_env_win64 ()
IFS=$save_ifs
WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools"
-
echo_setenv OVERRIDE_TARGET win32 ';'
- echo_setenv CONFIG_SUBTYPE win64 ';'
- echo_setenv CC cc.sh ';'
- echo_setenv CXX cc.sh ';'
- echo_setenv AR ar.sh ';'
- echo_setenv RANLIB true ';'
- if [ -f "$ERL_TOP/erts/autoconf/win64.config.cache.static" ]; then
- echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win64.config.cache.static" ';'
+ if [ X"$X64" = X"true" ]; then
+ echo_setenv CONFIG_SUBTYPE win64 ';'
fi
- echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win64.config.cache" ';'
- echo_setenv WIN32_WRAPPER_PATH "$WIN32_WRAPPER_PATH" ';'
- echo_setenv PATH "$WIN32_WRAPPER_PATH:$P3" ';'
- echo_envinfo
-}
-
-echo_env_msys32 ()
-{
- #echo_envinfo
- if [ X"$SHELL" = X"" ]; then
- echo "You need to export the shell variable first," \
- "for bourne-like shells, type:" >&2
- echo 'export SHELL' >&2
- echo "and for csh-like shells, type:" >&2
- echo 'setenv SHELL $SHELL' >&2
- echo " - then try again." >&2
- exit 1
- fi
- echo_env_erltop
- # Try to cope with paths containing unexpected things like stray
- # mixed paths (c:/something/bin) and quotes. Only C and D drive
- # handled.
- P2=`echo :$PATH | \
- sed "s,\",,g;s,:\([a-zA-Z]\):,:/\L\1,g;s,^:,,"`
- P3=""
- save_pwd=`pwd`
- save_ifs=$IFS
- IFS=:
- for p in $P2; do
- if [ -d "$p" ]; then
- C1=`(cd "$p" && cmd //C "for %i in (".") do @echo %~fsi")`
- C2=`echo "$C1" | sed 's,^\([a-zA-Z]\):\\\\,/\L\1/,;s,\\\\,/,g'`
- else
- C2=""
- fi
- if [ ! -z "$C2" ]; then
- if [ -z "$P3" ];then
- P3="$C2"
- else
- P3="$P3:$C2"
- fi
- fi
- done
- IFS=$save_ifs
- WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/msys_tools/vc:$ERL_TOP/erts/etc/win32/msys_tools"
-
- echo_setenv OVERRIDE_TARGET win32 ';'
echo_setenv CC cc.sh ';'
echo_setenv CXX cc.sh ';'
echo_setenv AR ar.sh ';'
echo_setenv RANLIB true ';'
- if [ -f "$ERL_TOP/erts/autoconf/win32.config.cache.static" ]; then
- echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win32.config.cache.static" ';'
+ if [ X"$X64" = X"true" ]; then
+ if [ -f "$ERL_TOP/erts/autoconf/win64.config.cache.static" ]; then
+ echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win64.config.cache.static" ';'
+ fi
+ echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win64.config.cache" ';'
+ else
+ if [ -f "$ERL_TOP/erts/autoconf/win32.config.cache.static" ]; then
+ echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win32.config.cache.static" ';'
+ fi
+ echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win32.config.cache" ';'
fi
-
- echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win32.config.cache" ';'
echo_setenv WIN32_WRAPPER_PATH "$WIN32_WRAPPER_PATH" ';'
echo_setenv PATH "$WIN32_WRAPPER_PATH:$P3" ';'
echo_envinfo
}
-
-echo_env_msys64 ()
+echo_env_msys ()
{
+ X64=$1
#echo_envinfo
if [ X"$SHELL" = X"" ]; then
echo "You need to export the shell variable first," \
@@ -835,22 +731,29 @@ echo_env_msys64 ()
WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/msys_tools/vc:$ERL_TOP/erts/etc/win32/msys_tools"
echo_setenv OVERRIDE_TARGET win32 ';'
- echo_setenv CONFIG_SUBTYPE win64 ';'
+ if [ X"$X64" = X"true" ]; then
+ echo_setenv CONFIG_SUBTYPE win64 ';'
+ fi
echo_setenv CC cc.sh ';'
echo_setenv CXX cc.sh ';'
echo_setenv AR ar.sh ';'
echo_setenv RANLIB true ';'
- if [ -f "$ERL_TOP/erts/autoconf/win64.config.cache.static" ]; then
- echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win64.config.cache.static" ';'
+ if [ X"$X64" = X"true" ]; then
+ if [ -f "$ERL_TOP/erts/autoconf/win64.config.cache.static" ]; then
+ echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win64.config.cache.static" ';'
+ fi
+ echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win64.config.cache" ';'
+ else
+ if [ -f "$ERL_TOP/erts/autoconf/win32.config.cache.static" ]; then
+ echo_setenv OVERRIDE_CONFIG_CACHE_STATIC "$ERL_TOP/erts/autoconf/win32.config.cache.static" ';'
+ fi
+ echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win32.config.cache" ';'
fi
-
- echo_setenv OVERRIDE_CONFIG_CACHE "$ERL_TOP/erts/autoconf/win64.config.cache" ';'
echo_setenv WIN32_WRAPPER_PATH "$WIN32_WRAPPER_PATH" ';'
echo_setenv PATH "$WIN32_WRAPPER_PATH:$P3" ';'
echo_envinfo
}
-
lookup_prog_in_path ()
{
PROG=$1
@@ -1257,24 +1160,25 @@ case "$1" in
do_debuginfo_win32 "$2";;
env_win32)
if [ x"$2" = x"x64" -o x"$2" = x"amd64" ]; then
- if [ -x /usr/bin/msys-?.0.dll ]; then
- echo_env_msys64
- else
- echo_env_win64
- fi
+ ISX64=true
+ fi
+ if [ -x /usr/bin/msys-?.0.dll ]; then
+ echo_env_msys $ISX64
else
- if [ -x /usr/bin/msys-?.0.dll ]; then
- echo_env_msys32
- else
- echo_env_win32
- fi
+ echo_env_cygwin $ISX64
fi;;
env_mingw32)
echo_env_mingw32;;
env_win64)
- echo_env_win64;;
+ if [ -x /usr/bin/msys-?.0.dll ]; then
+ echo_env_msys true
+ else
+ echo_env_cygwin true
+ fi;;
+ env_msys32)
+ echo_env_msys;;
env_msys64)
- echo_env_msys64;;
+ echo_env_msys true;;
env_vxworks)
echo_env_vxworks "$2";;
env_cross)