diff --git a/mk/pp.mk b/mk/pp.mk index e9273c33b9d..bbcb9018f95 100644 --- a/mk/pp.mk +++ b/mk/pp.mk @@ -1,11 +1,15 @@ +# Create a way to reformat just some files +ifdef PPFILES + PP_INPUTS_FILTERED := $(wildcard $(PPFILES)) +else + PP_INPUTS = $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \ + $(wildcard $(addprefix $(S)src/comp/,*.rs */*.rs */*/*.rs)) \ + $(wildcard $(S)src/test/*/*.rs \ + $(S)src/test/*/*/*.rs) \ + $(wildcard $(S)src/fuzzer/*.rs) -PP_INPUTS = $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \ - $(wildcard $(addprefix $(S)src/comp/,*.rs */*.rs */*/*.rs)) \ - $(wildcard $(S)src/test/*/*.rs \ - $(S)src/test/*/*/*.rs) \ - $(wildcard $(S)src/fuzzer/*.rs) - -PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat) + PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat) +endif reformat: $(SREQ1) @$(call E, reformat [stage1]: $@)