Skip to content

Commit 28fbc59

Browse files
committed
Add more verbosity to 'make reformat'
For each file it will indicate that it was reformatted, unchanged, or failed
1 parent f5ce3bf commit 28fbc59

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

mk/pp.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ reformat: $(SREQ1)
1717
for i in $(PP_INPUTS_FILTERED); \
1818
do $(call CFG_RUN_TARG,stage1,stage1/rustc$(X)) \
1919
--pretty normal $$i >$$i.tmp; \
20-
if cmp --silent $$i.tmp $$i; \
21-
then echo no changes to $$i; rm $$i.tmp; \
22-
else mv $$i.tmp $$i; fi \
20+
if [ $$? -ne 0 ]; \
21+
then echo failed to print $$i; rm $$i.tmp; \
22+
else if cmp --silent $$i.tmp $$i; \
23+
then echo no changes to $$i; rm $$i.tmp; \
24+
else echo reformated $$i; mv $$i.tmp $$i; \
25+
fi; \
26+
fi; \
2327
done

0 commit comments

Comments
 (0)