[sledge] Rename contexts/profiles to be more conventional

Reviewed By: jvillard

Differential Revision: D21107642

fbshipit-source-id: 22cbec493
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent de20da4fb6
commit 53822697f9

@ -6,11 +6,11 @@
- `make check` while coding to run the type-checker and populate the data merlin needs as fast as possible - `make check` while coding to run the type-checker and populate the data merlin needs as fast as possible
- `make dbg` to build the _debug_ binary (`_build/_install/dbg/bin/sledge`), which enables debug tracing (calls to functions in the `Trace` module) and executes `assert`ions - `make debug` to build the _debug_ binary (`_build/_install/debug/bin/sledge`), which enables debug tracing (calls to functions in the `Trace` module) and executes `assert`ions
- `make dbg-opt` to build the _optimized debug_ binary (`_build/_install/dbg-opt/bin/sledge`), which enables debug tracing but does not execute `assert`ions - `make trace` to build the _optimized debug_ binary (`_build/_install/trace/bin/sledge`), which enables debug tracing but does not execute `assert`ions
- `make opt` to build the _optimized_ binary (`_build/_install/opt/bin/sledge`), which disables debug tracing and does not execute `assert`ions - `make release` to build the _optimized_ binary (`_build/_install/release/bin/sledge`), which disables debug tracing and does not execute `assert`ions
- `make exes`, the default target, to build all 3 binaries - `make exes`, the default target, to build all 3 binaries

@ -9,18 +9,18 @@ default: exes
EXES = bin/sledge_cli EXES = bin/sledge_cli
INSTALLS = sledge INSTALLS = sledge
DBG_TARGETS = $(patsubst %,_build/dbg/%.exe,$(EXES)) $(patsubst %,_build/dbg/%.install,$(INSTALLS)) DEBUG_TARGETS = $(patsubst %,_build/debug/%.exe,$(EXES)) $(patsubst %,_build/debug/%.install,$(INSTALLS))
TARGETS = $(DBG_TARGETS) $(subst dbg,dbg-opt,$(DBG_TARGETS)) $(subst dbg,opt,$(DBG_TARGETS)) _build/opt/sledge-help.txt TARGETS = $(DEBUG_TARGETS) $(subst debug,trace,$(DEBUG_TARGETS)) $(subst debug,release,$(DEBUG_TARGETS)) _build/release/sledge-help.txt
dune_build_dbg = dune build $(DBG_TARGETS) dune_build_debug = dune build $(DEBUG_TARGETS)
dune_install_dbg = dune install --context=dbg --prefix=_build/_install/dbg sledge 2>/dev/null dune_install_debug = dune install --context=debug --prefix=_build/_install/debug sledge 2>/dev/null
dune_build_dbg_opt = $(subst dbg,dbg-opt,$(dune_build_dbg)) dune_build_debug_release = $(subst debug,trace,$(dune_build_debug))
dune_install_dbg_opt = $(subst dbg,dbg-opt,$(dune_install_dbg)) dune_install_debug_release = $(subst debug,trace,$(dune_install_debug))
dune_build_opt = $(subst dbg,opt,$(dune_build_dbg)) dune_build_release = $(subst debug,release,$(dune_build_debug))
dune_install_opt = $(subst dbg,opt,$(dune_install_dbg)) dune_install_release = $(subst debug,release,$(dune_install_debug))
.PHONY: check .PHONY: check
check: check:
@ -29,24 +29,24 @@ check:
.PHONY: exes .PHONY: exes
exes: exes:
dune build $(TARGETS) dune build $(TARGETS)
$(dune_install_dbg) $(dune_install_debug)
$(dune_install_dbg_opt) $(dune_install_debug_release)
$(dune_install_opt) $(dune_install_release)
.PHONY: dbg .PHONY: debug
dbg: debug:
$(dune_build_dbg) $(dune_build_debug)
$(dune_install_dbg) $(dune_install_debug)
.PHONY: dbg-opt .PHONY: trace
dbg-opt: trace:
$(dune_build_dbg_opt) $(dune_build_debug_release)
$(dune_install_dbg_opt) $(dune_install_debug_release)
.PHONY: opt .PHONY: release
opt: release:
$(dune_build_opt) $(dune_build_release)
$(dune_install_opt) $(dune_install_release)
.PHONY: watch .PHONY: watch
watch: watch:
@ -54,12 +54,12 @@ watch:
.PHONY: test .PHONY: test
test: test:
-dune build @_build/dbg/runtest --auto-promote -dune build @_build/debug/runtest --auto-promote
dune build @_build/dbg/fmt --auto-promote 2>/dev/null dune build @_build/debug/fmt --auto-promote 2>/dev/null
.PHONY: ci-test .PHONY: ci-test
ci-test: ci-test:
dune build @_build/dbg/runtest dune build @_build/debug/runtest
.PHONY: clean .PHONY: clean
clean: clean:
@ -67,7 +67,7 @@ clean:
.PHONY: fmt .PHONY: fmt
fmt: fmt:
-dune build @_build/dbg/fmt --auto-promote 2>/dev/null -dune build @_build/debug/fmt --auto-promote 2>/dev/null
clang-format -i model/llair_intrinsics.h model/cxxabi.cpp clang-format -i model/llair_intrinsics.h model/cxxabi.cpp
${MAKE} -C test fmt ${MAKE} -C test fmt

@ -4,14 +4,14 @@
; LICENSE file in the root directory of this source tree. ; LICENSE file in the root directory of this source tree.
(env (env
(dbg (debug
(flags (flags
(-w +a-4-9-18-40-42-44-48@50-66 -strict-formats -strict-sequence (-w +a-4-9-18-40-42-44-48@50-66 -strict-formats -strict-sequence
-short-paths -bin-annot -keep-locs -keep-docs -opaque)) -short-paths -bin-annot -keep-locs -keep-docs -opaque))
(env-vars (env-vars
(PPX_TRACE_ENABLED 1)) (PPX_TRACE_ENABLED 1))
(inline_tests enabled)) (inline_tests enabled))
(dbg-opt (trace
(flags (flags
(-w -a -noassert -unboxed-types)) (-w -a -noassert -unboxed-types))
(ocamlopt_flags (-O3)) (ocamlopt_flags (-O3))

@ -5,6 +5,6 @@
; This source code is licensed under the MIT license found in the ; This source code is licensed under the MIT license found in the
; LICENSE file in the root directory of this source tree. ; LICENSE file in the root directory of this source tree.
(context (opam (switch sledge) (name dbg) (profile dbg) (merlin))) (context (opam (switch sledge) (name debug) (profile debug) (merlin)))
(context (opam (switch sledge) (name dbg-opt) (profile dbg-opt))) (context (opam (switch sledge) (name trace) (profile trace)))
(context (opam (switch sledge) (name opt) (profile opt))) (context (opam (switch sledge) (name release) (profile release)))

Loading…
Cancel
Save