[sledge] Simplify build

Reviewed By: jvillard

Differential Revision: D15316845

fbshipit-source-id: ff7864fb7
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent 9a62554322
commit b6d0e33dfc

1
.gitignore vendored

@ -62,6 +62,7 @@ duplicates.txt
/Makefile.autoconf
/.buckversion
/*/.gitignore
/*/*/.gitignore
# IntelliJ files
/scripts/.idea/

1
sledge/.gitignore vendored

@ -1,4 +1,5 @@
.merlin
/bin/
/llvm/
/model/cxxabi.bc
/src/dune

@ -6,8 +6,20 @@
.PHONY: default
default: exes
DUNEINS=$(shell find src -name dune.in)
DUNES=$(patsubst %.in,%,$(DUNEINS))
EXES = src/sledge
INSTALLS = sledge
facebook/Makefile:
-@${MAKE} -s -C ../facebook setup
-@${MAKE} -s -C facebook
-include facebook/Makefile
DBG_TARGETS = $(patsubst %,_build/dev/%.exe,$(EXES)) $(patsubst %,_build/dev/%.install,$(INSTALLS))
OPT_TARGETS = $(patsubst %,_build/release/%.exe,$(EXES)) $(patsubst %,_build/release/%.install,$(INSTALLS))
DUNEINS = $(shell find src facebook -name dune.in)
DUNES = $(patsubst %.in,%,$(DUNEINS))
.PHONY: dunes
dunes: $(DUNES)
@ -16,7 +28,7 @@ dunes: $(DUNES)
@cat $+ > $@
.PHONY: setup
setup: dunes
setup: facebook/Makefile dunes
.PHONY: check
check: setup
@ -24,25 +36,25 @@ check: setup
.PHONY: exes
exes: setup
dune build _build/dev/src/sledge.exe _build/release/src/sledge.exe _build/dev/sledge.install _build/release/sledge.install
dune build $(DBG_TARGETS) $(OPT_TARGETS)
.PHONY: dbg
dbg: setup
dune build _build/dev/src/sledge.exe _build/dev/sledge.install
dune build $(DBG_TARGETS)
.PHONY: opt
opt: setup
dune build _build/release/src/sledge.exe _build/release/sledge.install
dune build $(OPT_TARGETS)
.PHONY: watch
watch: setup
dune build --watch _build/dev/src/sledge.exe _build/release/src/sledge.exe
dune build --watch $(DBG_TARGETS) $(OPT_TARGETS)
.PHONY: test
test: setup
dune build @_build/dev/runtest --auto-promote
BISECT_DIR=$(CURDIR)/_coverage/out
BISECT_DIR = $(CURDIR)/_coverage/out
.PHONY: coverage
coverage: setup

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

@ -21,6 +21,7 @@ depends: [
"ppx_compare"
"ppx_deriving_cmdliner" {>= "0.4.2"}
"ppx_hash"
"shexp"
"zarith"
]
synopsis: "SLEdge analyzer"

Loading…
Cancel
Save