mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 17:14:21 +00:00
build(romlib): don't timestamp generated wrappers
The Makefile rule for the libwrappers object files places a dependency on a timestamp file. This timestamp file is created by the recipe that generates the libwrappers sources, and was presumably introduced to indicate to Make that all of the source files are generated simultaneously by that rule. Instead, we can use a grouped target rule, which uses `&:` instead of `:`. This communicates to Make that all of the targets listed are generated at once. To demonstrate, the following two Makefile rules differ in their behaviour: a.x b.x c.x: # targets may be updated independently ... # generate a.x, b.x and c.x a.x b.x c.x &: # all targets are updated at once ... # generate a.x, b.x and c.x While both recipes do generate all three files, only the second rule communicates this fact to Make. As such, Make can reason that if one of the files is up to date then all of them are, and avoid re-running the rule for any generated file that it has not already run it for. Change-Id: I10b49eb72b5276c7f9bd933900833b03a61cff2f Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
parent
d9db846766
commit
ae4795261a
1 changed files with 2 additions and 5 deletions
|
@ -84,14 +84,11 @@ $(BUILD_DIR)/jmptbl.i: ../../$(PLAT_DIR)/jmptbl.i
|
|||
@echo " PRE $@"
|
||||
$(Q)$(ROMLIB_GEN) pre --output $@ --deps $(BUILD_DIR)/jmptbl.d $<
|
||||
|
||||
$(BUILD_DIR)/wrappers.stamp: $(BUILD_DIR)/jmptbl.i
|
||||
$(WRAPPER_SOURCES) &: $(BUILD_DIR)/jmptbl.i
|
||||
@echo " WRP $<"
|
||||
$(Q)$(ROMLIB_GEN) genwrappers --bti=$(ENABLE_BTI) -b $(WRAPPER_DIR) $<
|
||||
@touch $@
|
||||
|
||||
$(WRAPPER_SOURCES): $(BUILD_DIR)/wrappers.stamp
|
||||
|
||||
$(WRAPPER_OBJS): $(WRAPPER_SOURCES) $(BUILD_DIR)/wrappers.stamp
|
||||
$(WRAPPER_OBJS): $(WRAPPER_DIR)/%.o: $(WRAPPER_DIR)/%.s
|
||||
|
||||
$(BUILD_DIR)/jmptbl.s: $(BUILD_DIR)/jmptbl.i
|
||||
@echo " TBL $@"
|
||||
|
|
Loading…
Add table
Reference in a new issue