157 # The strategy is to filter out lines (apart from the target line which is the first) which don't have .rsg or |
157 # The strategy is to filter out lines (apart from the target line which is the first) which don't have .rsg or |
158 # .mbg dependencies in them. |
158 # .mbg dependencies in them. |
159 DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '1 p;\% [^ \/]+\.((rsg)|(mbg))%I {s% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig; p}' && echo "" ; } |
159 DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '1 p;\% [^ \/]+\.((rsg)|(mbg))%I {s% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig; p}' && echo "" ; } |
160 else |
160 else |
161 # Generate full dependency information |
161 # Generate full dependency information |
162 DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' |
162 DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' |
163 endif |
163 endif |
164 |
164 |
165 |
165 |
166 RESOURCE_DEPS:: $(1).d |
166 RESOURCE_DEPS:: $(1).d |
167 $(1).d: $(SOURCE) |
167 $(1).d: $(SOURCE) |
168 $(call startrule,resourcedependencies,FORCESUCCESS) \ |
168 $(call startrule,resourcedependencies,FORCESUCCESS) \ |
169 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
169 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
170 $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \ |
170 $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \ |
171 $(DEPENDENCY_CORRECTOR) >$$@ \ |
171 $$(DEPENDENCY_CORRECTOR) >$$@ \ |
172 $(call endrule,resourcedependencies) |
172 $(call endrule,resourcedependencies) |
173 |
173 |
174 $(1): $(1).d |
174 $(1): $(1).d |
175 $(call startrule,resourcepreprocess,FORCESUCCESS) \ |
175 $(call startrule,resourcepreprocess,FORCESUCCESS) \ |
176 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
176 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |