From 9644e61e002f4f5d6d1faea08669b25685daf61b Mon Sep 17 00:00:00 2001 From: John McMaster Date: Mon, 10 Dec 2018 17:02:32 -0800 Subject: [PATCH 1/2] reformat.tcl: fix +x Signed-off-by: John McMaster --- third_party/reformat.tcl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 third_party/reformat.tcl diff --git a/third_party/reformat.tcl b/third_party/reformat.tcl old mode 100644 new mode 100755 From 9a4e8a40841fb48d3ba7e66812f4d81b89d6f555 Mon Sep 17 00:00:00 2001 From: John McMaster Date: Mon, 10 Dec 2018 17:03:25 -0800 Subject: [PATCH 2/2] make format: parallelize Signed-off-by: John McMaster --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5b07de3d..ade52c52 100644 --- a/Makefile +++ b/Makefile @@ -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