use sentinel file with short board name to trigger rebuilds on target changes

This commit is contained in:
David Holdeman 2024-02-28 21:46:19 -06:00 committed by rusefillc
parent d3461e3905
commit 1270d5d34d
1 changed files with 6 additions and 2 deletions

View File

@ -37,15 +37,19 @@ $(TCPPOBJS): $(RAMDISK)
$(SIG_FILE): .FORCE
bash $(PROJECT_DIR)/gen_signature.sh $(SHORT_BOARD_NAME)
.target-sentinel: .FORCE
if [ "$$(cat $@ 2>/dev/null)" != $(SHORT_BOARD_NAME) ]; then \
echo $(SHORT_BOARD_NAME) >$@; fi
$(RAMDISK): .ramdisk-sentinel ;
.ramdisk-sentinel: $(INI_FILE)
.ramdisk-sentinel: $(INI_FILE) .target-sentinel
bash $(PROJECT_DIR)/bin/gen_image_board.sh $(BOARD_DIR) $(SHORT_BOARD_NAME)
@touch $@
$(CONFIG_FILES): .config-sentinel ;
.config-sentinel: $(CONFIG_INPUTS) $(CONFIG_DEFINITION)
.config-sentinel: $(CONFIG_INPUTS) $(CONFIG_DEFINITION) .target-sentinel
ifneq (,$(CUSTOM_GEN_CONFIG))
bash $(BOARD_DIR)/$(CUSTOM_GEN_CONFIG)
else