blob: 16d98bb58f8da4e082969bbf500007f69eb2ce60 (
plain) (
blame)
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
|
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 $^
%.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 <name> is the file name w/o .cc suffix):"
@echo " <name>.x only execute <name>.cc"
@echo " <name>.l only lint <name>.cc"
@echo " <name>.f only re-format <name>.cc"
|