sbsv2/raptor/python/raptor_make.py
changeset 18 de5b887c98f7
parent 13 c327db0664bb
child 28 b8fa7dfeeaa1
equal deleted inserted replaced
14:eb060913c963 18:de5b887c98f7
    66 			yield escape(line)
    66 			yield escape(line)
    67 
    67 
    68 def AnnoFileParseOutput(annofile):
    68 def AnnoFileParseOutput(annofile):
    69 	""" A generator that extracts log output from an emake annotation file, 
    69 	""" A generator that extracts log output from an emake annotation file, 
    70 	    perform an XML-unescape on it and "yields" it line by line.  """
    70 	    perform an XML-unescape on it and "yields" it line by line.  """
    71 	af = open(annofile, "r")
    71 	if isinstance(annofile,str):
       
    72 		af = open(annofile, "r")
       
    73 	else:
       
    74 		af = annofile
    72 
    75 
    73 	inOutput = False
    76 	inOutput = False
    74 
    77 
    75 	buildid = ""
    78 	buildid = ""
    76 	for line in af:
    79 	for line in af:
   156 			usetalon_s = evaluator.Get("USE_TALON") 
   159 			usetalon_s = evaluator.Get("USE_TALON") 
   157 			self.usetalon = usetalon_s is not None and usetalon_s != ""
   160 			self.usetalon = usetalon_s is not None and usetalon_s != ""
   158 			self.talonshell = str(evaluator.Get("TALON_SHELL"))
   161 			self.talonshell = str(evaluator.Get("TALON_SHELL"))
   159 			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
   162 			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
   160 			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
   163 			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
       
   164 			
       
   165 			# work around for RVCT 2.2 failed compiles
       
   166 			delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE")
       
   167 			self.delete_on_failed_compile = ""
       
   168 			if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "":
       
   169 				self.delete_on_failed_compile = "1"
   161 
   170 
   162 			# commands
   171 			# commands
   163 			self.initCommand = evaluator.Get("initialise")
   172 			self.initCommand = evaluator.Get("initialise")
   164 			self.buildCommand = evaluator.Get("build")
   173 			self.buildCommand = evaluator.Get("build")
   165 			self.shutdownCommand = evaluator.Get("shutdown")
   174 			self.shutdownCommand = evaluator.Get("shutdown")
   269 HOSTPLATFORM_DIR:=%s
   278 HOSTPLATFORM_DIR:=%s
   270 OSTYPE:=%s
   279 OSTYPE:=%s
   271 FLMHOME:=%s
   280 FLMHOME:=%s
   272 SHELL:=%s
   281 SHELL:=%s
   273 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
   282 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
       
   283 DELETE_ON_FAILED_COMPILE:=%s 
   274 
   284 
   275 %s
   285 %s
   276 
   286 
   277 include %s
   287 include %s
   278 
   288 
   280 			 " ".join(raptor.hostplatform),
   290 			 " ".join(raptor.hostplatform),
   281 			 raptor.hostplatform_dir,
   291 			 raptor.hostplatform_dir,
   282 			 self.raptor.filesystem,
   292 			 self.raptor.filesystem,
   283 			 str(self.raptor.systemFLM),
   293 			 str(self.raptor.systemFLM),
   284 			 self.shellpath,
   294 			 self.shellpath,
       
   295 			 self.delete_on_failed_compile,
   285 			 talon_settings,
   296 			 talon_settings,
   286 			 self.raptor.systemFLM.Append('globals.mk') )
   297 			 self.raptor.systemFLM.Append('globals.mk') )
   287 
   298 
   288 		# Unless dependency processing has been eschewed via the CLI, use a .DEFAULT target to
   299 		# Unless dependency processing has been eschewed via the CLI, use a .DEFAULT target to
   289 		# trap missing dependencies (ignoring user config files that we know are usually absent)
   300 		# trap missing dependencies (ignoring user config files that we know are usually absent)