From 790f13a6898287f454bc1cfd714b78b5c07a30b7 Mon Sep 17 00:00:00 2001 From: salvopitru Date: Tue, 26 Oct 2010 07:26:40 +0000 Subject: [PATCH] More safe detection of cygwin path. --- cpu/stm32w108/Makefile.stm32w108 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/stm32w108/Makefile.stm32w108 b/cpu/stm32w108/Makefile.stm32w108 index 91f0e294f..ae6c2a740 100644 --- a/cpu/stm32w108/Makefile.stm32w108 +++ b/cpu/stm32w108/Makefile.stm32w108 @@ -131,7 +131,7 @@ vpath %.s $(CONTIKI_CPU)/hal/micro/cortexm3 ifdef IAR # Check if we are in cygwin environment, so we must have paths like /cygdrive/c/... (checking TERM doesn't always work.) -ifneq ($(shell ls /cygdrive 2>/dev/null),) +ifneq (,$(findstring cygdrive,$(shell pwd))) ${info Cygwin detected.} SEDCOMMAND = sed -e '1s,\($(OBJECTDIR)\\$*\)\.o: \(.\):,\1.o : /cygdrive/\l\2,g' -e '1!s,\($(OBJECTDIR)\\$*\)\.o: \(.\):, /cygdrive/\l\2,g' -e 's,\\\([^ ]\),/\1,g' -e 's,$$, \\,' -e '$$s, \\$$,,' < $(@:.o=.P) > $(@:.o=.d) else