Pārlūkot izejas kodu

Added Tommo's include speedup fix.
Fixed PPC universal link issue.

git-svn-id: http://bmkng.googlecode.com/svn/trunk@18 2a3afde7-ceff-d69e-269d-2b6c215c828a

[email protected] 14 gadi atpakaļ
vecāks
revīzija
e396c61dbe
5 mainītis faili ar 32 papildinājumiem un 10 dzēšanām
  1. 2 0
      bmk.bmx
  2. 3 3
      bmk_config.bmx
  3. 18 3
      bmk_make.bmx
  4. 4 4
      bmk_ng.bmx
  5. 5 0
      bmk_util.bmx

+ 2 - 0
bmk.bmx

@@ -1,5 +1,7 @@
 '
 ' Change History :
+' 2.08 05/04/2010 - Added Tommo's include speedup fix.
+'                   Fixed PPC universal link issue.
 ' 2.07 28/01/2010 - Fixed win32 linking to include libmingw32 both at the start and end of the list. (should cover 3.9.5 and 4.x gcc's)
 ' 2.06 30/12/2009 - Added APPID variable for scripts on Mac (useful for custom plists).
 ' 2.05 10/12/2009 - Added .cc file support.

+ 3 - 3
bmk_config.bmx

@@ -5,7 +5,7 @@ Import BRL.MaxUtil
 
 Import Pub.MacOS
 
-Const BMK_VERSION:String = "2.07"
+Const BMK_VERSION:String = "2.08"
 
 Const ALL_SRC_EXTS$="bmx;i;c;m;h;cpp;cxx;mm;hpp;hxx;s;cc"
 
@@ -278,9 +278,9 @@ Function VersionInfo(gcc:String)
 ?ppc
 	s:+ "ppc"
 ?
-?win32
+'?win32
 	s:+ " / gcc " + gcc
-?
+'?
 	Print s + "~n"
 End Function
 

+ 18 - 3
bmk_make.bmx

@@ -22,6 +22,7 @@ If t EXPERIMENTAL_SPEEDUP=True
 Type TFile
 
 	Field path$,time
+	Field itime 'Tommo:added timestamp for included file
 
 	Function Create:TFile( path$,files:TList, time:Int = 0 )
 		Local f:TFile=New TFile
@@ -260,7 +261,12 @@ Function MakeSrc:TFile( src_path$,buildit, force_build:Int = False, isRequired:I
 		'incbins
 		For Local inc$=EachIn src_file.incbins
 			Local time=FileTime( inc )
-			If time>src.time src.time=time
+			'Tommo: 
+			If time > src.time Then
+				src.time = time
+				src.itime = time 'update inc timestamp 
+			End If
+			'Tommo: End of mod
 		Next
 		'includes
 		For Local inc$=EachIn src_file.includes
@@ -268,7 +274,12 @@ Function MakeSrc:TFile( src_path$,buildit, force_build:Int = False, isRequired:I
 			If Match(inc_ext,"bmx")
 				Local dep:TFile=MakeSrc(RealPath(inc),False)
 				If Not dep Continue
-				If dep.time>src.time src.time=dep.time
+				'Tommo:
+				If dep.time > src.time  'update inc timestamp 
+					src.time = dep.time
+					src.itime = dep.time
+				EndIf
+				'Tommo:End of mod
 			Else
 				Throw "Unrecognized Include file type: "+inc
 			EndIf
@@ -388,7 +399,11 @@ Function MakeSrc:TFile( src_path$,buildit, force_build:Int = False, isRequired:I
 				
 						Local i_path2$=i_path+"2",update=True
 
-						If Not opt_all And FileType( i_path2 )=FILETYPE_FILE And src.time=FileTime( src.path )
+						'Tommo:
+						If Not opt_all And FileType(i_path2) = FILETYPE_FILE ..
+								And (src.time = FileTime(src.path) Or src.time = src.itime) ' added checking for Included file timestamp
+						'Tommo: end of mod
+
 							If FileSize( i_path )=FileSize( i_path2 )
 								Local i_bytes:Byte[]=LoadByteArray( i_path )
 								Local i_bytes2:Byte[]=LoadByteArray( i_path2 )

+ 4 - 4
bmk_ng.bmx

@@ -3,9 +3,9 @@ SuperStrict
 Import BRL.Reflection
 Import BRL.Map
 Import BRL.LinkedList
-?win32
+'?win32
 Import Pub.FreeProcess
-?
+'?
 
 ?threaded
 Import BRL.Threads
@@ -350,7 +350,7 @@ Type TBMK
 	End Method
 	
 	Method GCCVersion:Int()
-?win32
+'?win32
 		Local process:TProcess = CreateProcess("gcc -v")
 		Local s:String
 		
@@ -375,7 +375,7 @@ Type TBMK
 		Wend
 		
 		Return s.toInt()
-?
+'?
 	End Method
 	
 End Type

+ 5 - 0
bmk_util.bmx

@@ -181,6 +181,11 @@ Function LinkApp( path$,lnk_files:TList,makelib )
 			EndIf
 		Next
 		cmd:+" -lSystem -framework CoreServices -framework CoreFoundation"
+		
+		If processor.CPU() = "ppc"
+			cmd:+ " -lc -lgcc_eh"
+		End If
+		
 	End If
 	
 	If processor.Platform() = "win32"