Merge resource uniqueness fix fix
authortimothy.murphy@nokia.com
Wed, 26 May 2010 15:13:02 +0100
branchfix
changeset 576 0351d04638fa
parent 572 c1583702caf5 (diff)
parent 575 e8d124df4a90 (current diff)
child 577 70a350fada5a
Merge resource uniqueness fix
sbsv2/raptor/RELEASE-NOTES.html
--- a/sbsv2/raptor/RELEASE-NOTES.html	Wed May 26 15:06:05 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Wed May 26 15:13:02 2010 +0100
@@ -7,9 +7,10 @@
 <h1>Release Notes for Symbian Build System v2</h1>
 
 <h2>next version</h2>
-
+ 
 <h3>Defect Fixes</h3>
 <ul>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2203"> SF Bug 2203 </a> - [Raptor] Building extension makefile with SBS_BUILD_DIR set to another drive</li>
 <li>Fix : tracecompiler.mk caused poor makefile parse performance due to use of $(shell)</li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2561">SF Bug 2561</a> - [Raptor] creates incorrect .iby files w.r.t target file versions &amp; ramtargets</li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2562">SF Bug 2562</a> - [Raptor] adds incorrect entries into .iby files w.r.t file paths</li>
--- a/sbsv2/raptor/python/raptor_meta.py	Wed May 26 15:06:05 2010 +0100
+++ b/sbsv2/raptor/python/raptor_meta.py	Wed May 26 15:13:02 2010 +0100
@@ -35,6 +35,7 @@
 from mmpparser import *
 
 import time
+import generic_path
 
 
 PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML']}
@@ -768,9 +769,13 @@
 			biloc="." # Someone building with a relative raptor path
 
 		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
+		# The source root directory is SRCROOT if set in the environment
+		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
+		if 'SRCROOT' in os.environ:
+			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
+		else:
+			self.__StandardVariables['TO_ROOT'] = ""
+		
 		# Top-level bld.inf location
 		self.__StandardVariables['TO_BLDINF'] = biloc
 		self.__StandardVariables['EXTENSION_ROOT'] = eiloc
@@ -838,9 +843,12 @@
 			eiloc="." # Someone building with a relative raptor path
 
 		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
+		# The source root directory is SRCROOT if set in the environment	
+		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
+		if 'SRCROOT' in os.environ:
+			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
+		else:
+			self.__StandardVariables['TO_ROOT'] = ""
 		# Top-level bld.inf location
 		self.__StandardVariables['TO_BLDINF'] = biloc
 		# Location of bld.inf file containing the current EXTENSION block
@@ -3082,7 +3090,6 @@
 				value = options[option].replace('$(EPOCROOT)', '$(EPOCROOT)/')
 				value = value.replace('$(', '$$$$(')
 				value = value.replace('$/', '/').replace('$;', ':')
-				value = value.replace('$/', '/').replace('$;', ':')
 
 				if customInterface:
 					var.AddOperation(raptor_data.Set(option, value))
--- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Wed May 26 15:06:05 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Wed May 26 15:13:02 2010 +0100
@@ -494,15 +494,21 @@
 				self.assertTrue(testOptions.has_key(testParameter))
 				self.assertEquals(testOptions.get(testParameter), aTestParameters.get(testParameter))
 
+
 	def testBldInfExtensions(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
 		bldInfMakefilePathTestRoot = str(self.__makefilePathTestRoot)+'/metadata/project/bld.infs'			
+		if 'SRCROOT' in os.environ:
+			srcroot = os.environ['SRCROOT']
+		else:
+			srcroot = os.environ['SRCROOT'] = "x:/somesrcroot"
+		
 		depfiles = []
 		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('extensions.inf'),
 											  self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		
 		extensions = bldInfObject.getExtensions(self.ARMV5)
-		
+				
 		self.__testExtension(extensions[0],
 							'test/dummyextension1.mk',
 							{'TARGET':'dummyoutput1.exe',
@@ -511,7 +517,7 @@
 							'TOOL':'dummytool1.exe',
 							'OPTION11':'option11value',
 							'OPTION12':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
@@ -524,7 +530,7 @@
 							'TOOL':'dummytool2.exe',
 							'OPTION21':'option21value',
 							'OPTION22':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}
 							)
@@ -537,7 +543,7 @@
 							'TOOL':'dummytool3.exe',
 							'OPTION31':'option31value',
 							'OPTION32':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}
 							)
@@ -552,7 +558,7 @@
 							'TOOL':'dummytesttool1.exe',
 							'OPTIONTEST11':'optiontest11value',
 							'OPTIONTEST12':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
@@ -565,7 +571,7 @@
 							'TOOL':'dummytesttool2.exe',
 							'OPTIONTEST21':'optiontest21value',
 							'OPTIONTEST22':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)