targets/toolchain_makefile.py
changeset 1402 49441045b192
parent 1387 435965ca8b63
child 1511 91538d0c242c
--- a/targets/toolchain_makefile.py	Thu Mar 27 10:06:30 2014 +0100
+++ b/targets/toolchain_makefile.py	Sat Mar 29 14:49:48 2014 +0100
@@ -6,6 +6,15 @@
 
 includes_re =  re.compile('\s*#include\s*["<]([^">]*)[">].*')
 
+
+if os.name == 'nt':
+    # on windows, desktop shortcut launches Beremiz.py
+    # with working dir set to mingw/bin.
+    # then we prefix CWD to PATH in order to ensure that
+    # commands invoked from Makefiles will first resolve
+    # to here.
+    os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"]
+
 class toolchain_makefile():
     def __init__(self, CTRInstance):
         self.CTRInstance = CTRInstance