mxe-activate: get targets from Makefile

This commit is contained in:
Tony Theodore 2013-08-21 00:50:34 +10:00
parent d7e158e0a8
commit 493e68d152
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ export MXE_DIR=`pwd`
export PATH=$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'`"
alias mxe='$MAKE -C $MXE_DIR --no-print-directory'
@ -15,7 +16,7 @@ _mxe()
prev="${COMP_WORDS[COMP_CWORD-1]}"
pkgs=$( for x in `ls -l $MXE_DIR/src/*.mk | $SED -n 's,.*src/\(.*\)\.mk,\1,p'`; do echo ${x} ; done )
tgts="i686-pc-mingw32 x86_64-w64-mingw32 i686-w64-mingw32"
tgts=$MXE_TARGET_LIST
case "${cur}" in
build-only-*_*)