Add make clang-format
This commit is contained in:
parent
87ce5068bb
commit
2c830a4698
12
Makefile.am
12
Makefile.am
|
@ -28,3 +28,15 @@ dist_doc_DATA = README.rst
|
||||||
|
|
||||||
EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
|
EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
|
||||||
Dockerfile.android
|
Dockerfile.android
|
||||||
|
|
||||||
|
.PONY: clang-format
|
||||||
|
|
||||||
|
# Format source files using clang-format. Don't format source files
|
||||||
|
# under third-party directory since we are not responsible for thier
|
||||||
|
# coding style.
|
||||||
|
clang-format:
|
||||||
|
CLANGFORMAT=`git config --get clangformat.binary`; \
|
||||||
|
test -z $${CLANGFORMAT} && CLANGFORMAT="clang-format"; \
|
||||||
|
$${CLANGFORMAT} -i lib/*.{c,h} lib/includes/nghttp2/*.h \
|
||||||
|
src/*.{c,cc,h} src/includes/nghttp2/*.h examples/*.{c,cc} \
|
||||||
|
tests/*.{c,h}
|
||||||
|
|
Loading…
Reference in New Issue