From c2d66865be9ca1b4a27c56d0960e5f320160d04c Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 6 Jul 2016 11:32:01 -0500 Subject: [PATCH] Correct batch detection algorimthm There are two shell-like things that we care about bash: does environment varible expansion with $ batch: does environment varible expansion by surrounding something with % so to detect batch, try to expand a variable on the shell with $. If you get a $ back, you are in batch! --- tools/export/gcc_arm_common.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export/gcc_arm_common.tmpl b/tools/export/gcc_arm_common.tmpl index 565c601656..824434ef04 100644 --- a/tools/export/gcc_arm_common.tmpl +++ b/tools/export/gcc_arm_common.tmpl @@ -2,7 +2,7 @@ # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded # cross-platform directory manipulation -ifeq ($(OSTYPE),) +ifeq ($(shell echo $$OS),$$OS) MAKEDIR = if not exist "$(1)" mkdir "$(1)" RM = rmdir /S /Q else