[xmake] Allow extension on target option

This commit is contained in:
remittor
2024-02-06 14:13:18 +03:00
parent 3527dabd59
commit 615d7ae584

View File

@@ -24,8 +24,10 @@ done
if echo "$XTARGET" | grep -E '[ "]' >/dev/null ;then if echo "$XTARGET" | grep -E '[ "]' >/dev/null ;then
die "Target config filename cannot contain spaces!" die "Target config filename cannot contain spaces!"
fi fi
TARGETCFG=$XDIR/$XTARGET.config TARGETCFG=$XDIR/$XTARGET
[ ! -f $TARGETCFG ] && die "File '$XTARGET.config' not found!" XTARGET_EXT="${XTARGET##*.}"
[ $XTARGET_EXT != config ] && TARGETCFG=$TARGETCFG.config
[ ! -f $TARGETCFG ] && die "File '"`basename $TARGETCFG`"' not found!"
CFG=$XDIR/.config CFG=$XDIR/.config