From 9d64a57b431cd33a94ed0496ee9de6fc740eae79 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Wed, 19 Feb 2014 16:10:18 +1100
Subject: mxe-activate: fix tools path and target list

---
 tools/mxe-activate | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/mxe-activate b/tools/mxe-activate
index 9ab7c9e..461b547 100644
--- a/tools/mxe-activate
+++ b/tools/mxe-activate
@@ -1,9 +1,12 @@
 export MXE_DIR=`pwd`
-export BUILD=`$MXE_DIR/tools/config.guess`
+export BUILD=`$MXE_DIR/ext/config.guess`
 export PATH=$MXE_DIR/usr/$BUILD/bin:$MXE_DIR/usr/bin:$PATH
 MAKE=`gmake --help >/dev/null 2>&1 && echo g`make
 SED=`gsed --help >/dev/null 2>&1 && echo g`sed
-MXE_TARGET_LIST="`grep 'MXE_TARGET_LIST.*:=' Makefile | $SED -n 's,^.*:= \(.*\)$,\1,p'`"
+
+MXE_TRIPLETS=`grep ^MXE_TRIPLETS Makefile | cut -d '=' -f2 | cut -d ' ' -f2- | tr ' ' ','`
+MXE_LIB_TYPES=`grep ^MXE_LIB_TYPES Makefile | cut -d '=' -f2 | cut -d ' ' -f2- | tr ' ' ','`
+MXE_TARGET_LIST=`eval "echo {$MXE_TRIPLETS}.{$MXE_LIB_TYPES}"`
 
 alias mxe='$MAKE -C $MXE_DIR --no-print-directory'
 
-- 
cgit v0.12