-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
.DEFAULT_GOAL := all | ||
|
||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | ||
$(eval $(ARGS):;@:) | ||
|
||
.PHONY: all | ||
all: | ||
opam exec -- dune build --root . @install | ||
|
||
.PHONY: deps | ||
deps: ## Install development dependencies | ||
opam pin -n -y [email protected]:ocaml/ocaml-lsp.git | ||
opam pin -n -y [email protected]:aantron/dream.git | ||
opam install -y dune-release merlin ocamlformat utop ocaml-lsp-server | ||
npm install | ||
opam install -y dune-release ocamlformat utop ocaml-lsp-server | ||
opam install --deps-only --with-test --with-doc -y . | ||
|
||
.PHONY: create_switch | ||
create_switch: | ||
opam switch create . 4.12.0 --no-install | ||
opam switch create . --no-install | ||
|
||
.PHONY: switch | ||
switch: create_switch deps ## Create an opam switch and install development dependencies | ||
|
@@ -34,9 +28,9 @@ build: ## Build the project, including non installable libraries and executables | |
install: all ## Install the packages on the system | ||
opam exec -- dune install --root . | ||
|
||
.PHONY: start | ||
start: all ## Run the produced executable | ||
opam exec -- dune exec --root . bin/server.exe $(ARGS) | ||
.PHONY: example | ||
example: all ## Run the produced executable | ||
opam exec -- dune exec --root . example/server.exe | ||
|
||
.PHONY: test | ||
test: ## Run the unit tests | ||
|