make format: parallelize

Signed-off-by: John McMaster <johndmcmaster@gmail.com>
This commit is contained in:
John McMaster 2018-12-10 17:03:25 -08:00
parent 9644e61e00
commit 9a4e8a4084
1 changed files with 4 additions and 4 deletions

View File

@ -16,10 +16,10 @@ database: build
$(MAKE) -C $@
format:
find . -name \*.cc -and -not -path './third_party/*' -and -not -path './.git/*' -exec $(CLANG_FORMAT) -style=file -i {} \;
find . -name \*.h -and -not -path './third_party/*' -and -not -path './.git/*' -exec $(CLANG_FORMAT) -style=file -i {} \;
find . -name \*.py -and -not -path './third_party/*' -and -not -path './.git/*' -exec yapf -p -i {} \;
find . -name \*.tcl -and -not -path './third_party/*' -and -not -path './.git/*' -exec ${XRAY_TCL_REFORMAT} {} \; 2>/dev/null
find . -name \*.cc -and -not -path './third_party/*' -and -not -path './.git/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i
find . -name \*.h -and -not -path './third_party/*' -and -not -path './.git/*' -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i
find . -name \*.py -and -not -path './third_party/*' -and -not -path './.git/*' -print0 | xargs -0 -P $$(nproc) yapf -p -i
find . -name \*.tcl -and -not -path './third_party/*' -and -not -path './.git/*' -print0 | xargs -0 -P $$(nproc) -n 1 ${XRAY_TCL_REFORMAT} 2>/dev/null
clean:
$(MAKE) -C database clean