Merge default into my fix fix
authortimothy.murphy@nokia.com
Fri, 09 Apr 2010 14:15:32 +0100
branchfix
changeset 478 67f7e5d8e121
parent 477 ecf6886a5469 (diff)
parent 430 ac96b43f9177 (current diff)
child 479 62411a80435e
child 481 da1f0ffac201
Merge default into my fix
sbsv2/raptor/RELEASE-NOTES.html
sbsv2/raptor/python/raptor_meta.py
--- a/sbsv2/raptor/RELEASE-NOTES.html	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Fri Apr 09 14:15:32 2010 +0100
@@ -6,6 +6,15 @@
 
 <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=2297"> SF Bug 2297 </a> Python exception in raptor_meta.py when processing bld.inf file </li>
+
+</ul>
+
 <h2>version 2.13.0</h2>
 
 <h3>New Features</h3>
@@ -22,18 +31,19 @@
 <h3>Defect Fixes</h3>
 <ul>
 
-<li>                                                                  DPDEF143018      - Raptor doesn't handle spaces in GCCE installation directory correctly                                                </li>
-<li>                                                                  DPDEF143101      - GCC-E isn't tested as part of the tool checking mechanism                                                            </li>
-<li>                                                                  DPDEF141195      - Raptor doesn't handle spaces in tool paths                                                                           </li>
+<li>DPDEF143018      - Raptor doesn't handle spaces in GCCE installation directory correctly                                                </li>
+<li>DPDEF143101      - GCC-E isn't tested as part of the tool checking mechanism                                                            </li>
+<li>DPDEF141195      - Raptor doesn't handle spaces in tool paths                                                                           </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2172"> SF Bug 2172 </a> - [Raptor] Resource builds warn on encountering trigraph-like strings                                                  </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2308"> SF Bug 2308 </a> - [Raptor] PLUGIN3 TARGETTYPEs don't set resource output offsets correctly                                             </li>
-<li>                                                                  Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log.  These are not critical but are useful </li>
-<li>                                                                  Fix: remove unnecessary empty lines in log output in copylogfromannofile mode                                                           </li>
+<li>Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log.  These are not critical but are useful </li>
+<li>Fix: remove unnecessary empty lines in log output in copylogfromannofile mode                                                           </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=1939"> SF Bug 1939 </a> - [Raptor] PAGED keyword in MMP files should imply byte pair compressed                                                </li>
-<li>                                                                  DPDEF144648      - Raptor failed to build tools_deb objects under Windows XP                                                            </li>
+<li>DPDEF144648      - Raptor failed to build tools_deb objects under Windows XP                                                            </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2134"> SF Bug 2134 </a> - [Raptor] Raptor does not pass overridden make variables into its makefiles                                           </li>
-<li>                                                                  Fix : do not allow data to be paged implicitly                                                                                          </li>
-<li>                                                                  Fix : sort build configurations by name for metadata preprocessing                                                                      </li>
+<li>Fix : do not allow data to be paged implicitly</li>
+<li>Fix : Makefile Parse Performance in Resource stage is poor. Large size of included dependency files is a factor. In --no-depend-generate mode, create dependency files which only refer to other rsg/mbg files that are yet to be built - store no other dependencies.</li>
+<li>Fix : don't generate multiple copies of the same resource just because there are several target paths. Generate it once and copy that to the different target paths.</li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2302"> SF Bug 2302 </a> - sbs_filter refers to python.exe in win32/python264/                                                                  </li>
 
 </ul>
--- a/sbsv2/raptor/lib/flm/resource.flm	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm	Fri Apr 09 14:15:32 2010 +0100
@@ -59,12 +59,12 @@
         # which produces the header.
         HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
 else
-	HEADLANG:=
+        HEADLANG:=
     RESOURCEHEADER:=
 endif
 
 # we create intermediate .rpp and .d files
-INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
+INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)
 
 ################################## localisation ###########################$(GNUMKDIR)#############
 # Only make copies for full resource builds
@@ -112,19 +112,30 @@
 $(call makepath,$(INTERBASE))
 
 # common pre-processor options
+
+# We really should be using -iquote with a recent cpp.  This is a note for when we do update:
+#CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
+# -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) )
+
 CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
  -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
 
 CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
 
+# We intend to generate the resource in an intermediate location and copy to the targetpath to
+# ensure that when the "same" resource is built into separare target paths, it doesn't have to be 
+# completely recreated each time - just copied.
+RSCCOPYDIRS:=$(RSCDIR)
+
 # additional binary resource copies performed based on BINCOPYDIRS
-RSCCOPYDIRS:=
 ifneq ($(BINCOPYDIRS),)
-        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
-        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
+        RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
 endif
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
 
 ###############################################################################
+
+
 define preprocessresource
 # $(1) is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
 # $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
@@ -132,14 +143,32 @@
 
   ifeq ($(TARGET_$(call sanitise,$1)),)
     TARGET_$(call sanitise,$1):=1
-    $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
+    $(if $(FLMDEBUG),$(info <debug>preprocessresource: $(1) for $(2) LANG:$(3)</debug>))
+
+
+    # Correct dependency information when a header file can't be found.
+    # If the c preprocessor can't find a dependency it appears as it did in the #include statement
+    # e.g. "filename.mbg" or "filename.rsg" in the dependency file.
+    # we can correct the dependencies by assuming that the file will be in epoc32\include as this is the default
+    ifneq ($(NO_DEPEND_GENERATE),)
+      # This version minimises the size of dependency files, to contain only .mbg and .rsg deps.
+      # It allows resources to be built in the right order but doesn't impose the weight of
+      # of full dependency information which can overwhelm make in large builds.
+      # The strategy is to filter out lines (apart from the target line which is the first) which don't have .rsg or 
+      # .mbg dependencies in them. 
+      DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '1 p;\% [^ \/]+\.((rsg)|(mbg))%I {s% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig; p}' && echo "" ; }
+    else
+      # Generate full dependency information
+      DEPENDENCY_CORRECTOR:=$(GNUSED)  -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' 
+    endif
+
 
     RESOURCE_DEPS:: $(1).d
     $(1).d: $(SOURCE)
 	  $(call startrule,resourcedependencies,FORCESUCCESS) \
 	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
 	  $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
-	  $(GNUSED)  -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
+	  $$(DEPENDENCY_CORRECTOR) >$$@ \
 	  $(call endrule,resourcedependencies)
 
     $(1): $(1).d
@@ -156,7 +185,9 @@
     CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
     ifneq "$(DEPENDFILE)" ""
       ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
+        ifeq "$(filter RESOURCE_DEPS,$(call uppercase,$(MAKECMDGOALS)))" ""
+          -include $(DEPENDFILE)
+        endif
       endif
     endif
 
@@ -194,26 +225,32 @@
 # $(2) is the preprocessed resource to make it from
 # $(3) is the language e.g. sc or 01 or 02
 
-    RELEASABLES:=$$(RELEASABLES) $(1)
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
 
-            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
+            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)	
+            $(if $(FLMDEBUG),$(info generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))))
 
+            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
 
             RESOURCE:: $(1)
 
             $(1): $(2) $(RCOMP)
 			$(call startrule,resourcecompile,FORCESUCCESS) \
-			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \
+			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) && \
+        		{ $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(GNUCP) $(1) $(F) ; ) } \
 			$(call endrule,resourcecompile)
 
         endif
+
 #	Whether or not we have generated this resource for some other variant, check if there
 #       are any new copies to be made for this variant. e.g. winscw requires that we make
-#       some extra copies.
+#       some extra copies.  We tried to copy after running rcomp itself but we still need these
+#       targets for the sake of dependencies or, for example if someone merely adds a new copy 
+#       when the resource is up-to-date
 
+        $(if $(FLMDEBUG),$(info <debug>resource copies of $(notdir $1) in: $(RSCCOPYDIRS)</debug>))
         $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))
 
         # individual source file compilation
@@ -232,7 +269,7 @@
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-                $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
+                $(if $(FLMDEBUG),$(info <debug>resourceheader: $(1) from $(2) LANG:$(3)</debug>))
 
                 RESOURCE:: $(1)
 
@@ -261,8 +298,8 @@
 ifeq ($(HEADERONLY),)
         # generate a resource file for each language
         # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
 else
         # No resources are going to be made so unless we specifically ask for it, there will be no
         # preprocessed file from which to create the header:
--- a/sbsv2/raptor/python/raptor_meta.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/python/raptor_meta.py	Fri Apr 09 14:15:32 2010 +0100
@@ -1071,9 +1071,12 @@
 			if (re.search(r'^\s*START ',extensionLine, re.I)):
 				start = extensionLine
 			elif re.search(r'^\s*END\s*$',extensionLine, re.I):
-				extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
-				start = ""
-				options = []
+				if start == "":
+					self.log.Error("unmatched END statement in %s section", aType, bldinf=str(self.filename))
+				else:
+					extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
+					start = ""
+					options = []
 			elif re.search(r'^\s*$',extensionLine, re.I):
 				continue
 			elif start:
@@ -3296,7 +3299,7 @@
 					self.__Raptor.Debug("Skipping %s", str(m.getMakefileName()))
 					continue
 				elif projectname in self.projectList:
-					projectList.remove(projectname)
+					self.projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i makefile extension makefiles for %s",
 						len(makefileList), str(componentNode.component.bldinf.filename))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/metadata/project/bld.infs/bad_lone_end.inf	Fri Apr 09 14:15:32 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+// test for failure in PRJ_EXTENSIONS by processing for ARMV5 and
+// test for failure in PRJ_TESTEXTENSIONS by processing for WINSCW
+
+#ifdef EABI
+
+PRJ_EXTENSIONS
+// an END without a START
+END
+
+#else
+
+PRJ_TESTEXTENSIONS
+// an END without a START
+END
+
+#endif
--- a/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py	Fri Apr 09 14:15:32 2010 +0100
@@ -27,8 +27,8 @@
 	t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw"
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_sc.rpp",
+		"helloworld_exe/helloworld_sc.rpp.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
@@ -91,8 +91,8 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
 		"helloworld_exe/winscw/urel/helloworld_urel_objects.lrf",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
+		"helloworld_reg_exe/helloworld_reg_sc.rpp",
+		"helloworld_reg_exe/helloworld_reg_sc.rpp.d"
 	])
 
 	t.run()
--- a/sbsv2/raptor/test/smoke_suite/featurevariants.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/featurevariants.py	Fri Apr 09 14:15:32 2010 +0100
@@ -168,8 +168,8 @@
 		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def",
 		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso",
 		
-		"dummy_inv_dll/dummy_inv__resource_apps_sc.rpp",
-		"dummy_inv_dll/dummy_inv__resource_apps_sc.rpp.d"
+		"dummy_inv_dll/dummy_inv_sc.rpp",
+		"dummy_inv_dll/dummy_inv_sc.rpp.d"
 		]
 
 	variantBuildTargetsDefaultTree = [
@@ -293,12 +293,12 @@
 		]
 	
 	variantBuildTargetsGeneric = [
-		"dummy_var1_dll/dummy_var1__resource_apps_sc.rpp",
-		"dummy_var1_dll/dummy_var1__resource_apps_sc.rpp.d",
-		"dummy_var2_dll/dummy_var2__resource_apps_sc.rpp",
-		"dummy_var2_dll/dummy_var2__resource_apps_sc.rpp.d",
-		"dummy_var3_exe/dummy_var3__resource_apps_sc.rpp",
-		"dummy_var3_exe/dummy_var3__resource_apps_sc.rpp.d"
+		"dummy_var1_dll/dummy_var1_sc.rpp",
+		"dummy_var1_dll/dummy_var1_sc.rpp.d",
+		"dummy_var2_dll/dummy_var2_sc.rpp",
+		"dummy_var2_dll/dummy_var2_sc.rpp.d",
+		"dummy_var3_exe/dummy_var3_sc.rpp",
+		"dummy_var3_exe/dummy_var3_sc.rpp.d"
 		]
 	
 	sbscommand = "sbs -b smoke_suite/test_resources/bv/bld.inf -c armv5 " + \
--- a/sbsv2/raptor/test/smoke_suite/gui_whatlog.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gui_whatlog.py	Fri Apr 09 14:15:32 2010 +0100
@@ -49,8 +49,8 @@
 		]
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_sc.rpp",
+		"helloworld_exe/helloworld_sc.rpp.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
@@ -111,7 +111,7 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
+		"helloworld_reg_exe/helloworld_reg_sc.rpp.d"
 	])
 	t.stdout = [
 		"<whatlog bldinf='"+componentpath+"/Bld.inf' mmp='"+componentpath+"/HelloWorld.mmp' config='armv5_udeb.whatlog'>",
--- a/sbsv2/raptor/test/smoke_suite/resource.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/resource.py	Fri Apr 09 14:15:32 2010 +0100
@@ -15,20 +15,15 @@
 #
 
 from raptor_tests import SmokeTest
+from raptor_tests import ReplaceEnvs
+from raptor_meta import BldInfFile
 
 def run():
 	t = SmokeTest()
 	t.id = "30"
 	t.name =  "resource"
-	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
+	t.command = "sbs  -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
 	t.targets = [
-		"$(EPOCROOT)/epoc32/include/testresource.rsg",
-		"$(EPOCROOT)/epoc32/include/testresource.hrh",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
-		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
-		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
-		
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
@@ -45,25 +40,61 @@
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc"	
 		]
 	
-	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
-		"testresource_/testresource_resource_testresource2_sc.rpp.d",
-		"testresource_/testresource_resource_testresource3_02.rpp",
-		"testresource_/testresource_resource_testresource3_02.rpp.d",
-		"testresource_/testresource_resource_testresource3_sc.rpp",
-		"testresource_/testresource_resource_testresource3_sc.rpp.d",
-		"testresource_/testresource_resource_testresource_01.rpp",
-		"testresource_/testresource_resource_testresource_01.rpp.d",
-		"testresource_/testresource_resource_testresource_sc.rpp",
-		"testresource_/testresource_resource_testresource_sc.rpp.d"])
 
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"])
+		"helloworld_exe/helloworld_sc.rpp",
+		"helloworld_exe/helloworld_sc.rpp.d",
+		"helloworld_reg_exe/helloworld_reg_sc.rpp",
+		"helloworld_reg_exe/helloworld_reg_sc.rpp.d"])
 
 	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
 	
 	t.run()
+
+	t.id="30a"
+	t.name =  "no_depend_gen_resource"
+	t.usebash = True
+	t.description =  """Check that dependent resources still build correctly even when we turn dependency generation off.  This
+			    test cannot really do this reliably, if you think about it, since it can't force make to try building resources
+			    in the 'wrong' order.  What it does attempt is to check that 
+			    the ultimately generated dependency file is ok.
+			    N.B.  It also attempts to ensure that the dependency file is 'minimal'  i.e. that it only references .mbg and .rsg files
+			    that might come from other parts of the same build.  This is important for performance in situations where --no-depend-generate
+			    is used because the weight of 'complete' dependency information would overwhelm make.
+			 """
+	buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
+	res_depfile= buildLocation+"/dependentresource_/dependentresource_sc.rpp.d"
+
+	t.targets = [
+		"$(EPOCROOT)/epoc32/include/testresource.rsg",
+		"$(EPOCROOT)/epoc32/include/testresource.hrh",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
+		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
+		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
+		res_depfile
+		]
+
+	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
+		"testresource_/testresource_02.rpp",
+		"testresource_/testresource_02.rpp.d",
+		"testresource_/testresource_01.rpp",
+		"testresource_/testresource_01.rpp.d",
+		"testresource_/testresource_sc.rpp",
+		"testresource_/testresource_sc.rpp.d"])
+
+	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf  -c armv5_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && wc -l %s " % (res_depfile, res_depfile)
+
+	t.mustnotmatch = []
+
+	t.mustmatch = [
+			"3 .*.dependentresource_.dependentresource_sc.rpp.d"
+		      ]
+
+	t.run()
+
+	t.name = 'resource'
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Fri Apr 09 14:15:32 2010 +0100
@@ -52,7 +52,7 @@
 		"$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [
-		"helloworld_/helloworld__resource_apps_sc.rpp"
+		"helloworld_/helloworld_sc.rpp"
 		])
 	t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
@@ -79,11 +79,11 @@
 		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
 		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp"
+		"helloworld_reg_exe/helloworld_reg_sc.rpp"
 		])
 	t.countmatch = [
-		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 37],
-		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 7]		
+		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 38],
+		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 8]		
 		]
 	t.run()
 	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/dependentresource.rss	Fri Apr 09 14:15:32 2010 +0100
@@ -0,0 +1,333 @@
+/*
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* LOGWRAP.RSS
+*
+*/
+
+
+#include <testresource_badef.rh>
+#include <e32capability.h>
+
+#include "../inc/testresource.rh"
+#include "../inc/testresource.hrh"
+#include "testresource.rls"
+
+#include "testresource.mbg"
+#include <testresource.rsg>
+
+// MACRO statements in .mmp files should be reflected in resource preprocessing
+#ifndef SHOULD_BE_DEFINED
+#error "mmp MACRO SHOULD_BE_DEFINED is not defined!"
+#endif
+
+// Initial configuration
+RESOURCE CONFIG r_log_initial_config
+	{
+	size = 1000; // Maximum number of events
+	recent = 20; // Maximum size of recent lists
+	age = 2592000; // 30 days
+	}
+
+  RESOURCE ARRAY r_log_initial_events
+   	{
+   	items = 
+   		{
+  		ETYPE { uid = KLogCallEventType; description = LOG_CALL_EVENT_TYPE; },
+  		ETYPE { uid = KLogDataEventType; description = LOG_DATA_EVENT_TYPE; },
+  		ETYPE { uid = KLogFaxEventType; description = LOG_FAX_EVENT_TYPE; },
+  		ETYPE { uid = KLogShortMessageEventType; description = LOG_SHORT_MESSAGE_EVENT_TYPE; },
+  		ETYPE { uid = KLogTaskSchedulerEventType; description = LOG_TASK_SCHEDULER_EVENT_TYPE; },
+  		ETYPE { uid = KLogPacketDataEventType; description = LOG_PACKET_DATA_EVENT_TYPE; },
+
+
+  		ETYPE { uid = KLogLbsSelfLocateEventType; description = LOG_LBS_SELF_LOCATE_EVENT_TYPE; },
+  		ETYPE { uid = KLogLbsExternalLocateEventType; description = LOG_LBS_EXTERNAL_LOCATE_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsTransmitLocationEventType; description = LOG_LBS_TRANSMIT_LOCATION_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsNetworkLocateEventType; description = LOG_LBS_NETWORK_LOCATE_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsAssistanceDataEventType; description = LOG_LBS_ASSISTANCE_DATA_EVENT_TYPE; }
+
+   		};
+   	}
+
+
+
+RESOURCE ARRAY r_log_security
+//
+// [See logwrap.rh for the definitions of SECURITY and CAPABILITY.]
+//
+// This structure defines settings for platform security in the Log engine.
+// All event types defined above in 'r_log_initial_events' need to be policed.
+// The server must always determine whether a client thread has the required
+// capability to read/write a log event(s) of a built-in type.  Each operation
+// may have from one to seven capabilities defined for it.  All operations on 
+// built in types _MUST_ have an associated security policy defined here.  If no
+// security is required, then use 'cap=ECapability_None'.  The CAPABILITY values
+// defined here will provide constructor arguments for TSecurityPolicy objects.
+// The maximum number of CAPABILITY(s) for each read or write operation is 7.
+// ( a read_caps or a write_caps { contains <= 7 CAPABILITY{}   statements }  )
+// Note that SID-based security isn't supported in the Log Engine.
+//
+	{
+	items = 
+		{
+		SECURITY 
+			{ 
+			uid = KLogCallEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogFaxEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogShortMessageEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogTaskSchedulerEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapability_None; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogPacketDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsSelfLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsExternalLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsTransmitLocationEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsNetworkLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsAssistanceDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			}
+		};
+	}
+
+
+// Index entries
+RESOURCE ARRAY r_log_indexes
+	{
+	items =
+		{
+		INDEX
+			{
+			name = "Index1"; // do not translate
+			table = "Event"; // do not translate
+			keys = 
+				{
+				KEY { col = "Id"; } // do not translate
+				};
+			},
+		INDEX
+			{
+			name = "Index2"; // do not translate
+			table = "Event"; // do not translate
+			keys =
+				{
+				KEY { col = "ETime"; } // do not translate
+				};
+			},
+		INDEX
+			{
+			name = "Index3"; // do not translate
+			table = "String"; // do not translate
+			keys = 
+				{
+				KEY { col = "Id"; } // do not translate
+				};
+			}
+		};
+	}
+
+// Recent list setup
+RESOURCE ARRAY r_log_recent
+	{
+	items =
+		{
+		RECENT
+			{
+			id = KLogRecentIncomingCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_IN; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_IN_ALT; }
+				};
+			},
+		RECENT
+			{
+			id = KLogRecentOutgoingCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_OUT; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_OUT_ALT; }
+				};
+			},
+		RECENT
+			{
+			id = KLogRecentMissedCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_MISSED; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_MISSED_ALT; }
+				};
+			}
+		};
+	}
+
+
+// Direction
+RESOURCE LBUF r_log_dir_in { txt = LOG_DIR_IN; }
+RESOURCE LBUF r_log_dir_out { txt = LOG_DIR_OUT; }
+RESOURCE LBUF r_log_dir_in_alt { txt = LOG_DIR_IN_ALT; }
+RESOURCE LBUF r_log_dir_out_alt { txt = LOG_DIR_OUT_ALT; }
+RESOURCE LBUF r_log_dir_fetched { txt = LOG_DIR_FETCHED; }
+RESOURCE LBUF r_log_dir_missed { txt = LOG_DIR_MISSED; }
+RESOURCE LBUF r_log_dir_missed_alt { txt = LOG_DIR_MISSED_ALT; }
+
+
+// Delivery
+RESOURCE LBUF r_log_del_pending { txt = LOG_DEL_PENDING; }
+RESOURCE LBUF r_log_del_sent { txt = LOG_DEL_SENT; }
+RESOURCE LBUF r_log_del_failed { txt = LOG_DEL_FAILED; }
+/* R_LOG_DEL_NONE comes from the rsg that we're trying to depend on */
+RESOURCE LBUF r_log_del_none { txt = R_LOG_DEL_NONE; } 
+RESOURCE LBUF r_log_del_done { txt = LOG_DEL_DONE; }
+RESOURCE LBUF r_log_del_not_sent { txt = LOG_DEL_NOT_SENT; }
+RESOURCE LBUF r_log_del_scheduled { txt = LOG_DEL_SCHEDULED; }
+
+// Other
+RESOURCE LBUF r_log_remote_unknown { txt = LOG_REMOTE_UNKNOWN; }
+RESOURCE LBUF r_log_remote_multiple { txt = LOG_REMOTE_MULTIPLE; }
+RESOURCE LBUF r_log_subject_none { txt = LOG_SUBJECT_NONE; }
+RESOURCE LBUF r_log_subject_data_message { txt = LOG_SUBJECT_DATA_MESSAGE; }
+
+// Connection
+RESOURCE LBUF r_log_con_connected { txt = LOG_CON_CONNECTED; }
+RESOURCE LBUF r_log_con_connecting { txt = LOG_CON_CONNECTING; }
+RESOURCE LBUF r_log_con_disconnecting { txt = LOG_CON_DISCONNECTING; }
+RESOURCE LBUF r_log_con_disconnected{ txt = LOG_CON_DISCONNECTED; }
+RESOURCE LBUF r_log_con_suspended{ txt = LOG_CON_SUSPENDED; }
+
+// Delivery
+RESOURCE LBUF r_log_del_notified { txt = LOG_DEL_NOTIFIED; } 
+RESOURCE LBUF r_log_del_expired { txt = LOG_DEL_EXPIRED; }  
--- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Fri Apr 09 14:15:32 2010 +0100
@@ -52,6 +52,12 @@
 LANG 02 sc
 END
 
+
+START RESOURCE          dependentresource.rss
+TARGETPATH              resource/dependentresource
+LANG sc
+END
+
 START BITMAP	testresource.mbm
 HEADER
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/test.cpp	Fri Apr 09 14:15:32 2010 +0100
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "e32def.h" // intentional  include
+
+char test[]="Resource test";
+
+
+TInt E32Main()
+{
+	return 0;
+}
--- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Fri Apr 09 09:30:17 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Fri Apr 09 14:15:32 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -569,7 +569,49 @@
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
+	
+	def testBadBldInfs(self):
+		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
+		depfiles=[]
 		
+		class BadBldInfLogger(object):
+			"mock logger to capture Error messages from the parser."
+			
+			def __init__(self):
+				self.errors = []
+				self.debugOutput = False
+				
+			def Error(self, format, *extras, **attributes):
+				self.errors.append( ((format % extras), attributes) )
+		
+			def Debug(self, format, *extras, **attributes):
+				pass
+				
+		logger = BadBldInfLogger()
+		
+		# this bld.inf has END lines with no matching START
+		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('bad_lone_end.inf'),
+											  self.__gnucpp, depfiles=depfiles, 
+											  log=logger)
+		
+		# the PRJ_EXTENSIONS section is bad for ARMV5
+		extensions = bldInfObject.getExtensions(self.ARMV5)
+		#
+		self.assertEquals(len(logger.errors), 1)
+		err = logger.errors[0]
+		self.assertEquals(err[0], "unmatched END statement in PRJ_EXTENSIONS section")
+		self.assertTrue("bldinf" in err[1])
+		self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf"))
+		
+		# the PRJ_TESTEXTENSIONS section is bad for WINSCW
+		testextensions = bldInfObject.getTestExtensions(self.WINSCW)
+		#
+		self.assertEquals(len(logger.errors), 2)
+		err = logger.errors[1]
+		self.assertEquals(err[0], "unmatched END statement in PRJ_TESTEXTENSIONS section")
+		self.assertTrue("bldinf" in err[1])
+		self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf"))
+			
 	def testBldInfIncludes(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs/includes')
 		depfiles=[]