Skip to content

Commit

Permalink
Use a local switch in playground Makefile (#1469)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Sabine Schmaltz <[email protected]>
  • Loading branch information
gpetiot and sabine authored Aug 23, 2023
1 parent 9675e85 commit b153c50
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions playground/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
COMPILER=5.0.0
SWITCH=playground

.PHONY: create_switch
create_switch: ## Create switch and pinned opam repo
opam switch create $(SWITCH) $(COMPILER) --no-install
create_switch: ## Create switch
opam switch create . $(COMPILER) --no-install

.PHONY: deps
deps: create_switch ## Install development dependencies
opam install . --deps-only --switch=$(SWITCH)
opam install . --deps-only -y

.PHONY: switch
switch: deps ## Create an opam switch and install development dependencies

.PHONY: build
build:
opam exec --switch=$(SWITCH) -- dune build --root .
opam exec -- dune build --root .

.PHONY: fmt
fmt: ## Format the codebase with ocamlformat
Expand Down

0 comments on commit b153c50

Please sign in to comment.