-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (31 loc) · 1.63 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
OPTION_PACKAGES = dkml-option-debuginfo
.PHONY: all
all: install
.PHONY: clean
clean:
rm -rf _opam _build dkmldir dist Brewfile msys64 stage
.PHONY: create-switch
create-switch: _opam/.opam-switch/switch-config
# Force an update since 'opam switch create' only updates when it newly registers the repository.
# Upsert (remove + add) FLEXLINKFLAGS on MSVC for debugging
_opam/.opam-switch/switch-config:
opam switch create . --empty --repos diskuv-main=git+https://github.com/diskuv/diskuv-opam-repository.git#main,default-main=git+https://github.com/ocaml/opam-repository.git
opam update diskuv-main
OPAMSWITCH="$$PWD" && \
if [ -x /usr/bin/cygpath ]; then OPAMSWITCH=$$(/usr/bin/cygpath -aw "$$OPAMSWITCH"); fi && \
if [ -n "$${COMSPEC:-}" ]; then opam option 'setenv-=FLEXLINKFLAGS+=" -link /DEBUG:FULL"'; fi
if [ -n "$${COMSPEC:-}" ]; then opam option 'setenv+=FLEXLINKFLAGS+=" -link /DEBUG:FULL"'; fi
.PHONY: install
install: create-switch
OPAMSWITCH="$$PWD" && \
if [ -x /usr/bin/cygpath ]; then OPAMSWITCH=$$(/usr/bin/cygpath -aw "$$OPAMSWITCH"); fi && \
opam pin ocaml -k version 4.14.2 --no-action --yes && \
rm -rf _opam/src-ocaml && \
opam install $(OPTION_PACKAGES) ./ocaml.opam ./dkml-base-compiler.opam --keep-build-dir --yes
.PHONY: local-install
local-install: create-switch
OPAMSWITCH="$$PWD" && \
if [ -x /usr/bin/cygpath ]; then OPAMSWITCH=$$(/usr/bin/cygpath -aw "$$OPAMSWITCH"); fi && \
opam pin ocaml -k version 4.14.2 --no-action --yes && \
rm -rf dkmldir Brewfile _opam/src-ocaml && \
opam install $(OPTION_PACKAGES) ./ocaml.opam ./dkml-base-compiler.opam --inplace-build --keep-build-dir --yes