198 # note: includeheaders.txt is neither tracked as a formal dependency, nor deleted during a clean. This mirrors |
198 # note: includeheaders.txt is neither tracked as a formal dependency, nor deleted during a clean. This mirrors |
199 # the situation with ABLD where the GCCXML build continually updates the file as it finds it. |
199 # the situation with ABLD where the GCCXML build continually updates the file as it finds it. |
200 define gccxmlprocesssource |
200 define gccxmlprocesssource |
201 |
201 |
202 $(eval DEPENDFILENAME:=$(call mapsource2output,$(1),.xml.d)) |
202 $(eval DEPENDFILENAME:=$(call mapsource2output,$(1),.xml.d)) |
203 $(eval DEPENDFILE:=$(DEPENDFILENAME)) |
203 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) |
204 |
204 |
205 $(call mapsource2output,$(1),.xml): $(1) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) |
205 $(call mapsource2output,$(1),.xml): $(1) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) |
206 $(call startrule,gccxmlprocesssource) \ |
206 $(call startrule,gccxmlprocesssource) \ |
207 $(CC) $(CFLAGS) $(OPTION_GCCXML) \ |
207 $(CC) $(CFLAGS) $(OPTION_GCCXML) \ |
208 $(if $(filter $(CIAFILEEXTENSIONS),$(1)),$(call makemacrodef,$(OPT.DEFINE),__CIA__),) \ |
208 $(if $(filter $(CIAFILEEXTENSIONS),$(1)),$(call makemacrodef,$(OPT.DEFINE),__CIA__),) \ |
212 -fxml="$$@" -MD "$$@.d" -MT "$$@" $(OPT.OUT) nul "$(1)" && \ |
212 -fxml="$$@" -MD "$$@.d" -MT "$$@" $(OPT.OUT) nul "$(1)" && \ |
213 $(GNUSED) '/^.*\.xml:.*$$$$/d;/^ [a-zA-Z].*$$$$/d;s/^ //;s/ \\\$$$$//;s/\/\//\//g;/^s*$$$$/d' < $$@.d | $(GNUAWK) '{sub(/ /,"\n")};1' >> $(INCLUDESFILE) \ |
213 $(GNUSED) '/^.*\.xml:.*$$$$/d;/^ [a-zA-Z].*$$$$/d;s/^ //;s/ \\\$$$$//;s/\/\//\//g;/^s*$$$$/d' < $$@.d | $(GNUAWK) '{sub(/ /,"\n")};1' >> $(INCLUDESFILE) \ |
214 $(call endrule,gccxmlprocesssource) |
214 $(call endrule,gccxmlprocesssource) |
215 |
215 |
216 CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) |
216 CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) |
217 ifneq "$(DEPENDFILE)" "" |
217 ifneq ($(DEPENDFILE),) |
218 ifeq ($(NO_DEPEND_INCLUDE),) |
218 ifeq ($(NO_DEPEND_INCLUDE),) |
219 ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" |
219 ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),) |
220 -include $(DEPENDFILE) |
220 -include $(DEPENDFILE) |
|
221 endif |
221 endif |
222 endif |
222 endif |
|
223 endif |
223 endif |
224 |
224 |
225 endef |
225 endef |
226 $(foreach SRCFILE,$(SOURCE),$(eval $(call gccxmlprocesssource,$(SRCFILE)))) |
226 $(foreach SRCFILE,$(SOURCE),$(eval $(call gccxmlprocesssource,$(SRCFILE)))) |
227 |
227 |