summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-10-11 14:50:58 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-10-11 14:50:58 +0200
commit85d47d07d676b8bca1d98efee45d25af011a813b (patch)
treeb4eb651a40180bb28b6f93857c1d202429bbcffd /Makefile
parent89c8d703d258cef7cbe566eab537fb8f30aad7ed (diff)
'make format': don't change order of includes.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 687fe71..5f07b6f 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ VERSION?=$(SPECVERSION)
RELEASE?=CommonMark-$(VERSION)
INSTALL_PREFIX?=/usr/local
CLANG_CHECK?=clang-check
+CLANG_FORMAT=clang-format -style llvm -sort-includes=0 -i
.PHONY: all cmake_build leakcheck clean fuzztest test debug ubsan asan mingw archive bench format update-spec afl clang-check
@@ -113,7 +114,7 @@ $(SRCDIR)/scanners.c: $(SRCDIR)/scanners.re
esac
re2c --case-insensitive -b -i --no-generation-date -8 \
--encoding-policy substitute -o $@ $<
- clang-format -style llvm -i $@
+ $(CLANG_FORMAT) $@
# We include entities.inc in the repository, so normally this
# doesn't need to be regenerated:
@@ -165,7 +166,7 @@ bench: $(BENCHFILE)
} 2>&1 | grep 'real' | awk '{print $$2}' | python3 'bench/stats.py'
format:
- clang-format -style llvm -i src/*.c src/*.h api_test/*.c api_test/*.h
+ $(CLANG_FORMAT) src/*.c src/*.h api_test/*.c api_test/*.h
operf: $(CMARK)
operf $< < $(BENCHFILE) > /dev/null