about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Gallagher <jgallagher@bignerdranch.com>2014-09-30 22:09:46 -0400
committerJohn Gallagher <jgallagher@bignerdranch.com>2014-10-01 07:49:06 -0400
commit8dab56ea9d5f10924ef980f705bc864567d5b72a (patch)
tree992539952c2fe58b3f8b3f1f5446ee3c7654629a
parentff2616e847ddf913e007d715732b5669b0f22672 (diff)
downloadrust-8dab56ea9d5f10924ef980f705bc864567d5b72a.tar.gz
rust-8dab56ea9d5f10924ef980f705bc864567d5b72a.zip
Make find->tidy resilient to filenames with spaces
-rw-r--r--mk/tests.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/mk/tests.mk b/mk/tests.mk
index a872395855b..fe2c4cb4151 100644
--- a/mk/tests.mk
+++ b/mk/tests.mk
@@ -261,12 +261,13 @@ ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
 tidy:
 		@$(call E, check: formatting)
 		$(Q)find $(S)src -name '*.r[sc]' \
-		| grep '^$(S)src/jemalloc' -v \
-		| grep '^$(S)src/libuv' -v \
-		| grep '^$(S)src/llvm' -v \
-		| grep '^$(S)src/gyp' -v \
-		| grep '^$(S)src/libbacktrace' -v \
-		| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
+		    -and -not -regex '^$(S)src/jemalloc.*' \
+		    -and -not -regex '^$(S)src/libuv.*' \
+		    -and -not -regex '^$(S)src/llvm.*' \
+		    -and -not -regex '^$(S)src/gyp.*' \
+		    -and -not -regex '^$(S)src/libbacktrace.*' \
+		    -print0 \
+		| xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
 		$(Q)find $(S)src/etc -name '*.py' \
 		| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
 		$(Q)find $(S)src/doc -name '*.js' \