diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-07-27 21:35:54 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-07-27 21:35:54 -0700 |
commit | 62cb38bf8a826125fba0034221343aa70dd3d415 (patch) | |
tree | 67348fa88068e1fdb2fca04d74c0ce60072bd280 /Makefile | |
parent | aca7161e53ec40f6979d024d84afeb36fa911292 (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-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |