equal
deleted
inserted
replaced
65 |
65 |
66 # we create intermediate .rpp and .d files |
66 # we create intermediate .rpp and .d files |
67 INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE))) |
67 INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE))) |
68 INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower) |
68 INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower) |
69 |
69 |
|
70 $(call makepath,$(INTERBASE)) |
|
71 |
70 # common pre-processor options |
72 # common pre-processor options |
71 |
73 |
72 # We really should be using -iquote with a recent cpp. This is a note for when we do update: |
74 # We really should be using -iquote with a recent cpp. This is a note for when we do update: |
73 #CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
75 #CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
74 # -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) ) |
76 # -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) ) |
109 |
111 |
110 ifneq ($(NO_DEPEND_GENERATE),) |
112 ifneq ($(NO_DEPEND_GENERATE),) |
111 # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. |
113 # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. |
112 # It allows resources to be built in the right order but doesn't impose the weight of |
114 # It allows resources to be built in the right order but doesn't impose the weight of |
113 # of full dependency information which can overwhelm make in large builds. |
115 # of full dependency information which can overwhelm make in large builds. |
114 # The strategy is filter lines which don't have .rsg or |
116 # The strategy is filter lines which don't have .rsg or .mbg dependencies in them and |
115 # .mbg dependencies in them and if to sift each line to leave out non-relevant things like |
117 # to sift each line to leave out non-relevant things like other header files, .hrh |
116 # other header files, .hrh files etc. In the end we don't print anything at all if we |
118 # files etc. In the end don't print anything at all if we did not find the target. |
117 # did not find the target. |
|
118 |
119 |
119 define DEPENDENCY_CORRECTOR |
120 define DEPENDENCY_CORRECTOR |
120 { set +x; $(GNUSED) -rn '\% ([^ /]+)\.((rsg)|(mbg))%I {y/\\/ /;p;}' | \ |
121 { set +x; $(GNUSED) -rn '\% ([^ /]+)\.((rsg)|(mbg))%I {y/\\/ /;p;}' | \ |
121 { \ |
122 { \ |
122 DEPTXT="$$$$RPP: \\\\\n"; \ |
123 DEPTXT="$$$$RPP: \\\\\n"; \ |
222 endif |
223 endif |
223 |
224 |
224 # Whether or not we have generated this resource for some other variant, check if there |
225 # Whether or not we have generated this resource for some other variant, check if there |
225 # are any new copies to be made for this variant. e.g. winscw requires that we make |
226 # are any new copies to be made for this variant. e.g. winscw requires that we make |
226 # some extra copies. We tried to copy after running rcomp itself but we still need these |
227 # some extra copies. We tried to copy after running rcomp itself but we still need these |
227 # targets for the sake of dependencies or, for example if someone merely adds a new copy |
228 # targets for the sake of dependencies or, for example, if someone merely adds a new copy |
228 # when the resource is up-to-date |
229 # when the resource is up-to-date |
229 |
230 |
230 $(call copyresource,$1,$(sort $(patsubst %,%/$(notdir $1),$(RSCCOPYDIRS)))) |
231 $(call copyresource,$1,$(sort $(patsubst %,%/$(notdir $1),$(RSCCOPYDIRS)))) |
231 |
232 |
232 |
233 |
273 endif |
274 endif |
274 |
275 |
275 # The one on which the others will depend i.e. they will |
276 # The one on which the others will depend i.e. they will |
276 # "sit in it's dependency slipstream" or in other words |
277 # "sit in it's dependency slipstream" or in other words |
277 # We only have to make one dependency file because all of |
278 # We only have to make one dependency file because all of |
278 # the other languages will benefit from this languages' |
279 # the other languages will benefit from the dependency file |
279 # dependency file |
280 # belonging to this language. |
280 PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp |
281 PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp |
281 ifeq ($(HEADERONLY),) |
282 ifeq ($(HEADERONLY),) |
282 # generate a resource file for each language |
283 # generate a resource file for each language |
283 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
284 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
284 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(INTERBASE).r$(L),$(L),$(PRIMARYRPPFILE)))) |
285 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(INTERBASE).r$(L),$(L),$(PRIMARYRPPFILE)))) |
301 RESOURCE:: $(RFIFILE) |
302 RESOURCE:: $(RFIFILE) |
302 RELEASABLES:=$(RELEASABLES) $(RFIFILE) |
303 RELEASABLES:=$(RELEASABLES) $(RFIFILE) |
303 CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/ |
304 CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/ |
304 |
305 |
305 RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp) |
306 RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp) |
306 #$(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES)))) |
307 $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES)))) |
307 endif |
308 endif |
308 |
309 |
309 |
310 |
310 ## Clean up |
311 ## Clean up |
311 $(call raptor_clean,$(CLEANTARGETS)) |
312 $(call raptor_clean,$(CLEANTARGETS)) |