colormake-0.1.0 is not a library.
ColorMake
A fast, lightweight tool to colorize make output for better readability.
Installation
Using Cargo Install
Manual Installation
Or using the Makefile:
Uninstallation
Using Cargo Uninstall
Manual Uninstallation
Or using the Makefile:
Usage
As a Make Wrapper (Recommended)
Use colormake as a drop-in replacement for make:
# Basic usage - runs 'make' with colored output
# Pass arguments to make
# Use a different make command
# Custom make arguments
As a Pipe Filter
Pipe make output through colormake:
|
|
Options
--help: Show help message--version: Show version information--no-color: Disable color output (overrides automatic terminal detection)--cols N: Set output width (columns). Long lines are truncated with " .. " separator--lines N: Number of lines to display (reserved for future use)--show-config: Display color scheme configuration--make-cmd CMD: Specify make command to execute (default: "make")- Trailing arguments: Passed directly to make command
Automatic Features
- Terminal Detection: Colors are automatically enabled when output is to a
terminal (TTY) and
TERMis not "dumb" or "unknown" - stdout/stderr Merging: Both standard output and error streams are merged and colorized together
- Whitespace Normalization: Multiple spaces are collapsed to single spaces for cleaner output
Examples
# Standard build with colors
# Parallel build
# Build with custom flags
# Disable colors
# Show color scheme
# Use with gmake
Features
- Fast: Uses regex-lite and buffered I/O for performance
- Type-safe: Uses enums instead of string matching
- Error handling: Proper error propagation
- Zero dependencies: Only uses regex-lite and clap
- Multi-compiler Support: Recognizes gcc, g++, clang, rustc, cargo, CC, CXX, and libtool prefixes
- Smart Line Truncation: Long lines are intelligently truncated with prefix and suffix preservation
- Automatic Terminal Detection: Enables colors only when appropriate
Color Scheme
- Make commands: Cyan
- Compiler commands: Magenta (bright) - supports gcc, g++, clang, rustc, cargo, CC, CXX, and libtool
- Filenames: Yellow
- Line numbers: Cyan
- Errors: Yellow (bright) with highlighting
- Warnings: Green
- Notes: Yellow
Development
The project includes a Makefile for common development tasks:
# Run tests
# Build release binary (runs tests first)
# Install to /usr/local/bin (requires sudo)
# Uninstall from /usr/local/bin (requires sudo)
# Clean build artifacts
Acknowledgments
This initiative expands on the efforts of:
License
This project is licensed under the GPL-3.0 license. See the LICENSE file for details.