move target sentinel rules to separate makefile
This commit is contained in:
parent
e63367e8d1
commit
b9672fb8d5
|
@ -387,6 +387,8 @@ ULIBS = -lm --specs=nano.specs -Wl,--sort-section=alignment
|
||||||
|
|
||||||
include $(RULESFILE)
|
include $(RULESFILE)
|
||||||
|
|
||||||
|
include target_sentinel.mk
|
||||||
|
|
||||||
include rusefi_config.mk
|
include rusefi_config.mk
|
||||||
|
|
||||||
# Enable precompiled header
|
# Enable precompiled header
|
||||||
|
|
|
@ -357,6 +357,8 @@ ULIBS = -lm --specs=nano.specs
|
||||||
|
|
||||||
include $(RULESFILE)
|
include $(RULESFILE)
|
||||||
|
|
||||||
|
include $(PROJECT_DIR)/target_sentinel.mk
|
||||||
|
|
||||||
ifneq (yes,$(SUBMAKE))
|
ifneq (yes,$(SUBMAKE))
|
||||||
include $(PROJECT_DIR)/rusefi_config.mk
|
include $(PROJECT_DIR)/rusefi_config.mk
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
include $(PROJECT_DIR)/../java_tools/java_tools.mk
|
include $(PROJECT_DIR)/../java_tools/java_tools.mk
|
||||||
|
|
||||||
TGT_SENTINEL = $(PROJECT_DIR)/.target-sentinel
|
|
||||||
|
|
||||||
# We're assuming that META_OUTPUT_ROOT_FOLDER is a path relative to PROJECT_DIR
|
# We're assuming that META_OUTPUT_ROOT_FOLDER is a path relative to PROJECT_DIR
|
||||||
INI_FILE = $(PROJECT_DIR)/$(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini
|
INI_FILE = $(PROJECT_DIR)/$(META_OUTPUT_ROOT_FOLDER)tunerstudio/generated/rusefi_$(SHORT_BOARD_NAME).ini
|
||||||
SIG_FILE = $(PROJECT_DIR)/tunerstudio/generated/signature_$(SHORT_BOARD_NAME).txt
|
SIG_FILE = $(PROJECT_DIR)/tunerstudio/generated/signature_$(SHORT_BOARD_NAME).txt
|
||||||
|
@ -46,16 +44,6 @@ $(TCPPOBJS): $(RAMDISK)
|
||||||
$(SIG_FILE): .FORCE
|
$(SIG_FILE): .FORCE
|
||||||
bash $(PROJECT_DIR)/gen_signature.sh $(SHORT_BOARD_NAME)
|
bash $(PROJECT_DIR)/gen_signature.sh $(SHORT_BOARD_NAME)
|
||||||
|
|
||||||
# This sentinel's purpose is to trigger rebuilds when building for a different target.
|
|
||||||
# SHORT_BOARD_NAME doesn't cover all possible changes.
|
|
||||||
# For example, if I build Proteus F7, then build Proteus F7 Debug, it won't actually rebuild,
|
|
||||||
# because SHORT_BOARD_NAME hasn't changed. BUNDLE_NAME would be a better specifier,
|
|
||||||
# but it's currently only available from the build_firmware GHA workflow.
|
|
||||||
# Another option would be to use BOARD_META_PATH, and export it in config.sh.
|
|
||||||
$(TGT_SENTINEL): .FORCE
|
|
||||||
if [ "$$(cat $@ 2>/dev/null)" != $(SHORT_BOARD_NAME) ]; then \
|
|
||||||
echo $(SHORT_BOARD_NAME) >$@; fi
|
|
||||||
|
|
||||||
# Most sentinels are used for multiple targets that are created with a single recipe.
|
# Most sentinels are used for multiple targets that are created with a single recipe.
|
||||||
# In newer versions of GNU Make this is done using the &: operator,
|
# In newer versions of GNU Make this is done using the &: operator,
|
||||||
# but for supporting older versions, we do it this way.
|
# but for supporting older versions, we do it this way.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
TGT_SENTINEL = $(PROJECT_DIR)/.target-sentinel
|
||||||
|
|
||||||
|
# This sentinel's purpose is to trigger rebuilds when building for a different target.
|
||||||
|
# SHORT_BOARD_NAME doesn't cover all possible changes.
|
||||||
|
# For example, if I build Proteus F7, then build Proteus F7 Debug, it won't actually rebuild,
|
||||||
|
# because SHORT_BOARD_NAME hasn't changed. BUNDLE_NAME would be a better specifier,
|
||||||
|
# but it's currently only available from the build_firmware GHA workflow.
|
||||||
|
# Another option would be to use BOARD_META_PATH, and export it in config.sh.
|
||||||
|
$(TGT_SENTINEL): .FORCE
|
||||||
|
if [ "$$(cat $@ 2>/dev/null)" != $(SHORT_BOARD_NAME) ]; then \
|
||||||
|
echo $(SHORT_BOARD_NAME) >$@; fi
|
||||||
|
|
||||||
|
.FORCE:
|
Loading…
Reference in New Issue