Add PPFILES flag to specify a which files to reformat

Accepts a path with wildcards
This commit is contained in:
Brian Anderson 2011-07-27 17:34:58 -07:00
parent 278d360525
commit 452765255c
1 changed files with 11 additions and 7 deletions

View File

@ -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]: $@)