Add PPFILES flag to specify a which files to reformat
Accepts a path with wildcards
This commit is contained in:
parent
278d360525
commit
452765255c
18
mk/pp.mk
18
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]: $@)
|
||||
|
|
Loading…
Reference in New Issue