|
|
|
@ -6,21 +6,19 @@
|
|
|
|
|
.PHONY: default
|
|
|
|
|
default: exes
|
|
|
|
|
|
|
|
|
|
EXES = cli/sledge_cli report/sledge_report
|
|
|
|
|
INSTALLS = sledge
|
|
|
|
|
RELEASE_TARGETS = _build/release/cli/sledge_cli.exe _build/release/sledge.install
|
|
|
|
|
REPORT_TARGETS = _build/debug/report/sledge_report.exe
|
|
|
|
|
|
|
|
|
|
DEBUG_TARGETS = $(patsubst %,_build/debug/%.exe,$(EXES)) $(patsubst %,_build/debug/%.install,$(INSTALLS))
|
|
|
|
|
TARGETS = $(subst release,debug,$(RELEASE_TARGETS)) $(subst release,trace,$(RELEASE_TARGETS)) $(RELEASE_TARGETS) $(REPORT_TARGETS) _build/release/sledge-help.txt
|
|
|
|
|
|
|
|
|
|
TARGETS = $(DEBUG_TARGETS) $(subst debug,trace,$(DEBUG_TARGETS)) $(subst debug,release,$(DEBUG_TARGETS)) _build/release/sledge-help.txt
|
|
|
|
|
dune_build_release = dune build $(RELEASE_TARGETS)
|
|
|
|
|
dune_install_release = dune install --context=release --prefix=_build/_install/release sledge 2>/dev/null
|
|
|
|
|
|
|
|
|
|
dune_build_debug = dune build $(DEBUG_TARGETS)
|
|
|
|
|
dune_install_debug = dune install --context=debug --prefix=_build/_install/debug sledge 2>/dev/null
|
|
|
|
|
dune_build_trace = $(subst release,trace,$(dune_build_release))
|
|
|
|
|
dune_install_trace = $(subst release,trace,$(dune_install_release))
|
|
|
|
|
|
|
|
|
|
dune_build_debug_release = $(subst debug,trace,$(dune_build_debug))
|
|
|
|
|
dune_install_debug_release = $(subst debug,trace,$(dune_install_debug))
|
|
|
|
|
|
|
|
|
|
dune_build_release = $(subst debug,release,$(dune_build_debug))
|
|
|
|
|
dune_install_release = $(subst debug,release,$(dune_install_debug))
|
|
|
|
|
dune_build_debug = $(subst debug,debug,$(dune_build_release))
|
|
|
|
|
dune_install_debug = $(subst debug,debug,$(dune_install_release))
|
|
|
|
|
|
|
|
|
|
.PHONY: check
|
|
|
|
|
check:
|
|
|
|
@ -30,7 +28,7 @@ check:
|
|
|
|
|
exes:
|
|
|
|
|
dune build $(TARGETS)
|
|
|
|
|
$(dune_install_debug)
|
|
|
|
|
$(dune_install_debug_release)
|
|
|
|
|
$(dune_install_trace)
|
|
|
|
|
$(dune_install_release)
|
|
|
|
|
|
|
|
|
|
.PHONY: debug
|
|
|
|
@ -40,14 +38,18 @@ debug:
|
|
|
|
|
|
|
|
|
|
.PHONY: trace
|
|
|
|
|
trace:
|
|
|
|
|
$(dune_build_debug_release)
|
|
|
|
|
$(dune_install_debug_release)
|
|
|
|
|
$(dune_build_trace)
|
|
|
|
|
$(dune_install_trace)
|
|
|
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
|
release:
|
|
|
|
|
$(dune_build_release)
|
|
|
|
|
$(dune_install_release)
|
|
|
|
|
|
|
|
|
|
.PHONY: report
|
|
|
|
|
report:
|
|
|
|
|
dune build $(REPORT_TARGETS)
|
|
|
|
|
|
|
|
|
|
.PHONY: watch
|
|
|
|
|
watch:
|
|
|
|
|
dune build --watch --terminal-persistence=clear-on-rebuild $(TARGETS)
|
|
|
|
|