mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-02 16:00:27 -04:00
13 lines
705 B
Makefile
13 lines
705 B
Makefile
# make-format.snippet.mk — appended to the project's Makefile by decomp-architect (Step 8).
|
|
# `make format` rewrites every C source and header under src/ with the tracked .clang-format; `make format-check`
|
|
# is the same run in dry mode with warnings as errors (a CI-able check, no game bytes needed). Dotfiles under src/
|
|
# are excluded so a tool's live probe file is never formatted into the tree.
|
|
|
|
.PHONY: format format-check
|
|
|
|
format:
|
|
find src -type f \( -name '*.c' -o -name '*.h' \) -not -name '.*' -print0 | xargs -0 -r clang-format -i --style=file
|
|
|
|
format-check:
|
|
find src -type f \( -name '*.c' -o -name '*.h' \) -not -name '.*' -print0 | xargs -0 -r clang-format --dry-run --Werror --style=file
|