[sledge] Add `make check` using `dune build @check`

Summary:
This triggers dune to build the minimum necessary to type-check and
populate files merlin uses for cross-module information.

Reviewed By: mbouaziz

Differential Revision: D10389480

fbshipit-source-id: 1ac7e0584
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent d5a83894b0
commit 85d9e5bdb0

@ -3,8 +3,13 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Expected workflow is to launch `make watch` in a terminal to
# continuously rebuild when files change, and to use `make check` in
# the editor to quickly type-check and populate files used by merlin
# for cross-module information.
.PHONY: default
default: dev
default: exes
DUNEINS=$(shell find src -name dune.in)
DUNES=$(patsubst %.in,%,$(DUNEINS))
@ -18,6 +23,10 @@ dunes: $(DUNES)
.PHONY: setup
setup: dunes
.PHONY: check
check: setup
dune build @check
.PHONY: exes
exes: setup
dune build _build/dev/src/sledge.exe _build/release/src/sledge.exe _build/dev/sledge.install _build/release/sledge.install
@ -26,18 +35,6 @@ exes: setup
watch: setup
dune build --watch _build/dev/src/sledge.exe _build/release/src/sledge.exe
.PHONY: bc
bc: setup
dune build _build/dev/src/sledge.bc
.PHONY: dev
dev: setup
dune build _build/dev/src/sledge.exe
.PHONY: release
release: setup
dune build _build/release/src/sledge.exe
.PHONY: test
test:
dune build @_build/dev/runtest --auto-promote

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

Loading…
Cancel
Save