From 32165ac3928ba8bd84bdedb72505b9fb339579d9 Mon Sep 17 00:00:00 2001
From: Terraneo Federico <fede.tft@miosix.org>
Date: Mon, 31 Mar 2014 00:44:18 +0000
Subject: [PATCH] Avoid using bash in makefiles to allow building from windows

---
 Makefile                          | 8 ++------
 miosix/_doc/textdoc/Changelog.txt | 2 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index a946a513..b88e2d55 100644
--- a/Makefile
+++ b/Makefile
@@ -53,14 +53,10 @@ program:
 	$(PROGRAM_CMDLINE)
 
 all-recursive:
-	@for i in $(SUBDIRS); do  \
-		$(MAKE) -C $$i FOLDER="$(FOLDER) $$i/" || exit 1;  \
-	done
+	$(foreach i,$(SUBDIRS),$(MAKE) -C $(i) FOLDER="$(FOLDER) $(i)/" || exit 1;)
 
 clean-recursive:
-	@for i in $(SUBDIRS); do  \
-		$(MAKE) -C $$i FOLDER="$(FOLDER) $$i/" clean  || exit 1;  \
-	done
+	$(foreach i,$(SUBDIRS),$(MAKE) -C $(i) FOLDER="$(FOLDER) $(i)/" clean || exit 1;)
 
 clean-topdir:
 	-rm -f $(OBJ) main.elf main.hex main.bin main.map $(OBJ:.o=.d)
diff --git a/miosix/_doc/textdoc/Changelog.txt b/miosix/_doc/textdoc/Changelog.txt
index 0c1f4549..392bc2b3 100644
--- a/miosix/_doc/textdoc/Changelog.txt
+++ b/miosix/_doc/textdoc/Changelog.txt
@@ -1,5 +1,7 @@
 Changelog for Miosix np embedded OS
 
+- Changed makefile: moved from bash for loops to GNU Make for loops to avoid
+  a bash dependence that makes it difficult to build Miosix under windows
 - Added servomotor driving library for stm32f4discovery and stm32vldiscovery
 - Modified BSPs to instantiate the new classes
 - Changed basicFilesystemSetup() to take a pointer to a device to mount as /sd
-- 
GitLab