On windows, prepend CWD to PATH before invoking Generic target make command
authorEdouard Tisserant
Sat, 29 Mar 2014 14:49:48 +0100
changeset 1402 49441045b192
parent 1401 611fded24ce4
child 1403 dd6d40094782
On windows, prepend CWD to PATH before invoking Generic target make command
targets/toolchain_makefile.py
--- 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