-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 948 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Makefile
.PHONY: style show-files clean-logs clean-cache
style:
@echo "Formatting Python files... 💅"
@find . -name '*.py' -exec ruff format --config pyproject.toml {} + -o -name '*.pyi' -exec ruff format --config pyproject.toml {} +
@echo "Formatting C/CPP files... 💅"
@$(foreach file,$(C_FORMATTABLE_FILES), clang-format -i $(file) && echo "✨ Formatted: $(file)";)
@echo "Formatting done! 💖"
show-files:
@echo "📂 Files to be formatted:"
@$(foreach file,$(C_FORMATTABLE_FILES), echo $(file);)
clean-logs:
# Remove all logs dirs
find . -type d -name "logs" -exec rm -rf {} +
find . -type d -name "log" -exec rm -rf {} +
# Remove all log files
find . -name '*.log' -delete
@echo "Clean complete!"
clean-cache:
# Remove Python cache directories
find . -type d -name '__pycache__' -exec rm -rf {} +
# Remove macOS-specific files
find . -name '.DS_Store' -delete
@echo "Clean complete!"
# Makefile ends here