Browse Source

- replace terminal-colors with more readable variables

master
vanhofen 8 years ago
parent
commit
f33aa27084
  1. 2
      Makefile
  2. 2
      make/bootstrap.mk
  3. 2
      make/clean.mk
  4. 8
      make/environment.mk
  5. 2
      make/images.mk
  6. 10
      make/prerequisites.mk
  7. 12
      make/rootfs.mk

2
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

2
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)/

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

8
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)

2
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

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

12
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

Loading…
Cancel
Save