aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-03 22:16:37 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-07-03 22:16:37 +0200
commit07c77d4c24177ac3e11cafd27f34c9a758008db6 (patch)
tree3f3bd5c35fc89799203290369886825050d01b59 /Makefile
parent26f0cbe721028bdd1733db3424d38490c3f85b94 (diff)
downloadcpp-utils-07c77d4c24177ac3e11cafd27f34c9a758008db6.tar.gz
cpp-utils-07c77d4c24177ac3e11cafd27f34c9a758008db6.zip
make: add clang-format lint target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 447467c..97ca475 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ bear:
bear intercept -- $(MAKE) all
bear citnames
-all: build $(BINS)
+all: lint build $(BINS)
run: all
@for BIN in $(BINS); do \
@@ -28,6 +28,9 @@ run: all
$$BIN; \
done
+lint:
+ clang-format --dry-run -Werror $(shell find -name '*.cc' -o -name '*.h')
+
build/%: build/%.o
$(CXX) -o $@ $< $(LDFLAGS)