]> git.lizzy.rs Git - rust.git/commitdiff
mk: Split tidy into multiple tidy rules
authorBrian Anderson <banderson@mozilla.com>
Sat, 24 Jan 2015 20:16:06 +0000 (12:16 -0800)
committerBrian Anderson <banderson@mozilla.com>
Thu, 5 Feb 2015 22:37:16 +0000 (14:37 -0800)
* tidy - runs all tidy scripts
* tidy-basic - tidy.rs
* tidy-binaries - check-binaries.py
* tidy-errors - errorck.py
* tidy-features - featureck.py

mk/tests.mk

index e28f56fffe41b3d547f7c82ed3f1b86ef2b18725..a9abc6120d864aee83626d6f45ed823c34198a4a 100644 (file)
@@ -260,7 +260,13 @@ ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
        ,$(ALL_HS))
 
 # Run the tidy script in multiple parts to avoid huge 'echo' commands
-tidy:
+.PHONY: tidy
+tidy: tidy-basic tidy-binaries tidy-errors tidy-features
+
+endif
+
+.PHONY: tidy-basic
+tidy-basic:
                @$(call E, check: formatting)
                $(Q)find $(S)src -name '*.r[sc]' \
                    -and -not -regex '^$(S)src/jemalloc.*' \
@@ -286,6 +292,10 @@ tidy:
                | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
                $(Q)echo $(ALL_HS) \
                | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
+
+.PHONY: tidy-binaries
+tidy-binaries:
+               @$(call E, check: binaries)
                $(Q)find $(S)src -type f -perm +a+x \
                    -not -name '*.rs' -and -not -name '*.py' \
                    -and -not -name '*.sh' \
@@ -300,11 +310,16 @@ tidy:
                | grep '^$(S)src/libbacktrace' -v \
                | grep '^$(S)src/rust-installer' -v \
                | xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
-               $(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
-               $(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
 
+.PHONY: tidy-errors
+tidy-errors:
+               @$(call E, check: extended errors)
+               $(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
 
-endif
+.PHONY: tidy-features
+tidy-features:
+               @$(call E, check: feature sanity)
+               $(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
 
 
 ######################################################################