[gnoduino] add missing include generation on libs compiler functions



commit 41161394d6b7a4f56ce10d2c31be45dc94accad9
Author: Lucian Langa <lucilanga gnome org>
Date:   Sat Mar 3 22:14:41 2012 +0100

    add missing include generation on libs compiler functions

 src/compiler.py |    6 ++++--
 src/misc.py     |    1 -
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/compiler.py b/src/compiler.py
index b17fa9e..f4e8f82 100644
--- a/src/compiler.py
+++ b/src/compiler.py
@@ -232,6 +232,7 @@ def compile(tw, id, output, notify):
 		flags = preproc.generateCFlags(id, cont)
 		compline.extend(flags)
 		compline.extend(["-I" + os.path.join(i, "utility") for i in preproc.generateLibs(id, buf)])
+		compline.extend(misc.getArduinoIncludes())
 		compline.append(pre_file)
 		compline.append("-o"+pre_file+".o")
 		misc.printMessageLn(output, ' '.join(compline)+"\n")
@@ -257,6 +258,7 @@ def compile(tw, id, output, notify):
 			tmplibs.extend(validateLib(os.path.basename(i), tempobj, flags, output, notify))
 		compline.extend(list(set(tmplibs)))
 		compline.extend(["-I" + os.path.join(i, "utility") for i in preproc.generateLibs(id, buf)])
+		compline.extend(misc.getArduinoIncludes())
 		compline.append(id+"/core.a")
 		compline.append("-L"+id)
 		compline.append("-lm")
@@ -343,7 +345,7 @@ def validateLib(library, tempobj, flags, output, notify):
 						compline = [j for j in defc]
 						compline.append("-mmcu="+b.getBoardMCU(b.getBoard()))
 						compline.append("-DF_CPU="+b.getBoardFCPU(b.getBoard()))
-						compline.append("-I" + misc.getArduinoPath())
+						compline.extend(misc.getArduinoIncludes())
 						compline.append("-I" + os.path.join(misc.getArduinoLibsPath(), library, "utility"))
 						compline.extend(preproc.generateCFlags(id, open(i).read()))
 						compline.extend(flags)
@@ -366,7 +368,7 @@ def validateLib(library, tempobj, flags, output, notify):
 						compline = [j for j in defcpp]
 						compline.append("-mmcu="+b.getBoardMCU(b.getBoard()))
 						compline.append("-DF_CPU="+b.getBoardFCPU(b.getBoard()))
-						compline.append("-I" + misc.getArduinoPath())
+						compline.extend(misc.getArduinoIncludes())
 						compline.extend(preproc.generateCFlags(id, open(i).read()))
 						compline.extend(flags)
 						compline.append(i)
diff --git a/src/misc.py b/src/misc.py
index 39aa583..264aaec 100644
--- a/src/misc.py
+++ b/src/misc.py
@@ -80,7 +80,6 @@ def getArduinoVersion():
 		we just need to differentiate beween 1.0 and pre 1.0
 		versions of arduino"""
 	try:
-		print getArduinoFile("hardware/arduino/cores/arduino/Arduino.h")
 		if os.path.isfile(getArduinoFile("hardware/arduino/cores/arduino/Arduino.h")):
 			return 100
 	except:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]