diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Makefile | 31 | ||||
-rw-r--r-- | core/base_rules.mk | 4 | ||||
-rw-r--r-- | core/definitions.mk | 16 |
3 files changed, 33 insertions, 18 deletions
diff --git a/core/Makefile b/core/Makefile index 998cd0804..f7a045512 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,5 +1,16 @@ # Put some miscellaneous rules here +# Build system colors +# +# PFX: Prefix "target C++:" in yellow +# INS: Module "Install:" output color (cyan for ics) + +ifneq ($(BUILD_WITH_COLORS),0) + CL_PFX="\033[33m" + CL_INS="\033[36m" + CL_RST="\033[0m" +endif + # HACK: clear LOCAL_PATH from including last build target before calling # intermedites-dir-for LOCAL_PATH := $(BUILD_SYSTEM) @@ -512,6 +523,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOT_S $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ $(BOOT_SIGNER) /boot $@ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).pk8 $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).x509.pem $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) + @echo -e ${CL_INS}"Made boot image: $@"${CL_RST} .PHONY: bootimage-nodeps bootimage-nodeps: $(MKBOOTIMG) $(BOOT_SIGNER) @@ -541,12 +553,14 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(call pretty,"Target boot image: $@") $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) + @echo -e ${CL_INS}"Made boot image: $@"${CL_RST} .PHONY: bootimage-nodeps bootimage-nodeps: $(MKBOOTIMG) @echo "make $@: ignoring dependencies" $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET) $(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE)) + @echo -e ${CL_INS}"Made boot image: $@"${CL_RST} endif # TARGET_BOOTIMAGE_USE_EXT2 @@ -897,7 +911,7 @@ define build-recoveryimage-target $(if $(filter true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)), \ $(VBOOT_SIGNER) $(FUTILITY) $(1).unsigned $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbpubk $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbprivk $(1).keyblock $(1)) $(hide) $(call assert-max-image-size,$(1),$(BOARD_RECOVERYIMAGE_PARTITION_SIZE)) - @echo ----- Made recovery image: $(1) -------- + @echo -e ${CL_INS}"Made recovery image: $@"${CL_RST} endef $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \ @@ -1040,7 +1054,7 @@ endif $(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) | $(ACP) - @echo "Install system fs image: $@" + @echo -e ${CL_INS}"Install system fs image: $@"${CL_RST} $(copy-file-to-target) $(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)) @@ -1415,7 +1429,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \ $(APKCERTS_FILE) \ $(HOST_OUT_EXECUTABLES)/fs_config \ | $(ACP) - @echo "Package target files: $@" + @echo -e ${CL_PFX}"Package target files:"${CL_RST}" $@" $(hide) rm -rf $@ $(zip_root) $(hide) mkdir -p $(dir $@) $(zip_root) @# Components of the recovery image @@ -1575,7 +1589,7 @@ else endif $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) - @echo "Package OTA: $@" + @echo -e ${CL_PFX}"Package OTA:"${CL_RST}" $@" $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \ $(OTA_FROM_TARGET_SCRIPT) -v \ --block \ @@ -1590,9 +1604,10 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) otapackage: $(INTERNAL_OTA_PACKAGE_TARGET) bacon: otapackage ifneq ($(TARGET_CUSTOM_RELEASETOOL),) - @echo "Running releasetool" + @echo "Running custom releasetool..." $(hide) $(TARGET_CUSTOM_RELEASETOOL) else + @echo "Running releasetool..." $(hide) ./vendor/cm/tools/squisher endif @@ -1619,7 +1634,7 @@ else endif $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) - @echo "Package: $@" + @echo -e ${CL_PFX}"Package:"${CL_RST}" $@" $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \ $(IMG_FROM_TARGET_SCRIPT) -v \ -p $(HOST_OUT) \ @@ -1661,7 +1676,7 @@ name := $(name)-apps-$(FILE_NAME_TAG) APPS_ZIP := $(PRODUCT_OUT)/$(name).zip $(APPS_ZIP): $(INSTALLED_SYSTEMIMAGE) - @echo "Package apps: $@" + @echo -e ${CL_PFX}"Package apps:"${CL_RST}" $@" $(hide) rm -rf $@ $(hide) mkdir -p $(dir $@) $(hide) zip -qj $@ $(TARGET_OUT_APPS)/*/*.apk $(TARGET_OUT_APPS_PRIVILEGED)/*/*.apk @@ -1723,7 +1738,7 @@ name := $(TARGET_PRODUCT)-emulator-$(FILE_NAME_TAG) INTERNAL_EMULATOR_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip $(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES) - @echo "Package: $@" + @echo -e ${CL_PFX}"Package:"${CL_RST}" $@" $(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES) endif diff --git a/core/base_rules.mk b/core/base_rules.mk index ea64cc6a7..ee9916572 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -556,12 +556,12 @@ ifndef LOCAL_UNINSTALLABLE_MODULE $(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD) ifneq ($(LOCAL_ACP_UNAVAILABLE),true) $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP) - @echo "Install: $@" + @echo -e ${CL_INS}"Install: $@"${CL_RST} $(copy-file-to-new-target) $(PRIVATE_POST_INSTALL_CMD) else $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) - @echo "Install: $@" + @echo -e ${CL_INS}"Install: $@"${CL_RST} $(copy-file-to-target-with-cp) endif diff --git a/core/definitions.mk b/core/definitions.mk index 78b0a3912..7ab759aae 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1012,7 +1012,7 @@ endef define transform-cpp-to-o @mkdir -p $(dir $@) -@echo "target $(PRIVATE_ARM_MODE) C++: $(PRIVATE_MODULE) <= $<" +@echo -e ${CL_PFX}"target $(PRIVATE_ARM_MODE) C++:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(hide) $(PRIVATE_CXX) \ $(addprefix -I , $(PRIVATE_C_INCLUDES)) \ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \ @@ -1064,7 +1064,7 @@ $(hide) $(PRIVATE_CC) \ endef define transform-c-to-o-no-deps -@echo "target $(PRIVATE_ARM_MODE) C: $(PRIVATE_MODULE) <= $<" +@echo ${CL_PFX}"target $(PRIVATE_ARM_MODE) C:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(call transform-c-or-s-to-o-no-deps, \ $(PRIVATE_CFLAGS) \ $(PRIVATE_CONLYFLAGS) \ @@ -1073,7 +1073,7 @@ $(call transform-c-or-s-to-o-no-deps, \ endef define transform-s-to-o-no-deps -@echo "target asm: $(PRIVATE_MODULE) <= $<" +@echo -e ${CL_PFX}"target asm:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(call transform-c-or-s-to-o-no-deps, $(PRIVATE_ASFLAGS)) endef @@ -1104,7 +1104,7 @@ endef ########################################################### define transform-m-to-o-no-deps -@echo "target ObjC: $(PRIVATE_MODULE) <= $<" +@echo ${CL_PFX}"target ObjC:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(call transform-c-or-s-to-o-no-deps, $(PRIVATE_CFLAGS) $(PRIVATE_DEBUG_CFLAGS)) endef @@ -1119,7 +1119,7 @@ endef define transform-host-cpp-to-o @mkdir -p $(dir $@) -@echo "host C++: $(PRIVATE_MODULE) <= $<" +@echo -e ${CL_PFX}"host C++:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(hide) $(PRIVATE_CXX) \ $(addprefix -I , $(PRIVATE_C_INCLUDES)) \ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \ @@ -1166,7 +1166,7 @@ $(hide) $(PRIVATE_CC) \ endef define transform-host-c-to-o-no-deps -@echo "host C: $(PRIVATE_MODULE) <= $<" +@echo -e ${CL_PFX}"host C:"${CL_RST}" $(PRIVATE_MODULE) <= $<" $(call transform-host-c-or-s-to-o-no-deps, $(PRIVATE_CFLAGS) $(PRIVATE_CONLYFLAGS) $(PRIVATE_DEBUG_CFLAGS)) endef @@ -1789,7 +1789,7 @@ $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@)) endef define transform-java-to-classes.jar -@echo "target Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))" +@echo -e ${CL_PFX}"target Java:"${CL_RST}" $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))" $(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH)) endef @@ -2270,7 +2270,7 @@ endef ########################################################### define transform-generated-source -@echo "target Generated: $(PRIVATE_MODULE) <= $<" +@echo -e ${CL_PFX}"target Generated:"${CL_RST}" $(PRIVATE_MODULE) <= $<" @mkdir -p $(dir $@) $(hide) $(PRIVATE_CUSTOM_TOOL) endef |