diff options
author | Tony Theodore <tonyt@logyst.com> | 2014-03-12 04:36:14 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2014-03-12 04:36:14 (GMT) |
commit | b205fc8d97f0679e7c6a732d707157fceea133a1 (patch) | |
tree | 1d14b44766bf25ea90b9fc4c2ac2e891f6f911a0 | |
parent | e84eadbb28abd75962628c6630831634c75fc660 (diff) | |
parent | 97402e08def16e39063e36d0b580d4a119eabaa8 (diff) | |
download | mxe-b205fc8d97f0679e7c6a732d707157fceea133a1.zip mxe-b205fc8d97f0679e7c6a732d707157fceea133a1.tar.gz mxe-b205fc8d97f0679e7c6a732d707157fceea133a1.tar.bz2 |
Merge pull request #343 from TimothyGu/codename-clarity
Make download-* targets display "[download] *" instead of log
-rw-r--r-- | Makefile | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -252,9 +252,23 @@ LOOKUP_PKG_RULE = $(strip \ define PKG_RULE .PHONY: download-$(1) download-$(1):: $(addprefix download-,$(value $(call LOOKUP_PKG_RULE,$(1),DEPS,$(3)))) - if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ - $(call DOWNLOAD_PKG_ARCHIVE,$(1)); \ - $(call CHECK_PKG_ARCHIVE,$(1)) || { echo 'Wrong checksum!'; exit 1; }; \ + @[ -d '$(LOG_DIR)/$(TIMESTAMP)' ] || mkdir -p '$(LOG_DIR)/$(TIMESTAMP)' + @if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ + echo '[download] $(1)'; \ + ($(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \ + ln -sf '$(TIMESTAMP)/$(1)-download' '$(LOG_DIR)/$(1)-download'; \ + if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ + echo; \ + echo 'Download failed or wrong checksum of package $(1)!'; \ + echo '------------------------------------------------------------'; \ + $(if $(findstring undefined, $(origin MXE_VERBOSE)),\ + tail -n 10 '$(LOG_DIR)/$(1)-download' | $(SED) -n '/./p';, \ + $(SED) -n '/./p' '$(LOG_DIR)/$(1)-download';) \ + echo '------------------------------------------------------------'; \ + echo '[log] $(LOG_DIR)/$(1)-download'; \ + echo; \ + exit 1; \ + fi; \ fi .PHONY: $(1) |