mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
FIX: EXTRA_FLAGS not forcing a rebuild when changed. (#12116)
This commit is contained in:
parent
7fff10d536
commit
dc940e3132
1 changed files with 10 additions and 2 deletions
12
Makefile
12
Makefile
|
@ -303,6 +303,9 @@ TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).map
|
|||
|
||||
TARGET_EXST_HASH_SECTION_FILE = $(OBJECT_DIR)/$(TARGET)/exst_hash_section.bin
|
||||
|
||||
TARGET_EF_HASH := $(shell echo -n "$(EXTRA_FLAGS)" | openssl dgst -md5 | awk '{print $$2;}')
|
||||
TARGET_EF_HASH_FILE := $(OBJECT_DIR)/$(TARGET)/.efhash_$(TARGET_EF_HASH)
|
||||
|
||||
CLEAN_ARTIFACTS := $(TARGET_BIN)
|
||||
CLEAN_ARTIFACTS += $(TARGET_HEX_REV) $(TARGET_HEX)
|
||||
CLEAN_ARTIFACTS += $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
|
||||
|
@ -643,9 +646,14 @@ test_versions:
|
|||
test_%:
|
||||
$(V0) cd src/test && $(MAKE) $@
|
||||
|
||||
$(TARGET_EF_HASH_FILE):
|
||||
$(V1) mkdir -p $(dir $@)
|
||||
$(V0) rm -f $(OBJECT_DIR)/$(TARGET)/.efhash_*
|
||||
@echo "EF HASH -> $(TARGET_EF_HASH_FILE)"
|
||||
$(V1) touch $(TARGET_EF_HASH_FILE)
|
||||
|
||||
# rebuild everything when makefile changes
|
||||
$(TARGET_OBJS): Makefile $(TARGET_DIR)/target.mk $(wildcard make/*)
|
||||
# rebuild everything when makefile changes or the extra flags have changed
|
||||
$(TARGET_OBJS): $(TARGET_EF_HASH_FILE) Makefile $(TARGET_DIR)/target.mk $(wildcard make/*)
|
||||
|
||||
# include auto-generated dependencies
|
||||
-include $(TARGET_DEPS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue