Skip to content

Conversation

@Yin-SHT
Copy link

@Yin-SHT Yin-SHT commented Aug 31, 2025

Description

This PR fixes a portability issue with the Makefile that causes ANSI color codes to be displayed as raw text instead of colored output on various systems.

Problem

The current Makefile uses echo to display colored build messages with ANSI escape sequences. However, echo's handling of escape sequences is inconsistent across different shells and platforms. On my system, the build output shows raw escape codes.

Solution

Replaced all echo commands with printf, which consistently interprets escape sequences across all POSIX-compliant systems:

# Before
@echo "  \033[1;32mCC\033[0m $@"

# After  
@printf "  \033[1;32mCC\033[0m $@\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant