forked from mirage/mirage-platform
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
84 lines (58 loc) · 1.7 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
MIRAGE_OS ?= unix
PREFIX ?= /usr/local
.PHONY: all build clean install test
.DEFAULT: all
all: build
@ :
build:
cd $(MIRAGE_OS) && $(MAKE) all MIRAGE_OS=$(MIRAGE_OS)
clean:
cd $(MIRAGE_OS) && $(MAKE) clean MIRAGE_OS=$(MIRAGE_OS)
install:
cd $(MIRAGE_OS) && $(MAKE) install MIRAGE_OS=$(MIRAGE_OS)
uninstall:
cd $(MIRAGE_OS) && $(MAKE) uninstall MIRAGE_OS=$(MIRAGE_OS)
test:
cd $(MIRAGE_OS) && $(MAKE) test MIRAGE_OS=$(MIRAGE_OS)
doc:
cd $(MIRAGE_OS) && $(MAKE) doc MIRAGE_OS=$(MIRAGE_OS)
unix-%:
$(MAKE) MIRAGE_OS=unix PREFIX=$(PREFIX) $*
xen-build:
cd xen && $(MAKE)
cd bindings && $(MAKE) build
xen-install:
cd xen && $(MAKE) install
cd bindings && $(MAKE) install
xen-uninstall:
ocamlfind remove mirage-xen || true
cd bindings && $(MAKE) uninstall
xen-ocaml-build:
cd xen-ocaml && $(MAKE) build
xen-ocaml-install:
cd xen-ocaml && $(MAKE) install
xen-ocaml-uninstall:
cd xen-ocaml && $(MAKE) uninstall
xen-posix-build:
cd xen-posix && $(MAKE) build
xen-posix-install:
cd xen-posix && $(MAKE) install
xen-posix-uninstall:
cd xen-posix && $(MAKE) uninstall
IMAGE = mirage-xen
test-xen-depends: Dockerfile build.sh
docker build -t $(IMAGE) .
test-xen-build: test-xen-depends clean
docker run -v $(shell pwd):/src $(IMAGE) /build.sh
VERSION = $(shell grep 'VERSION=' unix/_vars | sed 's/VERSION=*//')
ARCHIVE = https://github.com/mirage/mirage-platform/archive/v$(VERSION).tar.gz
release:
git tag -a v$(VERSION) -m "Version $(VERSION)."
git push upstream v$(VERSION)
$(MAKE) pr
export OPAMYES=1
pr:
opam pin add mirage-$(MIRAGE_OS) . -n
opam publish prepare mirage-$(MIRAGE_OS).$(VERSION) $(ARCHIVE)
opam unpin mirage-$(MIRAGE_OS) -n
opam publish submit mirage-$(MIRAGE_OS).$(VERSION)