diff --git a/sledge/Makefile b/sledge/Makefile index 687dbd162..cf0cb0f9b 100644 --- a/sledge/Makefile +++ b/sledge/Makefile @@ -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 diff --git a/sledge/dune b/sledge/dune new file mode 100644 index 000000000..da639ce8d --- /dev/null +++ b/sledge/dune @@ -0,0 +1 @@ +(ignored_subdirs (llvm test)) diff --git a/sledge/dune-project b/sledge/dune-project index de4fc2092..1c220e4d0 100644 --- a/sledge/dune-project +++ b/sledge/dune-project @@ -1 +1,2 @@ (lang dune 1.0) +(using fmt 1.0) diff --git a/sledge/sledge.opam b/sledge/sledge.opam index 069d452c7..5648dd1b5 100644 --- a/sledge/sledge.opam +++ b/sledge/sledge.opam @@ -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"}