diff --git a/Makefile b/Makefile index 21b9e80a..f17d229e 100755 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ help: done: @echo "*************" - @echo -e "*** \033[40;0;32mDone!\033[0m ***" + @echo -e "*** $(TERM_GREEN)Done!$(TERM_NORMAL) ***" @echo "*************" include make/archives.mk diff --git a/make/bootstrap.mk b/make/bootstrap.mk index 703e3d45..b645d206 100644 --- a/make/bootstrap.mk +++ b/make/bootstrap.mk @@ -11,7 +11,7 @@ PLAT_INCS = $(TARGETLIB)/firmware PLAT_LIBS = $(TARGETLIB) $(STATICLIB) bootstrap: $(BOOTSTRAP) - @echo -e "\033[40;0;33mBootstrapped for $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')\033[0m" + @echo -e "$(TERM_YELLOW)Bootstrapped for $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')$(TERM_NORMAL)" skeleton: | $(TARGETPREFIX) cp --remove-destination -a $(SKEL_ROOT)/* $(TARGETPREFIX)/ diff --git a/make/clean.mk b/make/clean.mk index 6ffa38da..ff4e0a3f 100644 --- a/make/clean.mk +++ b/make/clean.mk @@ -12,7 +12,7 @@ static-clean: -rm -rf $(STATIC_DIR) all-clean: rebuild-clean staging-clean static-clean - @echo -e "\n\033[40;0;33mAny other key then CTRL-C will now remove CROSS_BASE and HOSTPREFIX\033[0m" + @echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_BASE and HOSTPREFIX$(TERM_NORMAL)" @read -rm -rf $(CROSS_BASE) -rm -rf $(HOSTPREFIX) diff --git a/make/environment.mk b/make/environment.mk index d6825a16..d3e00d86 100644 --- a/make/environment.mk +++ b/make/environment.mk @@ -180,6 +180,14 @@ TARGET_LDFLAGS_RPATH = $(CORTEX-STRINGS) -Wl,-O1 -Wl,--gc-sections -L$(TARGETLI VPATH = $(D) +TERM_RED = \033[40;0;31m +TERM_RED_BOLD = \033[40;1;31m +TERM_GREEN = \033[40;0;32m +TERM_GREEN_BOLD = \033[40;1;32m +TERM_YELLOW = \033[40;0;33m +TERM_YELLOW_BOLD= \033[40;1;33m +TERM_NORMAL = \033[0m + N_HD_SOURCE ?= $(SOURCE_DIR)/$(FLAVOUR) PATH := $(HOSTPREFIX)/bin:$(CROSS_DIR)/bin:$(HELPERS_DIR):$(PATH) diff --git a/make/images.mk b/make/images.mk index d1e14b4d..45748af4 100644 --- a/make/images.mk +++ b/make/images.mk @@ -127,7 +127,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 "\033[40;1;31m$(IMAGE_TO_CHECK) is too big\033[0m"; \ + echo -e "$(TERM_RED_BOLD)$(IMAGE_TO_CHECK) is too big$(TERM_NORMAL)"; \ false; \ fi endif diff --git a/make/prerequisites.mk b/make/prerequisites.mk index 9b344a55..06b11527 100644 --- a/make/prerequisites.mk +++ b/make/prerequisites.mk @@ -123,14 +123,14 @@ archives-info: archives-list fi; \ done; \ if [ "$$found" = "false" ]; then \ - echo -e "[\033[40;0;31m !! \033[0m] $$target"; \ + echo -e "[$(TERM_RED) !! $(TERM_NORMAL)] $$target"; \ fi; \ done; @echo "[ ** ] Unused archives" @find $(ARCHIVE)/ -type f | \ while read archive; do \ if ! grep -q $$archive $(BUILD_TMP)/archives-list; then \ - echo -e "[\033[40;0;33m rm \033[0m] $$archive"; \ + echo -e "[$(TERM_YELLOW) rm $(TERM_NORMAL)] $$archive"; \ if [ "$(DOCLEANUP)" = "yes" ]; then \ rm $$archive; \ fi; \ @@ -140,10 +140,10 @@ archives-info: archives-list @cat $(BUILD_TMP)/archives-list | \ while read archive; do \ if [ -e $$archive ]; then \ - #echo -e "[\033[40;0;32m ok \033[0m] $$archive"; \ + #echo -e "[$(TERM_GREEN) ok $(TERM_NORMAL)] $$archive"; \ true; \ else \ - echo -e "[\033[40;0;33m -- \033[0m] $$archive"; \ + echo -e "[$(TERM_YELLOW) -- $(TERM_NORMAL)] $$archive"; \ if [ "$(GETMISSING)" = "yes" ]; then \ make $$archive; \ fi; \ @@ -169,7 +169,7 @@ patches-info: fi; \ done; \ if [ "$$found" = "false" ]; then \ - echo -e "[\033[40;0;31m !! \033[0m] $$patch"; \ + echo -e "[$(TERM_RED) !! $(TERM_NORMAL)] $$patch"; \ fi; \ done; diff --git a/make/rootfs.mk b/make/rootfs.mk index 91b04cc2..ca3fcc69 100644 --- a/make/rootfs.mk +++ b/make/rootfs.mk @@ -44,9 +44,9 @@ cleanup: $(BOX) rm -rf $(BOX)/lib/sigc++* find $(BOX) \( -name .gitignore -o -name .gitkeep \) -type f -print0 | xargs --no-run-if-empty -0 rm -f find $(BOX)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f - @echo -e "\033[40;0;33m" + @echo -e "$(TERM_YELLOW)" @du -sh $(BOX) - @echo -e "\033[0m" + @echo -e "$(TERM_NORMAL)" # strip bins and libs in filesystem strip: $(BOX) @@ -60,9 +60,9 @@ ifeq ($(DEBUG), no) ifeq ($(BOXSERIES), hd2) find $(BOX)/lib/modules/$(KVERSION_FULL)/kernel -type f -name '*.ko' | xargs -n 1 $(TARGET)-objcopy --strip-unneeded endif - @echo -e "\033[40;0;33m" + @echo -e "$(TERM_YELLOW)" @du -sh $(BOX) - @echo -e "\033[0m" + @echo -e "$(TERM_NORMAL)" endif ifeq ($(DEBUG), yes) @echo "*******************************************************" @@ -83,9 +83,9 @@ ifeq ($(DEBUG), yes) $(TARGET)-strip $(TARGETPREFIX)/lib/libtalloc.so.1 $(TARGET)-strip $(TARGETPREFIX)/lib/libwbclient.so.0 find $(BOX)/lib/samba -type f -print0 | xargs -0 $(TARGET)-strip || true - @echo -e "\033[40;0;33m" + @echo -e "$(TERM_YELLOW)" @du -sh $(BOX) - @echo -e "\033[0m" + @echo -e "$(TERM_NORMAL)" endif # create softlinks in filesystem