Add more verbosity to 'make reformat'

For each file it will indicate that it was reformatted, unchanged, or failed
This commit is contained in:
Brian Anderson 2011-08-18 15:46:10 -07:00
parent f5ce3bf15d
commit 28fbc591fd
1 changed files with 7 additions and 3 deletions

View File

@ -17,7 +17,11 @@ reformat: $(SREQ1)
for i in $(PP_INPUTS_FILTERED); \
do $(call CFG_RUN_TARG,stage1,stage1/rustc$(X)) \
--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 \
if [ $$? -ne 0 ]; \
then echo failed to print $$i; rm $$i.tmp; \
else if cmp --silent $$i.tmp $$i; \
then echo no changes to $$i; rm $$i.tmp; \
else echo reformated $$i; mv $$i.tmp $$i; \
fi; \
fi; \
done