[sledge] Use dune ocamlformat integration for `make fmt`

Summary: Dune now includes support for ocamlformat, so use it to format in parallel.

Reviewed By: mbouaziz

Differential Revision: D10389485

fbshipit-source-id: cb1dfbe38
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent 3d07754275
commit a9cdf69010

@ -3,12 +3,11 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
OCAMLFORMAT?=ocamlformat
.PHONY: default
default: dev
DUNES=$(patsubst %.in,%,$(shell find src -name dune.in))
DUNEINS=$(shell find src -name dune.in)
DUNES=$(patsubst %.in,%,$(DUNEINS))
.PHONY: dunes
dunes: $(DUNES)
@ -59,7 +58,8 @@ clean:
.PHONY: fmt
fmt:
$(OCAMLFORMAT) -i $(shell find src -name '*.ml' -or -name '*.mli') src/version.ml.in
dune build @_build/dev/src/fmt --auto-promote
ocamlformat -i src/version.ml.in $(DUNEINS)
clang-format -i model/llair_intrinsics.h model/cxxabi.cpp
# print any variable for Makefile debugging

@ -0,0 +1 @@
(ignored_subdirs (llvm test))

@ -1 +1,2 @@
(lang dune 1.0)
(using fmt 1.0)

@ -12,7 +12,7 @@ depends: [
"core_kernel" {>= "v0.11.0"}
"ctypes"
"ctypes-foreign"
"dune" {build}
"dune" {build >= "1.4.0"}
"llvm" {build & = "7.0.0"}
"ppx_compare" {>= "v0.11.0"}
"ppx_hash" {>= "v0.11.0"}

Loading…
Cancel
Save