diff --git a/make/buildsystem-bootstrap.mk b/make/buildsystem-bootstrap.mk index 42b5168a..896a2879 100644 --- a/make/buildsystem-bootstrap.mk +++ b/make/buildsystem-bootstrap.mk @@ -27,7 +27,7 @@ endif bootstrap: $(BOOTSTRAP) @touch $(BUILD_DIR)/.$(BOXTYPE)-$(BOXMODEL) $(call draw_line); - @echo -e "$(TERM_YELLOW)Bootstrapped for $(shell echo $(BOXTYPE) | sed 's/.*/\u&/') $(BOXNAME) ($(BOXMODEL))$(TERM_NORMAL)" + @$(call MESSAGE_GREEN,"Bootstrapped for $(shell echo $(BOXTYPE) | sed 's/.*/\u&/') $(BOXNAME) ($(BOXMODEL))") $(call draw_line); # ----------------------------------------------------------------------------- diff --git a/make/buildsystem-clean.mk b/make/buildsystem-clean.mk index 82a832dc..6515140b 100644 --- a/make/buildsystem-clean.mk +++ b/make/buildsystem-clean.mk @@ -40,7 +40,7 @@ ccache-clean: rebuild-clean: host-bin-config-clean target-clean deps-clean build-clean checkout-branches all-clean: rebuild-clean staging-clean host-clean static-base-clean - @echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_BASE$(TERM_NORMAL)" + @$(call MESSAGE_RED,"Any other key then CTRL-C will now remove CROSS_BASE") @read make cross-base-clean diff --git a/make/buildsystem-helpers.mk b/make/buildsystem-helpers.mk index b9204eb1..4dac314e 100644 --- a/make/buildsystem-helpers.mk +++ b/make/buildsystem-helpers.mk @@ -56,7 +56,7 @@ define apply_patches if [ -e $$i -o -e $(PKG_PATCHES_DIR)/$$i ]; then \ if [ -d $$i ]; then \ for p in $$i/*; do \ - echo -e "$(TERM_YELLOW)Applying $${p#$(PKG_PATCHES_DIR)/}$(TERM_NORMAL)"; \ + $(call MESSAGE,"Applying $${p#$(PKG_PATCHES_DIR)/}"); \ if [ $${p:0:1} == "/" ]; then \ patch -p$$l -i $$p; \ else \ @@ -64,7 +64,7 @@ define apply_patches fi; \ done; \ else \ - echo -e "$(TERM_YELLOW)Applying $${i#$(PKG_PATCHES_DIR)/}$(TERM_NORMAL)"; \ + $(call MESSAGE,"Applying $${i#$(PKG_PATCHES_DIR)/}"); \ if [ $${i:0:1} == "/" ]; then \ patch -p$$l -i $$i; \ else \ @@ -159,7 +159,7 @@ changelogs: done: $(call draw_line); - @echo -e "$(TERM_GREEN)Done$(TERM_NORMAL)" + @$(call MESSAGE_GREEN,"Done") $(call draw_line); # ----------------------------------------------------------------------------- diff --git a/make/buildsystem-prerequisites.mk b/make/buildsystem-prerequisites.mk index f746c0b9..f25b6fdb 100644 --- a/make/buildsystem-prerequisites.mk +++ b/make/buildsystem-prerequisites.mk @@ -44,7 +44,7 @@ toolcheck: $(TOOLCHECK) bashcheck: @if test "$(subst /bin/,,$(shell readlink /bin/sh))" != "bash"; then \ - echo -e "$(TERM_YELLOW)WARNING$(TERM_NORMAL): /bin/sh is not linked to bash."; \ + @$(call MESSAGE_RED,"Warning",": /bin/sh is not linked to bash"); \ fi # ----------------------------------------------------------------------------- diff --git a/make/flash-images.mk b/make/flash-images.mk index 291010ac..b540c6d9 100644 --- a/make/flash-images.mk +++ b/make/flash-images.mk @@ -106,7 +106,7 @@ check-image-size: ifdef IMAGE_TO_CHECK @IMAGE_SIZE=$(shell wc -c < $(IMAGE_TO_CHECK)); \ if [ $$IMAGE_SIZE -ge $(ROOTFS_SIZE) ]; then \ - echo -e "$(TERM_RED_BOLD)$(IMAGE_TO_CHECK) is too big$(TERM_NORMAL)"; \ + $(call MESSAGE_RED,"$(IMAGE_TO_CHECK) is too big"); \ false; \ fi endif diff --git a/make/flash-updates.mk b/make/flash-updates.mk index 74fca8f5..7fc359ce 100644 --- a/make/flash-updates.mk +++ b/make/flash-updates.mk @@ -169,7 +169,7 @@ initial-settings: matze-192 P192=`grep -m 1 'position=\"192\"' $(SOURCE_DIR)/$(NI_NEUTRINO)/data/config/satellites.xml`; \ P192=`echo $$P192`; \ $(SED) "/position=\"192\"/c\ $$P192" $(SOURCE_DIR)/$(NI_NEUTRINO)/data/initial/services.xml - @echo -e "$(TERM_YELLOW)Commit your changes in $(SOURCE_DIR)/$(NI_NEUTRINO)/data/initial$(TERM_NORMAL)" + @$(call MESSAGE,"Commit your changes in $(SOURCE_DIR)/$(NI_NEUTRINO)/data/initial") # ----------------------------------------------------------------------------- diff --git a/make/linux-kernel.mk b/make/linux-kernel.mk index 8b4a8abe..0d32d53a 100644 --- a/make/linux-kernel.mk +++ b/make/linux-kernel.mk @@ -396,8 +396,8 @@ kernel-install-coolstream-all: # make clean > /dev/null 2>&1 # - @echo -e "$(TERM_YELLOW)Align stb_update.data in $(SOURCE_DIR)/$(NI_DRIVERS_BIN)$(TERM_NORMAL)" - @echo -e "$(TERM_YELLOW)and commit your changes in $(SOURCE_DIR)/$(NI_DRIVERS_BIN)$(TERM_NORMAL)" + @$(call MESSAGE,"Align stb_update.data in $(SOURCE_DIR)/$(NI_DRIVERS_BIN)") + @$(call MESSAGE,"and commit your changes in $(SOURCE_DIR)/$(NI_DRIVERS_BIN)") # ----------------------------------------------------------------------------- diff --git a/make/target-rootfs.mk b/make/target-rootfs.mk index 23de404e..a54d3060 100644 --- a/make/target-rootfs.mk +++ b/make/target-rootfs.mk @@ -115,10 +115,7 @@ rootfs-cleanup: $(ROOTFS) find $(ROOTFS) \( -name Makefile.am \) -type f -print0 | xargs --no-run-if-empty -0 rm -f find $(ROOTFS)$(base_libdir) \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f find $(ROOTFS)$(libdir) \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f - @echo -e "$(TERM_YELLOW)" - @echo -n "After cleanup: " - @du -sh $(ROOTFS) - @echo -e "$(TERM_NORMAL)" + @$(call MESSAGE,"After cleanup: $$(du -sh $(ROOTFS))") # ----------------------------------------------------------------------------- @@ -152,10 +149,7 @@ ifneq ($(DEBUG),yes) ifeq ($(BOXSERIES),hd2) find $(ROOTFS)/lib/modules/$(KERNEL_VER)/kernel -type f -name '*.ko' | xargs -n 1 $(TARGET_OBJCOPY) --strip-unneeded endif - @echo -e "$(TERM_YELLOW)" - @echo -n "After strip: " - @du -sh $(ROOTFS) - @echo -e "$(TERM_NORMAL)" + @$(call MESSAGE,"After strip: $$(du -sh $(ROOTFS))") endif # ----------------------------------------------------------------------------- diff --git a/support/misc/utils.mk b/support/misc/utils.mk index d2fdf90e..a8607e15 100644 --- a/support/misc/utils.mk +++ b/support/misc/utils.mk @@ -81,8 +81,9 @@ TERM_BOLD := $(shell tput smso 2>/dev/null) TERM_RESET := $(shell tput rmso 2>/dev/null) # MESSAGE Macro -- display a message in bold type -MESSAGE = echo -e "$(TERM_YELLOW)$(call qstrip,$(1))$(TERM_NORMAL)" -#MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)" +MESSAGE = echo -e "$(TERM_YELLOW)$(call qstrip,$(1))$(TERM_NORMAL)$(call qstrip,$(2))" +MESSAGE_GREEN = echo -e "$(TERM_GREEN)$(call qstrip,$(1))$(TERM_NORMAL)$(call qstrip,$(2))" +MESSAGE_RED = echo -e "$(TERM_RED_BOLD)$(call qstrip,$(1))$(TERM_NORMAL)$(call qstrip,$(2))" # Utility functions for 'find' # findfileclauses(filelist) => -name 'X' -o -name 'Y'