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 ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
174 $(1): $(1).d |
175 $(1): $(1).d |
175 $(call startrule,resourcepreprocess,FORCESUCCESS) \ |
176 $(call startrule,resourcepreprocess,FORCESUCCESS) \ |
176 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
177 $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ |
177 $(CPPOPT) $(SOURCE) -o $$@ \ |
178 $(CPPOPT) $(SOURCE) -o $$@ \ |
178 $(call endrule,resourcepreprocess) |
179 $(call endrule,resourcepreprocess) |
|
180 endif |
179 |
181 |
180 CLEANTARGETS:= $$(CLEANTARGETS) $(1) |
182 CLEANTARGETS:= $$(CLEANTARGETS) $(1) |
181 |
183 |
182 $(eval DEPENDFILENAME:=$(1).d) |
184 $(eval DEPENDFILENAME:=$(1).d) |
183 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) |
185 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) |
184 |
186 |
185 CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) |
187 CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) |
186 ifneq "$(DEPENDFILE)" "" |
188 ifneq "$(DEPENDFILE)" "" |
187 ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" |
189 ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" |
188 ifeq "$(filter RESOURCE_DEPS,$(call uppercase,$(MAKECMDGOALS)))" "" |
190 ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
189 -include $(DEPENDFILE) |
191 -include $(DEPENDFILE) |
190 endif |
192 endif |
191 endif |
193 endif |
192 endif |
194 endif |
193 |
195 |
204 ifeq ($(TARGET_$(call sanitise,$2)),) |
206 ifeq ($(TARGET_$(call sanitise,$2)),) |
205 TARGET_$(call sanitise,$2):=1 |
207 TARGET_$(call sanitise,$2):=1 |
206 |
208 |
207 RESOURCE:: $2 |
209 RESOURCE:: $2 |
208 ## perform additional copies of binaries |
210 ## perform additional copies of binaries |
209 # |
|
210 # Only certain builds require further copies of the generated resource binaries |
|
211 # |
211 # |
212 $(2): $(1) |
212 $(2): $(1) |
213 $(call startrule,resourcecopy,FORCESUCCESS) \ |
213 $(call startrule,resourcecopy,FORCESUCCESS) \ |
214 $(GNUCP) $$< $$@ \ |
214 $(GNUCP) $$< $$@ \ |
215 $(call endrule,resourcecopy) |
215 $(call endrule,resourcecopy) |
297 |
297 |
298 ifeq ($(HEADERONLY),) |
298 ifeq ($(HEADERONLY),) |
299 # generate a resource file for each language |
299 # generate a resource file for each language |
300 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
300 # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. |
301 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L)))) |
301 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L)))) |
302 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) |
302 |
|
303 ifeq "$(MAKEFILE_GROUP)" "RESOURCE" |
|
304 $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) |
|
305 endif |
303 else |
306 else |
304 # No resources are going to be made so unless we specifically ask for it, there will be no |
307 # No resources are going to be made so unless we specifically ask for it, there will be no |
305 # preprocessed file from which to create the header: |
308 # preprocessed file from which to create the header: |
306 |
309 |
307 $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) |
310 $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) |