Skip to content

Commit 49742b8

Browse files
committed
Add a 'make reformat' rule.
1 parent e5dc138 commit 49742b8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,4 @@ include $(CFG_SRC_DIR)/mk/snap.mk
240240
include $(CFG_SRC_DIR)/mk/clean.mk
241241
include $(CFG_SRC_DIR)/mk/autodep.mk
242242
include $(CFG_SRC_DIR)/mk/fuzzer.mk
243+
include $(CFG_SRC_DIR)/mk/pp.mk

mk/pp.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
reformat: $(SREQ1)
2+
@$(call E, reformat [stage1]: $@)
3+
for i in $(wildcard $(addprefix $(S)src/comp/, \
4+
*.rs */*.rs */*/*.rs)); \
5+
do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
6+
--pretty $$i >$$i.tmp && mv $$i.tmp $$i; \
7+
done

0 commit comments

Comments
 (0)