SRC = $(shell git ls-files '*.cc') check: $(SRC:.cc=.x) lint : $(SRC:.cc=.l) fmt : $(SRC:.cc=.f) %.x: %.cc bash $^ %.l: %.cc clang-format -n --Werror $^ clang-tidy $^ -- -std=c++20 %.f: %.cc clang-format -i $^ help: @echo "Targets that apply to all .cc files under scm:" @echo "* check execute build commands in each file" @echo " lint clang-format & clang-tidy lint" @echo " fmt re-format each file" @echo "" @echo "Targets that apply to a single .cc file (where is the file name w/o .cc suffix):" @echo " .x only execute .cc" @echo " .l only lint .cc" @echo " .f only re-format .cc"