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 != "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 |
2447 # we need already using another platform with compatible values. |
2455 # we need already using another platform with compatible values. |
2448 |
2456 |
2449 key = str(detail['VARIANT_HRH']) \ |
2457 key = str(detail['VARIANT_HRH']) \ |
2450 + str(detail['EPOCROOT']) \ |
2458 + str(detail['EPOCROOT']) \ |
2451 + detail['SYSTEMINCLUDE'] \ |
2459 + detail['SYSTEMINCLUDE'] \ |
2452 + detail['PLATFORM'] |
2460 + detail['PLATFORM'] \ |
|
2461 + detail['PLATMACROS'] |
2453 |
2462 |
2454 # Keep a short version of the key for use in filenames. |
2463 # Keep a short version of the key for use in filenames. |
2455 uniq = hashlib.md5() |
2464 uniq = hashlib.md5() |
2456 uniq.update(key) |
2465 uniq.update(key) |
2457 |
2466 |
2483 self.ExportPlatforms.append(exp) |
2492 self.ExportPlatforms.append(exp) |
2484 |
2493 |
2485 # Is this an unseen build platform? |
2494 # Is this an unseen build platform? |
2486 # concatenate all the values we care about in a fixed order |
2495 # concatenate all the values we care about in a fixed order |
2487 # and use that as a signature for the platform. |
2496 # and use that as a signature for the platform. |
2488 items = ['PLATFORM', 'EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE'] |
2497 items = ['PLATFORM', 'PLATMACROS', 'EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE'] |
2489 if raptor_utilities.getOSPlatform().startswith("win"): |
|
2490 items.append('PLATMACROS.WINDOWS') |
|
2491 else: |
|
2492 items.append('PLATMACROS.LINUX') |
|
2493 |
2498 |
2494 items.extend(interfaces) |
2499 items.extend(interfaces) |
2495 platform = "" |
2500 platform = "" |
2496 for i in items: |
2501 for i in items: |
2497 if i in detail: |
2502 if i in detail: |