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:
Benjamin Vedder 2022-03-07 15:31:52 +01:00 committed by GitHub
commit 8c8a56eab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 4 deletions

View File

@ -215,7 +215,9 @@ $(foreach board, $(ALL_BOARD_NAMES), $(eval $(call FW_TEMPLATE,$(board),$(BUILD_
############################## ##############################
.PHONY: all_fw_package .PHONY: all_fw_package
all_fw_package: all_fw all_fw_package: all_fw all_fw_package_clean
$(V0) @echo " PACKAGE $(ROOT_DIR)/package/*"
# Place all firmware files into `./package` directory # Place all firmware files into `./package` directory
$(V1) python3 package_firmware.py $(V1) python3 package_firmware.py
@ -229,6 +231,15 @@ else
$(V1) pwsh -noprofile -command {Remove-Item $(BUILD_CRUFT)} $(V1) pwsh -noprofile -command {Remove-Item $(BUILD_CRUFT)}
endif 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
############################## ##############################
# #