.PHONY: help build test clean install deb rpm release check fmt clippy
help:
@echo "Claude Autonomous Engineering - Build Targets"
@echo "=============================================="
@echo ""
@echo "Development:"
@echo " make build - Build release binary"
@echo " make test - Run all tests"
@echo " make check - Run cargo check"
@echo " make fmt - Format code"
@echo " make clippy - Run clippy linter"
@echo ""
@echo "Installation:"
@echo " make install - Install to /usr/local/bin"
@echo ""
@echo "Packaging:"
@echo " make deb - Build DEB package"
@echo " make rpm - Build RPM package"
@echo " make release - Build all packages"
@echo ""
@echo "Cleanup:"
@echo " make clean - Clean build artifacts"
build:
@echo "🔨 Building release binary..."
cargo build --release
@echo "✓ Binary size: $$(du -h target/release/claude-autonomous | cut -f1)"
test:
@echo "🧪 Running tests..."
cargo test --all
check:
@echo "🔍 Checking code..."
cargo check --all
fmt:
@echo "📝 Formatting code..."
cargo fmt --all
clippy:
@echo "🔧 Running clippy..."
cargo clippy --all -- -D warnings
install: build
@echo "📦 Installing to /usr/local/bin..."
sudo cp target/release/claude-autonomous /usr/local/bin/
sudo chmod +x /usr/local/bin/claude-autonomous
@echo "✓ Installed successfully"
@echo ""
@echo "Verify: claude-autonomous --version"
deb: build
@echo "📦 Building DEB package..."
@if ! command -v cargo-deb > /dev/null; then \
echo "Installing cargo-deb..."; \
cargo install cargo-deb; \
fi
cargo deb
@echo "✓ DEB package created:"
@ls -lh target/debian/*.deb
rpm: build
@echo "📦 Building RPM package..."
@if ! command -v cargo-rpm > /dev/null; then \
echo "Installing cargo-rpm..."; \
cargo install cargo-rpm; \
fi
cargo rpm build
@echo "✓ RPM package created:"
@find target/release/rpmbuild/RPMS -name "*.rpm" -exec ls -lh {} \;
release: clean build test deb
@echo ""
@echo "✅ Release build complete!"
@echo ""
@echo "Generated packages:"
@echo " DEB: $$(ls target/debian/*.deb)"
@echo ""
@echo "Binary info:"
@echo " Size: $$(du -h target/release/claude-autonomous | cut -f1)"
@echo " Strip: $$(file target/release/claude-autonomous)"
clean:
@echo "🧹 Cleaning..."
cargo clean
rm -rf target/debian
rm -rf target/release/rpmbuild
@echo "✓ Cleaned"
ci: check test clippy build
publish-check:
@echo "🔍 Checking crates.io publication..."
cargo publish --dry-run
publish:
@echo "📦 Publishing to crates.io..."
cargo publish