# HG changeset patch
# User timothy.murphy@nokia.com
# Date 1274716632 -3600
# Node ID e2b5644641c6b45b7f362c35a025341f5bac9c4b
# Parent 6656482ba0da2ccc25305f04dd20bd1e052fad91
fix: ensure that intermediate resource filenames are unique in some uncommon situations
diff -r 6656482ba0da -r e2b5644641c6 sbsv2/raptor/RELEASE-NOTES.html
--- a/sbsv2/raptor/RELEASE-NOTES.html Wed May 19 15:47:58 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html Mon May 24 16:57:12 2010 +0100
@@ -13,6 +13,7 @@
Fix : tracecompiler.mk caused poor makefile parse performance due to use of $(shell)
SF Bug 2561 - [Raptor] creates incorrect .iby files w.r.t target file versions & ramtargets
SF Bug 2562 - [Raptor] adds incorrect entries into .iby files w.r.t file paths
+Fix : since 2.14.0 intermediate rsc files are not named uniquely enough to guarantee that there won't be a clash
version 2.14.0
@@ -40,7 +41,6 @@
Fix: (performance in cluster builds) do resource copying on local host.
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. Helps when winscw is built after an arm build.
Fix: (performance) remove unnecessary copying of rpp files into epoc32\localisation as they are not used.
-Fix: (performance) remove -C option when preprocessing rpp files - causes comments to be stripped from the rpp resulting in smaller files that improves performance.
diff -r 6656482ba0da -r e2b5644641c6 sbsv2/raptor/lib/flm/resource.flm
--- a/sbsv2/raptor/lib/flm/resource.flm Wed May 19 15:47:58 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm Mon May 24 16:57:12 2010 +0100
@@ -94,14 +94,13 @@
define preprocessresource
-# $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp)
-# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
-# $(3) is the LANGUAGE (eg. sc or 01 or 02 ...)
-# $(4) is the "primary" language on which all the others depend
+# $1 is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp)
+# $2 is the LANGUAGE (eg. sc or 01 or 02 ...)
+# $3 is the "primary" language on which all the others depend
ifeq ($(TARGET_$(call sanitise,$1)),)
TARGET_$(call sanitise,$1):=1
- $(if $(FLMDEBUG),$$(info preprocessresource: $(1) for $(2) LANG:$(3) dep $(4)))
+ $(if $(FLMDEBUG),$$(info preprocessresource: $1 LANG:$2 dep $3))
# Correct dependency information when a header file can't be found.
@@ -126,12 +125,12 @@
endif
- ifeq "$1" "$4"
+ ifeq "$1" "$3"
RESOURCE_DEPS:: $1.d
$1.d: $(SOURCE)
$(call startrule,resourcedependencies,FORCESUCCESS) \
- $(GNUCPP) -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$3) $(call makemacrodef,-D,$(MMPDEFS))\
+ $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
$(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \
$$(DEPENDENCY_CORRECTOR) >$$@ \
$(call endrule,resourcedependencies)
@@ -139,12 +138,12 @@
$1 : $1.d
else
- $1 : $4
+ $1 : $3
endif
$1:
$(call startrule,resourcepreprocess,FORCESUCCESS) \
- $(GNUCPP) -C -DLANGUAGE_$3 -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
+ $(GNUCPP) -C -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
$(CPPOPT) $(SOURCE) -o $$@ \
$(call endrule,resourcepreprocess)
endif
@@ -152,7 +151,7 @@
CLEANTARGETS:= $$(CLEANTARGETS) $1
ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
- ifeq "$1" "$4"
+ ifeq "$1" "$3"
$(eval DEPENDFILENAME:=$1.d)
$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
@@ -183,9 +182,10 @@
###############################################################################
define generateresource
-# $(1) is the resource filename e.g. /a/b/resource.rsc
+# $(1) is the intermediate resource filename with path e.g. /a/b/resource.rsc
# $(2) is the preprocessed resource to make it from
# $(3) is the language e.g. sc or 01 or 02
+# $(4) is the resource filename without path
ifeq ($(TARGET_$(call sanitise,$1)),)
@@ -211,7 +211,7 @@
# targets for the sake of dependencies or, for example, if someone merely adds a new copy
# when the resource is up-to-date
- $(call copyresource,$1,$(sort $(patsubst %,%/$(notdir $1),$(RSCCOPYDIRS))))
+ $(call copyresource,$1,$(sort $(patsubst %,%/$4,$(RSCCOPYDIRS))))
# individual source file compilation
@@ -265,10 +265,10 @@
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_TMP)_$(L).rpp,$(INTERBASE).r$(L),$(L),$(PRIMARYRPPFILE))))
+ $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(L),$(PRIMARYRPPFILE))))
ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
- $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L))))
+ $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE_TMP).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L),$(notdir $(INTERBASE)).r$(L))))
endif
else
# No resources are going to be made so unless we specifically ask for it, there will be no
diff -r 6656482ba0da -r e2b5644641c6 sbsv2/raptor/test/smoke_suite/resource.py
--- a/sbsv2/raptor/test/smoke_suite/resource.py Wed May 19 15:47:58 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/resource.py Mon May 24 16:57:12 2010 +0100
@@ -62,22 +62,35 @@
buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d"
+
t.targets = [
- "$(EPOCROOT)/epoc32/include/testresource.rsg",
- "$(EPOCROOT)/epoc32/include/testresource.hrh",
+ "$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.r01",
+ "$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.rsc",
+ "$(EPOCROOT)/epoc32/data/z/resource/dependentresource/dependentresource.rsc",
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
+ "$(EPOCROOT)/epoc32/include/testresource.hrh",
+ "$(EPOCROOT)/epoc32/include/testresource.rsg",
"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
+ "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.r01",
+ "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.rsc",
+ "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/dependentresource/dependentresource.rsc",
+ "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.r01",
+ "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc",
+ "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/dependentresource/dependentresource.rsc",
res_depfile
]
- t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [
- "testresource_/testresource_testresource_02.rpp",
+ t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [
+ "dependentresource_/dependentresource_dependentresource.rsc",
+ "testresource_/testresource_dependentresource.r01",
+ "testresource_/testresource_dependentresource.rsc",
"testresource_/testresource_testresource_01.rpp",
"testresource_/testresource_testresource_01.rpp.d",
+ "testresource_/testresource_testresource_02.rpp",
"testresource_/testresource_testresource_sc.rpp"])
- 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.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && { X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${X%% *}\" != \"${Y%% *}\" ] ; } && wc -l %s " % (res_depfile, res_depfile)
t.mustnotmatch = []
diff -r 6656482ba0da -r e2b5644641c6 sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Wed May 19 15:47:58 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Mon May 24 16:57:12 2010 +0100
@@ -58,10 +58,18 @@
LANG sc
END
+// Looks like testresource but comes from another resource file
+START RESOURCE dependentresource.rss
+TARGET testresource.rsc
+TARGETPATH resource/anotherresource
+LANG SC 01
+END
+
START BITMAP testresource.mbm
HEADER
-
TARGETPATH resource/apps
SOURCEPATH ../aifsrccl
SOURCE c8,1 DEF24.BMP DEF2M.BMP
END
+
+