author | timothy.murphy@nokia.com |
Tue, 20 Apr 2010 12:08:50 +0100 | |
branch | fix |
changeset 489 | 4d8a8d0b17c0 |
parent 488 | bae97f326378 |
child 529 | b74730c98ccc |
permissions | -rw-r--r-- |
394 | 1 |
# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 | 2 |
# All rights reserved. |
3 |
# This component and the accompanying materials are made available |
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
|
5 |
# which accompanies this distribution, and is available |
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
# |
|
8 |
# Initial Contributors: |
|
9 |
# Nokia Corporation - initial contribution. |
|
10 |
# |
|
11 |
# Contributors: |
|
12 |
# |
|
13 |
# Description: |
|
14 |
# Function Like Makefile (FLM) to create a resource header (.rsg) |
|
15 |
# and resource files (.rsc, .r01, .r02 etc.) |
|
16 |
# |
|
17 |
# |
|
18 |
||
19 |
## Parameters that are expected: |
|
20 |
# TARGET |
|
21 |
# TARGETPATH |
|
22 |
# LANGUAGES |
|
23 |
# HEADER |
|
24 |
# HEADERONLY |
|
25 |
# EPOCROOT |
|
26 |
# MMPDEFS |
|
27 |
# PRODUCT_INCLUDE |
|
28 |
# SYSTEMINCLUDE |
|
29 |
# USERINCLUDE |
|
30 |
# GNUCPP |
|
31 |
# GNUSED |
|
32 |
# RCOMP |
|
33 |
# OUTPUTPATH |
|
34 |
# SOURCE |
|
35 |
# BINCOPYDIRS |
|
36 |
||
37 |
||
38 |
# The rss is pre-processed once for each language and results |
|
39 |
# in a file with extension r$(LANGUAGE) where $(LANGUAGE) is |
|
40 |
# either "sc" or a 2 (or more) digit number. |
|
41 |
ifneq ($(TARGETPATH),) |
|
42 |
RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data/z/$(TARGETPATH)) |
|
43 |
else |
|
44 |
RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data) |
|
45 |
endif |
|
46 |
RESBASE:=$(RSCDIR)/$(TARGET_lower) |
|
47 |
||
48 |
# Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm: |
|
49 |
CLEANTARGETS:= |
|
50 |
RELEASABLES:= |
|
51 |
||
52 |
# There is only one resource header (.rsg) file and we only |
|
53 |
# make that if we are asked. |
|
54 |
RSGDIR:=$(EPOCROOT)/epoc32/include |
|
55 |
ifneq ($(or $(HEADER),$(HEADERONLY)),) |
|
56 |
RESOURCEHEADER:=$(RSGDIR)/$(HEADER) |
|
57 |
||
58 |
# If there are multiple LANGUAGES then it is the last one in the list |
|
59 |
# which produces the header. |
|
60 |
HEADLANG:=$(lastword $(LANGUAGES:SC=sc)) |
|
61 |
else |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
62 |
HEADLANG:= |
3 | 63 |
RESOURCEHEADER:= |
64 |
endif |
|
65 |
||
66 |
# we create intermediate .rpp and .d files |
|
464
a6aa62a0998d
fix: prevent regeneration of resources for winscw after an armv5 build
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
67 |
INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower) |
3 | 68 |
|
69 |
################################## localisation ###########################$(GNUMKDIR)############# |
|
70 |
# Only make copies for full resource builds |
|
71 |
||
72 |
# Initialise to prevent RELEASABLES spill-over between calls |
|
73 |
DESTRPP:= |
|
74 |
INFOFILE:= |
|
75 |
||
76 |
ifeq ($(HEADERONLY),) |
|
77 |
||
78 |
RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE)))) |
|
79 |
DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp |
|
80 |
$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc) |
|
81 |
||
82 |
INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info |
|
83 |
# If there are MULTIPLE languages then copy the .rpp for the last one |
|
84 |
RPPLANG:=$(lastword $(LANGUAGES:SC=sc)) |
|
85 |
||
86 |
# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation |
|
87 |
define CreateRppAndInfo |
|
88 |
||
89 |
ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),) |
|
90 |
RESOURCE_$(call sanitise,$(SOURCE)):=1 |
|
91 |
||
92 |
RESOURCE:: $(DESTRPP) $(INFOFILE) |
|
93 |
||
94 |
$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp |
|
95 |
$(call startrule,rppfilecopy,FORCESUCCESS) \ |
|
96 |
$(GNUCP) $$< $$@ \ |
|
97 |
$(call endrule,rppfilecopy) |
|
98 |
||
99 |
$(INFOFILE):: |
|
100 |
@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi |
|
101 |
@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi |
|
102 |
@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@ |
|
103 |
||
104 |
endif |
|
105 |
endef |
|
106 |
||
107 |
$(eval $(call CreateRppAndInfo)) |
|
108 |
endif |
|
109 |
################################# end of localisation ################################### |
|
110 |
||
111 |
# make the output directories while reading makefile - some build engines prefer this |
|
112 |
$(call makepath,$(INTERBASE)) |
|
113 |
||
114 |
# common pre-processor options |
|
471
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
115 |
|
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
116 |
# We really should be using -iquote with a recent cpp. This is a note for when we do update: |
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
117 |
#CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
118 |
# -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) ) |
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
119 |
|
393
629079c72ee4
Suppress trigraph warnings in resource file preprocessing.
Jon Chatten
parents:
5
diff
changeset
|
120 |
CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ |
471
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
121 |
-I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) ) |
3 | 122 |
|
123 |
CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH) |
|
124 |
||
470
f45853a5ce36
comments: better commenting in resource.flm
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
125 |
# We intend to generate the resource in an intermediate location and copy to the targetpath to |
f45853a5ce36
comments: better commenting in resource.flm
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
126 |
# ensure that when the "same" resource is built into separare target paths, it doesn't have to be |
f45853a5ce36
comments: better commenting in resource.flm
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
127 |
# completely recreated each time - just copied. |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
128 |
RSCCOPYDIRS:=$(RSCDIR) |
470
f45853a5ce36
comments: better commenting in resource.flm
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
129 |
|
3 | 130 |
# additional binary resource copies performed based on BINCOPYDIRS |
131 |
ifneq ($(BINCOPYDIRS),) |
|
464
a6aa62a0998d
fix: prevent regeneration of resources for winscw after an armv5 build
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
132 |
RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS))) |
3 | 133 |
endif |
464
a6aa62a0998d
fix: prevent regeneration of resources for winscw after an armv5 build
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
134 |
CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS) |
3 | 135 |
|
136 |
############################################################################### |
|
462
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
137 |
|
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
138 |
|
3 | 139 |
define preprocessresource |
140 |
# $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) |
|
141 |
# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc) |
|
142 |
# $(3) is the LANGUAGE (eg. sc or 01 or 02 ...) |
|
143 |
||
144 |
ifeq ($(TARGET_$(call sanitise,$1)),) |
|
145 |
TARGET_$(call sanitise,$1):=1 |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
146 |
$(if $(FLMDEBUG),$(info <debug>preprocessresource: $(1) for $(2) LANG:$(3)</debug>)) |
3 | 147 |
|
462
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
148 |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
149 |
# Correct dependency information when a header file can't be found. |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
150 |
# If the c preprocessor can't find a dependency it appears as it did in the #include statement |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
151 |
# e.g. "filename.mbg" or "filename.rsg" in the dependency file. |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
152 |
# we can correct the dependencies by assuming that the file will be in epoc32\include as this is the default |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
153 |
ifneq ($(NO_DEPEND_GENERATE),) |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
154 |
# This version minimises the size of dependency files, to contain only .mbg and .rsg deps. |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
155 |
# It allows resources to be built in the right order but doesn't impose the weight of |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
156 |
# of full dependency information which can overwhelm make in large builds. |
470
f45853a5ce36
comments: better commenting in resource.flm
timothy.murphy@nokia.com
parents:
466
diff
changeset
|
157 |
# The strategy is to filter out lines (apart from the target line which is the first) which don't have .rsg or |
488 | 158 |
# .mbg dependencies in them. The first line can sometimes not contain the target but |
484
56adcb9bad98
doc: slight more commenting for resource dpe minimisation
timothy.murphy@nokia.com
parents:
483
diff
changeset
|
159 |
# have a lonely "\" so we use a pattern to recognise the target line in order not to get confused. |
486
88c2609eda7a
fix: even more minimal resource dependendcies.
timothy.murphy@nokia.com
parents:
479
diff
changeset
|
160 |
DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '/.*: +.$$$$/ p;\%\.((rsg)|(mbg))%I {s% ([^ \/]+\.((rsg)|(mbg)))% __EPOCROOT\/epoc32\/include\/\1%ig;s% [^_][^_][^E][^ ]+%%g;s%__EPOCROOT%$(EPOCROOT)%g; p}' && echo "" ; } |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
161 |
else |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
162 |
# Generate full dependency information |
474
d22e74b2b0f8
fix: resource dependencies sometimes not generated because of too-early expansion of variable.
timothy.murphy@nokia.com
parents:
472
diff
changeset
|
163 |
DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
164 |
endif |
462
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
165 |
|
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
166 |
|
3 | 167 |
RESOURCE_DEPS:: $(1).d |
168 |
$(1).d: $(SOURCE) |
|
169 |
$(call startrule,resourcedependencies,FORCESUCCESS) \ |
|
170 |
$(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
|
171 |
$(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \ |
|
474
d22e74b2b0f8
fix: resource dependencies sometimes not generated because of too-early expansion of variable.
timothy.murphy@nokia.com
parents:
472
diff
changeset
|
172 |
$$(DEPENDENCY_CORRECTOR) >$$@ \ |
3 | 173 |
$(call endrule,resourcedependencies) |
174 |
||
487
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
175 |
ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
3 | 176 |
$(1): $(1).d |
177 |
$(call startrule,resourcepreprocess,FORCESUCCESS) \ |
|
178 |
$(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
|
179 |
$(CPPOPT) $(SOURCE) -o $$@ \ |
|
180 |
$(call endrule,resourcepreprocess) |
|
487
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
181 |
endif |
3 | 182 |
|
183 |
CLEANTARGETS:= $$(CLEANTARGETS) $(1) |
|
184 |
||
185 |
$(eval DEPENDFILENAME:=$(1).d) |
|
186 |
$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) |
|
187 |
||
188 |
CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) |
|
189 |
ifneq "$(DEPENDFILE)" "" |
|
190 |
ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" |
|
487
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
191 |
ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
462
7f12c652f36d
Fix: Resource stage parse performance affected by huge size of included dependency files
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
192 |
-include $(DEPENDFILE) |
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
193 |
endif |
3 | 194 |
endif |
195 |
endif |
|
196 |
||
197 |
endif |
|
198 |
endef # preprocessresource # |
|
199 |
||
200 |
############################################################################### |
|
201 |
define copyresource |
|
202 |
# $(1) is the source |
|
203 |
# $(2) is the destination |
|
204 |
||
205 |
RELEASABLES:=$$(RELEASABLES) $(2) |
|
206 |
||
207 |
ifeq ($(TARGET_$(call sanitise,$2)),) |
|
208 |
TARGET_$(call sanitise,$2):=1 |
|
209 |
||
210 |
RESOURCE:: $2 |
|
211 |
## perform additional copies of binaries |
|
212 |
# |
|
213 |
$(2): $(1) |
|
214 |
$(call startrule,resourcecopy,FORCESUCCESS) \ |
|
215 |
$(GNUCP) $$< $$@ \ |
|
216 |
$(call endrule,resourcecopy) |
|
217 |
||
218 |
endif |
|
219 |
||
220 |
endef # copyresource # |
|
221 |
||
222 |
############################################################################### |
|
223 |
define generateresource |
|
224 |
||
225 |
# $(1) is the resource filename e.g. /a/b/resource.rsc |
|
226 |
# $(2) is the preprocessed resource to make it from |
|
227 |
# $(3) is the language e.g. sc or 01 or 02 |
|
228 |
||
229 |
||
230 |
ifeq ($(TARGET_$(call sanitise,$1)),) |
|
231 |
TARGET_$(call sanitise,$1):=1 |
|
232 |
||
483
941b2742ee49
Fix a copyright date. Make sure all FLMBDEBUG usage is wrapped in <debug> tags.
timothy.murphy@nokia.com
parents:
479
diff
changeset
|
233 |
$(if $(FLMDEBUG),$(info <debug>generateresource: $(1) from $(2) LANG:$(3)</debug>),) |
941b2742ee49
Fix a copyright date. Make sure all FLMBDEBUG usage is wrapped in <debug> tags.
timothy.murphy@nokia.com
parents:
479
diff
changeset
|
234 |
$(if $(FLMDEBUG),$(info <debug>generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))</debug>)) |
3 | 235 |
|
475 | 236 |
CLEANTARGETS:=$$(CLEANTARGETS) $(1) |
3 | 237 |
|
238 |
RESOURCE:: $(1) |
|
239 |
||
240 |
$(1): $(2) $(RCOMP) |
|
241 |
$(call startrule,resourcecompile,FORCESUCCESS) \ |
|
475 | 242 |
$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) && \ |
243 |
{ $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(GNUCP) $(1) $(F) ; ) } \ |
|
3 | 244 |
$(call endrule,resourcecompile) |
245 |
||
246 |
endif |
|
471
8786668610ae
fix: revert -iquote since older cpps don't understand it
timothy.murphy@nokia.com
parents:
470
diff
changeset
|
247 |
|
3 | 248 |
# Whether or not we have generated this resource for some other variant, check if there |
249 |
# are any new copies to be made for this variant. e.g. winscw requires that we make |
|
475 | 250 |
# some extra copies. We tried to copy after running rcomp itself but we still need these |
251 |
# targets for the sake of dependencies or, for example if someone merely adds a new copy |
|
252 |
# when the resource is up-to-date |
|
3 | 253 |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
254 |
$(if $(FLMDEBUG),$(info <debug>resource copies of $(notdir $1) in: $(RSCCOPYDIRS)</debug>)) |
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
255 |
$(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F))) |
3 | 256 |
|
257 |
# individual source file compilation |
|
258 |
SOURCETARGET_$(call sanitise,$(SOURCE)): $(1) |
|
259 |
||
260 |
endef # generateresource |
|
261 |
||
262 |
||
263 |
############################################################################### |
|
264 |
define generateresourceheader |
|
265 |
# $(1) is the resource header (eg. /epoc32/include/a.rsg) |
|
266 |
# $(2) is the preprocessed resource to make it from |
|
267 |
# $(3) is the language to use (eg. sc) |
|
268 |
||
269 |
RELEASABLES:= $$(RELEASABLES) $(1) |
|
270 |
||
271 |
ifeq ($(TARGET_$(call sanitise,$1)),) |
|
272 |
TARGET_$(call sanitise,$1):=1 |
|
466
b9e5cf94aac3
fix: don't regenrate resources for WINSCW
timothy.murphy@nokia.com
parents:
465
diff
changeset
|
273 |
$(if $(FLMDEBUG),$(info <debug>resourceheader: $(1) from $(2) LANG:$(3)</debug>)) |
3 | 274 |
|
275 |
RESOURCE:: $(1) |
|
276 |
||
277 |
$(1): $(2) $(RCOMP) |
|
278 |
$(call startrule,resourceheader,FORCESUCCESS) \ |
|
279 |
$(RCOMP) -m045,046,047 -u -h$(1) -s$(2) \ |
|
280 |
$(call endrule,resourceheader) |
|
281 |
||
282 |
endif |
|
283 |
||
284 |
||
285 |
# individual source file compilation |
|
286 |
SOURCETARGET_$(call sanitise,$(SOURCE)): $(1) |
|
287 |
||
288 |
endef |
|
289 |
||
290 |
############################################################################### |
|
291 |
## call the generator |
|
292 |
||
293 |
# We always create at least the header |
|
294 |
# even if we sometimes don't create the resources |
|
295 |
ifneq ($(RESOURCEHEADER),) |
|
296 |
$(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG))) |
|
297 |
endif |
|
298 |
||
299 |
ifeq ($(HEADERONLY),) |
|
300 |
# generate a resource file for each language |
|
301 |
# For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
|
464
a6aa62a0998d
fix: prevent regeneration of resources for winscw after an armv5 build
timothy.murphy@nokia.com
parents:
394
diff
changeset
|
302 |
$(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L)))) |
487
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
303 |
|
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
304 |
ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
305 |
$(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) |
fa72431a3f1a
fix: stop including dep files in the depfile generation stage. Remove other unnecessary stuff from RESOURCE_DEPS
timothy.murphy@nokia.com
parents:
486
diff
changeset
|
306 |
endif |
3 | 307 |
else |
308 |
# No resources are going to be made so unless we specifically ask for it, there will be no |
|
309 |
# preprocessed file from which to create the header: |
|
310 |
||
311 |
$(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) |
|
312 |
||
313 |
endif |
|
314 |
||
315 |
############################################################################### |
|
316 |
## .rfi generation in support of the gccxml build |
|
317 |
## Note that .rfi files are created from the dependency files generated from preprocessing resources to create .rpp files |
|
318 |
ifneq ($(RFIFILE),) |
|
319 |
RESOURCE:: $(RFIFILE) |
|
320 |
RELEASABLES:=$(RELEASABLES) $(RFIFILE) |
|
321 |
CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE)) |
|
322 |
||
323 |
RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp) |
|
324 |
$(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES)))) |
|
325 |
endif |
|
326 |
||
327 |
||
328 |
## Clean up |
|
5 | 329 |
$(call raptor_clean,$(CLEANTARGETS)) |
3 | 330 |
# make the output directories while reading makefile - some build engines prefer this |
331 |
$(call makepath,$(CREATABLEPATHS)) |
|
332 |
||
5 | 333 |
# for the --what option and the log file |
3 | 334 |
RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE) |
5 | 335 |
$(call raptor_release,$(RELEASABLES),RESOURCE) |
3 | 336 |