Add support for marking files no-reformat.

This commit is contained in:
Graydon Hoare 2011-06-16 15:20:00 -07:00
parent 050f62983d
commit eb9969f546
2 changed files with 9 additions and 2 deletions

View File

@ -4,9 +4,14 @@ PP_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \
$(wildcard $(S)src/test/*/*.rs \
$(S)src/test/*/*/*.rs)
PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat)
reformat: $(SREQ1)
@$(call E, reformat [stage1]: $@)
for i in $(PP_INPUTS); \
for i in $(PP_INPUTS_FILTERED); \
do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
--pretty normal $$i >$$i.tmp && mv $$i.tmp $$i; \
--pretty normal $$i >$$i.tmp; \
if cmp --silent $$i.tmp $$i; \
then echo no changes to $$i; rm $$i.tmp; \
else mv $$i.tmp $$i; fi \
done

View File

@ -1,3 +1,5 @@
// no-reformat
/*
*
* When you write a block-expression thing followed by