Add a 'make reformat' rule.

This commit is contained in:
Graydon Hoare 2011-06-01 12:01:55 -07:00
parent e5dc138dfa
commit 49742b86be
2 changed files with 8 additions and 0 deletions

View File

@ -240,3 +240,4 @@ include $(CFG_SRC_DIR)/mk/snap.mk
include $(CFG_SRC_DIR)/mk/clean.mk
include $(CFG_SRC_DIR)/mk/autodep.mk
include $(CFG_SRC_DIR)/mk/fuzzer.mk
include $(CFG_SRC_DIR)/mk/pp.mk

7
mk/pp.mk Normal file
View File

@ -0,0 +1,7 @@
reformat: $(SREQ1)
@$(call E, reformat [stage1]: $@)
for i in $(wildcard $(addprefix $(S)src/comp/, \
*.rs */*.rs */*/*.rs)); \
do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
--pretty $$i >$$i.tmp && mv $$i.tmp $$i; \
done