# HG changeset patch # User timothy.murphy@nokia.com # Date 1270818641 -3600 # Node ID c521ed6bf7465c0fa38f0ed47b2d28444db027f8 # Parent 2b71dc28e5fc68794a01e93b71f634267ad326bf# Parent ae731bee7d46d24e3fe8b4162d27333f2023327a Merge diff -r ae731bee7d46 -r c521ed6bf746 sbsv2/raptor/lib/flm/resource.flm --- a/sbsv2/raptor/lib/flm/resource.flm Thu Apr 08 15:30:47 2010 +0100 +++ b/sbsv2/raptor/lib/flm/resource.flm Fri Apr 09 14:10:41 2010 +0100 @@ -159,7 +159,7 @@ 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' + DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' endif @@ -168,7 +168,7 @@ $(call startrule,resourcedependencies,FORCESUCCESS) \ $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \ - $(DEPENDENCY_CORRECTOR) >$$@ \ + $$(DEPENDENCY_CORRECTOR) >$$@ \ $(call endrule,resourcedependencies) $(1): $(1).d @@ -229,21 +229,26 @@ 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 resource copies of $(notdir $1) in: $(RSCCOPYDIRS))) $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))