[gnoduino] fix missing localdir info
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] fix missing localdir info
- Date: Wed, 28 May 2014 22:19:21 +0000 (UTC)
commit 04cc4fa7750c21284a51c84edca36e7778d1a86b
Author: Lucian Langa <lucilanga gnome org>
Date: Thu May 29 00:18:53 2014 +0200
fix missing localdir info
src/compiler.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/compiler.py b/src/compiler.py
index 3c8c4fd..dd3987a 100644
--- a/src/compiler.py
+++ b/src/compiler.py
@@ -208,9 +208,12 @@ def compile(tw, id, output, notify):
compline.extend(flags)
compline.extend(["-I" + os.path.join(i, "utility") for i in preproc.generateLibs(id, buf)])
compline.extend(misc.getArduinoIncludes())
- localDir = os.path.dirname(tw.get_data("file"))
- compline.extend(["-I"+localDir])
- compline.extend(["-I"+os.path.abspath(os.path.join(localDir, ".."))])
+ compline.extend(["-I"+os.getcwd()])
+ try:
+ localDir = os.path.dirname(tw.get_data("file"))
+ compline.extend(["-I"+localDir])
+ compline.extend(["-I"+os.path.abspath(os.path.join(localDir, ".."))])
+ except: pass
compline.append(pre_file)
compline.append("-o"+pre_file+".o")
misc.printMessageLn(output, ' '.join(compline)+"\n")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]