[sledge] Add fmt_all target to reformat no matter what dune thinks

Summary:
Dune does not track the ocamlformat binary as a dependency of the
`fmt` rules, so when testing or upgrading ocamlformat, the existing
`fmt` target is not reliable.

Reviewed By: jvillard

Differential Revision: D21441539

fbshipit-source-id: 40bea4447
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent 4b06996805
commit b9dedea099

@ -71,6 +71,13 @@ fmt:
clang-format -i model/llair_intrinsics.h model/cxxabi.cpp
${MAKE} -C test fmt
OCAMLFORMAT_EXE = ocamlformat
OCAMLFORMAT_ARGS =
.PHONY: fmt_all
fmt_all:
parallel $(OCAMLFORMAT_EXE) $(OCAMLFORMAT_ARGS) -i ::: $(shell find * \( -name _build -or -name llvm \) -not -prune -or \( -name '*'.ml -or -name '*'.mli \) -print 2>/dev/null)
# print any variable for Makefile debugging
print-%:
@printf '$*='; printf '$($*)'; printf '\n'

Loading…
Cancel
Save