summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-27 21:35:54 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-27 21:35:54 -0700
commit62cb38bf8a826125fba0034221343aa70dd3d415 (patch)
tree67348fa88068e1fdb2fca04d74c0ce60072bd280 /Makefile
parentaca7161e53ec40f6979d024d84afeb36fa911292 (diff)
Use clang-format, llvm style, for formatting.
* Reformatted all source files. * Added 'format' target to Makefile. * Removed 'astyle' target. * Updated .editorconfig.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6ff8b88..cc7d9b2 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ RELEASE?=CommonMark-$(VERSION)
INSTALL_PREFIX?=/usr/local
CLANG_CHECK?=clang-check
-.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug ubsan asan mingw archive bench astyle update-spec afl clang-check
+.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug ubsan asan mingw archive bench format update-spec afl clang-check
all: cmake_build man/man3/cmark.3
@@ -115,6 +115,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 $@
# We include entities.inc in the repository, so normally this
# doesn't need to be regenerated:
@@ -167,9 +168,8 @@ bench: $(BENCHFILE)
done \
} 2>&1 | grep 'real' | awk '{print $$2}' | python3 'bench/stats.py'
-astyle:
- astyle --style=linux -t -p -r 'src/*.c' --exclude=scanners.c
- astyle --style=linux -t -p -r 'src/*.h' --exclude=html_unescape.h
+format:
+ clang-format -style llvm -i src/*.c src/*.h
operf: $(CMARK)
operf $< < $(BENCHINP) > /dev/null