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!
pull/2106/head
Jimmy Brisson 2016-07-06 11:32:01 -05:00
parent 61ee30efb2
commit c2d66865be
1 changed files with 1 additions and 1 deletions

View File

@ -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