-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
57 lines (43 loc) · 1.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
USER_SHELL = $(shell echo $$SHELL)
nix-%:
nix develop -L '.?submodules=1#' --command $*
.PHONY: release-shell
release-shell:
nix develop '.?submodules=1#release' --command $(USER_SHELL)
.PHONY: vim
vim:
$(MAKE) nix-n$@
.PHONY: generate-dune-files
generate-dune-files:
node scripts/ninja.js
.PHONY: dev
dev:
dune build @install
.PHONY: test
test:
opam exec -- dune runtest -p melange,melange-playground
.PHONY: opam-create-switch
opam-create-switch: ## Create opam switch
opam switch create . 5.2.0 -y --no-install
.PHONY: opam-install-test
opam-install-test: ## Install test dependencies
opam pin add melange.dev . --with-test -y --no-action
opam pin add melange-playground.dev . --with-test -y --no-action
opam install melange.dev melange-playground.dev -t
.PHONY: opam-install-dev
opam-install-dev: opam-install-test ## Install development dependencies
opam install -y ocaml-lsp-server
.PHONY: opam-init
opam-init: opam-create-switch opam-install-test ## Configure everything to develop this repository in local
.PHONY: playground
playground:
opam exec -- dune build --profile=release playground/mel_playground.bc.js
.PHONY: playground-dev
playground-dev:
opam exec -- dune build --profile=dev playground/mel_playground.bc.js
.PHONY: playground-dev-test
playground-dev-test:
opam exec -- dune build --profile=dev @@test/blackbox-tests/melange-playground/runtest
.PHONY: playground-test
playground-test:
opam exec -- dune build --profile=release @@test/blackbox-tests/melange-playground/runtest