mirror of https://github.com/rusefi/bldc.git
Merge pull request #433 from kubark42/make_package_delete_prior_files
`make all_fw_package` delete prior files and improve console output
This commit is contained in:
commit
8c8a56eab2
19
Makefile
19
Makefile
|
@ -215,20 +215,31 @@ $(foreach board, $(ALL_BOARD_NAMES), $(eval $(call FW_TEMPLATE,$(board),$(BUILD_
|
|||
##############################
|
||||
|
||||
.PHONY: all_fw_package
|
||||
all_fw_package: all_fw
|
||||
# Place all firmware files into `./package` directory
|
||||
all_fw_package: all_fw all_fw_package_clean
|
||||
$(V0) @echo " PACKAGE $(ROOT_DIR)/package/*"
|
||||
|
||||
# Place all firmware files into `./package` directory
|
||||
$(V1) python3 package_firmware.py
|
||||
|
||||
# Find all the leftover object and lst files
|
||||
# Find all the leftover object and lst files
|
||||
$(eval BUILD_CRUFT := $(call rwildcard,$(ROOT_DIR)/build,*.lst *.o))
|
||||
|
||||
# Delete the cruft files, so as not to unnecessarily consume GB of space
|
||||
# Delete the cruft files, so as not to unnecessarily consume GB of space
|
||||
ifneq ($(OSFAMILY), windows)
|
||||
$(V1) $(RM) $(BUILD_CRUFT)
|
||||
else
|
||||
$(V1) pwsh -noprofile -command {Remove-Item $(BUILD_CRUFT)}
|
||||
endif
|
||||
|
||||
.PHONY: all_fw_package_clean
|
||||
all_fw_package_clean:
|
||||
$(V0) @echo " CLEAN $(ROOT_DIR)/package/*"
|
||||
ifneq ($(OSFAMILY), windows)
|
||||
$(V1) [ ! -d "$(ROOT_DIR)/package/*" ] || $(RM) -r $(ROOT_DIR)/package/*
|
||||
else
|
||||
$(V1) pwsh -noprofile -command if (Test-Path $(ROOT_DIR)/package/*) {Remove-Item -Recurse $(ROOT_DIR)/package/*}
|
||||
endif
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue