62 HEADLANG:= |
62 HEADLANG:= |
63 RESOURCEHEADER:= |
63 RESOURCEHEADER:= |
64 endif |
64 endif |
65 |
65 |
66 # we create intermediate .rpp and .d files |
66 # we create intermediate .rpp and .d files |
67 INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),) |
67 INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower) |
68 |
68 |
69 ################################## localisation ###########################$(GNUMKDIR)############# |
69 ################################## localisation ###########################$(GNUMKDIR)############# |
70 # Only make copies for full resource builds |
70 # Only make copies for full resource builds |
71 |
71 |
72 # Initialise to prevent RELEASABLES spill-over between calls |
72 # Initialise to prevent RELEASABLES spill-over between calls |
115 CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
115 CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
116 -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) ) |
116 -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) ) |
117 |
117 |
118 CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH) |
118 CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH) |
119 |
119 |
|
120 # We intend to generate the resource in an intermediate locationand copy to the final destination to |
|
121 # ensure that when the "same" resource is built into separare locations it is |
|
122 RSCCOPYDIRS:=$(RESBASE) |
120 # additional binary resource copies performed based on BINCOPYDIRS |
123 # additional binary resource copies performed based on BINCOPYDIRS |
121 RSCCOPYDIRS:= |
|
122 ifneq ($(BINCOPYDIRS),) |
124 ifneq ($(BINCOPYDIRS),) |
123 RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS))) |
125 RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS))) |
124 CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS) |
126 endif |
125 endif |
127 CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS) |
126 |
128 |
127 ############################################################################### |
129 ############################################################################### |
128 define preprocessresource |
130 define preprocessresource |
129 # $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) |
131 # $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) |
130 # $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc) |
132 # $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc) |
259 endif |
261 endif |
260 |
262 |
261 ifeq ($(HEADERONLY),) |
263 ifeq ($(HEADERONLY),) |
262 # generate a resource file for each language |
264 # generate a resource file for each language |
263 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
265 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
264 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L)))) |
266 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L)))) |
265 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) |
267 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) |
266 else |
268 else |
267 # No resources are going to be made so unless we specifically ask for it, there will be no |
269 # No resources are going to be made so unless we specifically ask for it, there will be no |
268 # preprocessed file from which to create the header: |
270 # preprocessed file from which to create the header: |
269 |
271 |
270 $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) |
272 $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) |