sbsv2/raptor/python/raptor_meta.py
branchwip
changeset 146 43570e9211f9
parent 144 b15d9b7e12af
child 150 62d9f099315d
child 151 d4605037b3b2
equal deleted inserted replaced
145:d3f40ec27032 146:43570e9211f9
  1449 			self.__debug("Set "+varname+" to " + libName)
  1449 			self.__debug("Set "+varname+" to " + libName)
  1450 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(libName)))
  1450 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(libName)))
  1451 
  1451 
  1452 		elif varname=='CAPABILITY':
  1452 		elif varname=='CAPABILITY':
  1453 			for cap in toks[1]:
  1453 			for cap in toks[1]:
       
  1454 				cap = cap.lower()
  1454 				self.__debug("Setting  "+toks[0]+": " + cap)
  1455 				self.__debug("Setting  "+toks[0]+": " + cap)
       
  1456 				if cap.lower() != "all":
       
  1457 					if not cap.startswith("-"):
       
  1458 						if not cap.startswith("+"):
       
  1459 							cap = "+" + cap	
  1455 				self.capabilities.append(cap)
  1460 				self.capabilities.append(cap)
  1456 		elif varname=='DEFFILE':
  1461 		elif varname=='DEFFILE':
  1457 			self.__defFileRoot = self.__currentMmpFile
  1462 			self.__defFileRoot = self.__currentMmpFile
  1458 			self.deffile = toks[1]
  1463 			self.deffile = toks[1]
  1459 		elif varname=='LINKAS':
  1464 		elif varname=='LINKAS':
  2196 		for i,var in enumerate(self.ResourceVariants):
  2201 		for i,var in enumerate(self.ResourceVariants):
  2197 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_TARGET_lower", self.__TARGET.lower()))
  2202 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_TARGET_lower", self.__TARGET.lower()))
  2198 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
  2203 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
  2199 
  2204 
  2200 		# Create Capability variable in one SET operation (more efficient than multiple appends)
  2205 		# Create Capability variable in one SET operation (more efficient than multiple appends)
  2201 		self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY"," ".join(self.capabilities)))
  2206 		
       
  2207 		self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY","".join(self.capabilities)))
  2202 
  2208 
  2203 		# Resolve combined capabilities as hex flags, for configurations that require them
  2209 		# Resolve combined capabilities as hex flags, for configurations that require them
  2204 		capabilityFlag1 = 0
  2210 		capabilityFlag1 = 0
  2205 		capabilityFlag2 = 0			# Always 0
  2211 		capabilityFlag2 = 0			# Always 0
  2206 
  2212 
  2207 		for capability in [c.lower() for c in self.capabilities]:
  2213 		for capability in self.capabilities:
  2208 			invert = 0
  2214 			invert = 0
  2209 
  2215 
  2210 			if capability.startswith('-'):
  2216 			if capability.startswith('-'):
  2211 				invert = 0xffffffff
  2217 				invert = 0xffffffff
  2212 				capability = capability.lstrip('-')
  2218 				capability = capability[1:]
       
  2219 			elif capability.startswith('+'):
       
  2220 				capability = capability[1:]
  2213 
  2221 
  2214 			if MMPRaptorBackend.supportedCapabilities.has_key(capability):
  2222 			if MMPRaptorBackend.supportedCapabilities.has_key(capability):
  2215 				capabilityFlag1 = capabilityFlag1 ^ invert
  2223 				capabilityFlag1 = capabilityFlag1 ^ invert
  2216 				capabilityFlag1 = capabilityFlag1 | MMPRaptorBackend.supportedCapabilities[capability]
  2224 				capabilityFlag1 = capabilityFlag1 | MMPRaptorBackend.supportedCapabilities[capability]
  2217 				capabilityFlag1 = capabilityFlag1 ^ invert
  2225 				capabilityFlag1 = capabilityFlag1 ^ invert