From 452765255c6be2118d316818fc0da6fe06c13472 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 27 Jul 2011 17:34:58 -0700 Subject: [PATCH] Add PPFILES flag to specify a which files to reformat Accepts a path with wildcards --- mk/pp.mk | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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]: $@)