From 757a45bcf9267cb7981d84ddb363201ccc164a1d Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Wed, 26 Sep 2018 16:28:01 +0200 Subject: [PATCH] [sdks] Debian Linux doesn't need to build MXE Debian and its derivatives include full mingw chain (both 64 and 32-bit) and so they don't need to build the toolchain at all. However, the current detection of Linux flavor takes into account only Ubuntu and all other distros are configured to *require* MXE but they do *not* build them. This commit fixes detection of distros which provide the mingw toolchain in a way that makes it easy to extend the set of compatible distributions as needed. In order to mark a distribution as one with MinGW one has to add the `:Distro:` string to the `LINUX_WITH_MINGW` make variable in `mxe.mk`. The `Distro` string is whatever the `determine-linux-flavor.sh` script returns. --- sdks/builds/mxe.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdks/builds/mxe.mk b/sdks/builds/mxe.mk index 19180fd94cd..ea784ccb928 100644 --- a/sdks/builds/mxe.mk +++ b/sdks/builds/mxe.mk @@ -3,7 +3,10 @@ ifeq ($(UNAME),Linux) LINUX_FLAVOR=$(shell ./determine-linux-flavor.sh) endif -ifeq ($(LINUX_FLAVOR),Ubuntu) +LINUX_WITH_MINGW=:Ubuntu:,:Debian: +LINUX_HAS_MINGW=$(if $(findstring :$(LINUX_FLAVOR):,$(LINUX_WITH_MINGW)),yes) + +ifeq ($(LINUX_HAS_MINGW),yes) MXE_PREFIX=/usr .PHONY: provision-mxe -- 2.11.4.GIT