sbsv2/raptor/python/raptor_make.py
changeset 674 37ee82a83d43
parent 616 24e4ef208cca
equal deleted inserted replaced
673:7ae5f757318b 674:37ee82a83d43
    74 		af = annofile
    74 		af = annofile
    75 
    75 
    76 	inOutput = False
    76 	inOutput = False
    77 
    77 
    78 	buildid = ""
    78 	buildid = ""
       
    79 	duration = "unknown"
       
    80 	availability = "unknown"
    79 	for line in af:
    81 	for line in af:
    80 		line = line.rstrip("\n\r")
    82 		line = line.rstrip("\n\r")
    81 
    83 
    82 
    84 
    83 		if not inOutput:
    85 		if not inOutput:
   184 			# emake's console output and instead extract output from its annotation
   186 			# emake's console output and instead extract output from its annotation
   185 			# file.  This is a workaround for a problem where some emake
   187 			# file.  This is a workaround for a problem where some emake
   186 			# console output is lost.  The annotation file has a copy of this
   188 			# console output is lost.  The annotation file has a copy of this
   187 			# output in the "parse" job and it turns out to be uncorrupted.
   189 			# output in the "parse" job and it turns out to be uncorrupted.
   188 			self.copyLogFromAnnoFile = (evaluator.Get("copylogfromannofile") == "true")
   190 			self.copyLogFromAnnoFile = (evaluator.Get("copylogfromannofile") == "true")
   189 			self.annoFileName = None
   191 			self.emakeCm = (len([opt for opt in self.raptor.makeOptions if opt.startswith("--emake-cm")]) > 0)
       
   192 			self.annoFileName = None # store the anno file name
   190 
   193 
   191 			if self.copyLogFromAnnoFile:
   194 			if self.copyLogFromAnnoFile:
   192 				for o in self.raptor.makeOptions:
   195 				try:
   193 					self.annoFileName = string_following("--emake-annofile=", o)
   196 					self.annoFileName = string_following("--emake-annofile=", [opt for opt in self.raptor.makeOptions if opt.startswith("--emake-annofile")][0])
   194 					if self.annoFileName:
   197 					self.raptor.Info("annofile: " + self.annoFileName)
   195 						self.raptor.Info("annofile: " + o)
   198 				except IndexError, bad_index:
   196 
   199 					cannot_use_anno_msg = "Cannot copy log from annotation file as no annotation filename was specified via the option --mo=--emake-annofile=<filename>"
   197 				if not self.annoFileName:
   200 					if self.emakeCm:
   198 					self.raptor.Info("Cannot copy log from annotation file as no annotation filename was specified via the option --mo=--emake-annofile=<filename>")
   201 						self.raptor.Error(cannot_use_anno_msg) # Only an error if requested use of cm
       
   202 					else:
       
   203 						self.raptor.Info(cannot_use_anno_msg)
   199 					self.copyLogFromAnnoFile = False
   204 					self.copyLogFromAnnoFile = False
   200 
   205 
   201 			# buffering
   206 			# buffering
   202 			self.scrambled = (evaluator.Get("scrambled") == "true")
   207 			self.scrambled = (evaluator.Get("scrambled") == "true")
   203 
   208 
   282 
   287 
   283 # generated by %s %s
   288 # generated by %s %s
   284 
   289 
   285 HOSTPLATFORM:=%s
   290 HOSTPLATFORM:=%s
   286 HOSTPLATFORM_DIR:=%s
   291 HOSTPLATFORM_DIR:=%s
       
   292 HOSTPLATFORM32_DIR:=%s
   287 OSTYPE:=%s
   293 OSTYPE:=%s
   288 FLMHOME:=%s
   294 FLMHOME:=%s
   289 SHELL:=%s
   295 SHELL:=%s
   290 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
   296 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
   291 DELETE_ON_FAILED_COMPILE:=%s 
   297 DELETE_ON_FAILED_COMPILE:=%s 
   296 include %s
   302 include %s
   297 
   303 
   298 """ 		% (  raptor.name, raptor_version.fullversion(),
   304 """ 		% (  raptor.name, raptor_version.fullversion(),
   299 			 " ".join(raptor.hostplatform),
   305 			 " ".join(raptor.hostplatform),
   300 			 raptor.hostplatform_dir,
   306 			 raptor.hostplatform_dir,
       
   307 			 raptor.hostplatform32_dir,
   301 			 self.raptor.filesystem,
   308 			 self.raptor.filesystem,
   302 			 str(self.raptor.systemFLM),
   309 			 str(self.raptor.systemFLM),
   303 			 self.shellpath,
   310 			 self.shellpath,
   304 			 self.delete_on_failed_compile,
   311 			 self.delete_on_failed_compile,
   305 			 talon_settings,
   312 			 talon_settings,
   480 				guard = ""
   487 				guard = ""
   481 			else:
   488 			else:
   482 				guard = "guard_" + hash
   489 				guard = "guard_" + hash
   483 
   490 
   484 		# generate the call to the FLM
   491 		# generate the call to the FLM
   485 		if iface is not None:
   492 		if iface is not None and not dupe:
   486 			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(self.raptor.cache), parameters, guard)
   493 			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(self.raptor.cache), parameters, guard)
   487 
   494 
   488 		# recursive includes
   495 		# recursive includes
   489 
   496 
   490 		for child in childSpecs:
   497 		for child in childSpecs: