Browse Source

- use message macro

master
vanhofen 4 years ago
parent
commit
bc683e8e7e
  1. 2
      make/buildsystem-bootstrap.mk
  2. 2
      make/buildsystem-clean.mk
  3. 6
      make/buildsystem-helpers.mk
  4. 2
      make/buildsystem-prerequisites.mk
  5. 2
      make/flash-images.mk
  6. 2
      make/flash-updates.mk
  7. 4
      make/linux-kernel.mk
  8. 10
      make/target-rootfs.mk
  9. 5
      support/misc/utils.mk

2
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);
# -----------------------------------------------------------------------------

2
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

6
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);
# -----------------------------------------------------------------------------

2
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
# -----------------------------------------------------------------------------

2
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

2
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")
# -----------------------------------------------------------------------------

4
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)")
# -----------------------------------------------------------------------------

10
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
# -----------------------------------------------------------------------------

5
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'

Loading…
Cancel
Save