PACKAGE_NAME := css_parser
TARGET_DIR := target/debug
EXECUTABLE := $(TARGET_DIR)/$(PACKAGE_NAME)
.PHONY: run
run: build
@echo "Running the program..."
$(EXECUTABLE)
.PHONY: build
build:
@echo "Building the project..."
cargo build
.PHONY: test
test:
@echo "Running tests..."
cargo test
.PHONY: lint
lint:
@echo "Running Clippy for linting..."
cargo clippy -- -D warnings
.PHONY: fmt
fmt:
@echo "Formatting code..."
cargo fmt
.PHONY: check
check: fmt lint test
@echo "All checks passed!"
.PHONY: clean
clean:
@echo "Cleaning the project..."
cargo clean
.PHONY: all
all: clean fmt lint build test run
.PHONY: help
help:
@echo "Available commands:"
@echo " make run - Build and run the program"
@echo " make build - Build the project"
@echo " make test - Run tests"
@echo " make lint - Run Clippy for linting"
@echo " make fmt - Format the code"
@echo " make check - Run format, lint, and test"
@echo " make clean - Clean the project"
@echo " make all - Clean, format, lint, build, test, and run the project"