Pārlūkot izejas kodu

Fixes for legacy build.

woollybah 10 gadi atpakaļ
vecāks
revīzija
fcc6d16363
3 mainītis faili ar 26 papildinājumiem un 11 dzēšanām
  1. 25 9
      bmk_make.bmx
  2. 0 1
      bmk_ng.bmx
  3. 1 1
      bmk_util.bmx

+ 25 - 9
bmk_make.bmx

@@ -251,7 +251,7 @@ Type TBuildManager
 								
 								CompileBMX m.path, m.obj_path, m.bcc_opts
 	
-								m.iface_time = time_(0)
+								m.iface_time = time_(Null)
 					
 							End If
 
@@ -274,7 +274,7 @@ Type TBuildManager
 								
 								Fasm2As m.path, m.obj_path
 	
-								m.asm_time = time_(0)
+								m.asm_time = time_(Null)
 					
 							End If
 							
@@ -308,7 +308,7 @@ Type TBuildManager
 
 								End If
 								
-								m.obj_time = time_(0)
+								m.obj_time = time_(Null)
 
 							End If
 						Case STAGE_LINK
@@ -326,9 +326,9 @@ Type TBuildManager
 									End If
 
 									CreateArc m.arc_path, objs
-									m.arc_time = FileTime(m.arc_path)
-									
-									m.obj_time = time_(0)
+
+									m.arc_time = time_(Null)
+									m.obj_time = time_(Null)
 					
 								End If
 							Else
@@ -354,13 +354,29 @@ Type TBuildManager
 
 									LinkApp opt_outfile, links, False, globals.Get("ld_opts")
 
-									m.obj_time = time_(0)
+									m.obj_time = time_(Null)
 								End If
 
 							End If
 
 					End Select
 
+				Else If Match(m.ext, "s") Then
+
+					If m.time > m.obj_time Then ' object is older or doesn't exist
+						m.requiresBuild = True
+					End If
+
+					If m.requiresBuild Then
+					
+						If processor.BCCVersion() = "BlitzMax" Then
+							Assemble m.path, m.obj_path
+						Else
+							CompileC m.path, m.obj_path, m.cc_opts
+						End If
+						
+					End If
+			
 				Else
 					' c/c++ source
 					If m.time > m.obj_time Then ' object is older or doesn't exist
@@ -375,7 +391,7 @@ Type TBuildManager
 
 						CompileC m.path, m.obj_path, m.cc_opts
 						
-						m.obj_time = time_(0)
+						m.obj_time = time_(Null)
 					End If
 				End If
 				
@@ -386,7 +402,7 @@ Type TBuildManager
 ?
 
 		Next
-		
+	
 		If app_build Then
 		
 			' post process

+ 0 - 1
bmk_ng.bmx

@@ -340,7 +340,6 @@ Type TBMK
 			Local t$="mkdir "
 			If cmd.StartsWith( t ) And FileType( cmd[t.length..] ) Return False
 		EndIf
-		
 ?threaded
 		processManager.DoSystem(cmd, src)
 ?Not threaded

+ 1 - 1
bmk_util.bmx

@@ -127,7 +127,7 @@ Function CreateArc( path$ , oobjs:TList )
 	If processor.Platform() = "win32"
 		For t$=EachIn oobjs
 			If Len(cmd)+Len(t)>1000
-				If Sys( cmd )
+				If processor.Sys( cmd )
 					DeleteFile path
 					Throw "Build Error: Failed to create archive "+path
 				EndIf