build system: separate cbfstool add invocations into separate commands
They used to be chained into a single make shell invocation but now they're individual commands, which makes them easier to manage. Change-Id: I22394fd31989d5180790818153f466c0e7ebbedd Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13499 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
4ba65aacae
commit
172f886586
17
Makefile.inc
17
Makefile.inc
|
@ -649,8 +649,8 @@ ifeq ($(CONFIG_CBFS_AUTOGEN_ATTRIBUTES),y)
|
||||||
cbfs-autogen-attributes=-g
|
cbfs-autogen-attributes=-g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cbfs-add-cmd = \
|
define cbfs-add-cmd
|
||||||
printf " CBFS $(call extract_nth,2,$(file))\n"; \
|
printf " CBFS $(call extract_nth,2,$(file))\n"
|
||||||
$(CBFSTOOL) $@.tmp \
|
$(CBFSTOOL) $@.tmp \
|
||||||
add$(if $(filter stage,$(call extract_nth,3,$(file))),-stage)$(if $(filter payload,$(call extract_nth,3,$(file))),-payload) \
|
add$(if $(filter stage,$(call extract_nth,3,$(file))),-stage)$(if $(filter payload,$(call extract_nth,3,$(file))),-payload) \
|
||||||
-f $(call extract_nth,1,$(file)) \
|
-f $(call extract_nth,1,$(file)) \
|
||||||
|
@ -658,14 +658,15 @@ cbfs-add-cmd = \
|
||||||
$(if $(filter-out stage,$(call extract_nth,3,$(file))),-t $(call extract_nth,3,$(file))) \
|
$(if $(filter-out stage,$(call extract_nth,3,$(file))),-t $(call extract_nth,3,$(file))) \
|
||||||
$(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file))) $(cbfs-autogen-attributes)\
|
$(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file))) $(cbfs-autogen-attributes)\
|
||||||
-r $(call regions-for-file,$(call extract_nth,2,$(file))) \
|
-r $(call regions-for-file,$(call extract_nth,2,$(file))) \
|
||||||
$(call extract_nth,7,$(file))
|
$(call extract_nth,7,$(file)) $(1)
|
||||||
|
endef
|
||||||
|
|
||||||
cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
|
cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
|
||||||
ifneq ($(CONFIG_UPDATE_IMAGE),y)
|
ifneq ($(CONFIG_UPDATE_IMAGE),y)
|
||||||
prebuild-files = \
|
prebuild-files = \
|
||||||
$(foreach file,$(cbfs-files), \
|
$(foreach file,$(cbfs-files), \
|
||||||
$(if $(call extract_nth,6,$(file)),$(cbfs-add-cmd) -a $(call extract_nth,6,$(file)) &&, \
|
$(if $(call extract_nth,6,$(file)),$(call cbfs-add-cmd,-a $(call extract_nth,6,$(file))), \
|
||||||
$(cbfs-add-cmd) $(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) &&))
|
$(call cbfs-add-cmd,$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))))))
|
||||||
prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
|
prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
|
||||||
|
|
||||||
ifeq ($(CONFIG_FMDFILE),)
|
ifeq ($(CONFIG_FMDFILE),)
|
||||||
|
@ -764,9 +765,9 @@ prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
|
||||||
prebuild-files = \
|
prebuild-files = \
|
||||||
$(foreach file,$(cbfs-files), \
|
$(foreach file,$(cbfs-files), \
|
||||||
$(CBFSTOOL) $@.tmp remove -n $(call extract_nth,2,$(file)) 2>/dev/null ; \
|
$(CBFSTOOL) $@.tmp remove -n $(call extract_nth,2,$(file)) 2>/dev/null ; \
|
||||||
$(if $(call extract_nth,6,$(file)),$(cbfs-add-cmd) -a $(call extract_nth,6,$(file)) &&,\
|
$(if $(call extract_nth,6,$(file)),$(call cbfs-add-cmd,-a $(call extract_nth,6,$(file))),\
|
||||||
$(cbfs-add-cmd) $(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) \
|
$(call cbfs-add-cmd,$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) \
|
||||||
$(cbfs-autogen-attributes) &&))
|
$(cbfs-autogen-attributes))))
|
||||||
|
|
||||||
.PHONY: $(obj)/coreboot.pre
|
.PHONY: $(obj)/coreboot.pre
|
||||||
$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL)
|
$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL)
|
||||||
|
|
Loading…
Reference in New Issue