# HG changeset patch # User timothy.murphy@nokia.com # Date 1270147401 -3600 # Node ID 7f12c652f36d819dfd5f9e948c85fe15df57eb5e # Parent 48d025ecec3c84879fa2fbea5a5b67a9390fb329 Fix: Resource stage parse performance affected by huge size of included dependency files diff -r 48d025ecec3c -r 7f12c652f36d sbsv2/raptor/RELEASE-NOTES.txt --- a/sbsv2/raptor/RELEASE-NOTES.txt Tue Mar 30 20:25:06 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.txt Thu Apr 01 19:43:21 2010 +0100 @@ -15,7 +15,8 @@ - SF Bug 1939 - [Raptor] PAGED keyword in MMP files should imply byte pair compressed - DPDEF144648 - Raptor failed to build tools_deb objects under Windows XP - SF Bug 2134 - [Raptor] Raptor does not pass overridden make variables into its makefiles -- Fix : do not allow data to be paged implicitly +- Fix: do not allow data to be paged implicitly +- 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. version 2.12.5 diff -r 48d025ecec3c -r 7f12c652f36d sbsv2/raptor/lib/flm/resource.flm --- a/sbsv2/raptor/lib/flm/resource.flm Tue Mar 30 20:25:06 2010 +0100 +++ b/sbsv2/raptor/lib/flm/resource.flm Thu Apr 01 19:43:21 2010 +0100 @@ -113,7 +113,7 @@ # common pre-processor options CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ - -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) ) + -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) ) CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH) @@ -125,6 +125,8 @@ endif ############################################################################### + + define preprocessresource # $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) # $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc) @@ -134,12 +136,26 @@ TARGET_$(call sanitise,$1):=1 $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3))) + + # Correct dependency information when a header file can't be found: + # assume its in epoc32\include + + ifneq ($(NO_DEPEND_GENERATE),) + # This version minimises the size of dependency files, to contain only enough information + # to allow the ordering to be correct. + 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 with correction only + 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 +172,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