forked from haskell/haskell-ide-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
92 lines (75 loc) · 3.38 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
85
86
87
88
89
90
91
92
BASEDIR=$(CURDIR)
STACKLOCALBINDIR:=$(shell stack path --local-bin)
build: hie-8.2.1 hie-8.2.2 hie-8.4.2 hie-8.4.3
.PHONY: build
build-all: build build-docs
.PHONY: build-all
submodules:
git submodule update --init
.PHONY: submodules
# ------------------------------------------------------
hie-8.2.1: submodules
stack --stack-yaml=stack-8.2.1.yaml install happy
stack --stack-yaml=stack-8.2.1.yaml build
stack --stack-yaml=stack-8.2.1.yaml install \
&& cp '$(STACKLOCALBINDIR)/hie' '$(STACKLOCALBINDIR)/hie-8.2.1' \
&& cp '$(STACKLOCALBINDIR)/hie-8.2.1' '$(STACKLOCALBINDIR)/hie-8.2'
.PHONY: hie-8.2.1
hie-8.2.2: submodules
stack --stack-yaml=stack-8.2.2.yaml install happy
stack --stack-yaml=stack-8.2.2.yaml build
stack --stack-yaml=stack-8.2.2.yaml install \
&& cp '$(STACKLOCALBINDIR)/hie' '$(STACKLOCALBINDIR)/hie-8.2.2' \
&& cp '$(STACKLOCALBINDIR)/hie-8.2.2' '$(STACKLOCALBINDIR)/hie-8.2'
.PHONY: hie-8.2.2
hie-8.4.2: submodules
stack --stack-yaml=stack-8.4.2.yaml build
stack --stack-yaml=stack-8.4.2.yaml install \
&& cp '$(STACKLOCALBINDIR)/hie' '$(STACKLOCALBINDIR)/hie-8.4.2' \
&& cp '$(STACKLOCALBINDIR)/hie-8.4.2' '$(STACKLOCALBINDIR)/hie-8.4'
.PHONY: hie-8.2.2
hie-8.4.3: submodules
stack --stack-yaml=stack-8.4.3.yaml build
stack --stack-yaml=stack-8.4.3.yaml install \
&& cp '$(STACKLOCALBINDIR)/hie' '$(STACKLOCALBINDIR)/hie-8.4.3' \
&& cp '$(STACKLOCALBINDIR)/hie-8.4.3' '$(STACKLOCALBINDIR)/hie-8.4'
.PHONY: hie-8.4.3
# ------------------------------------------------------
build-docs:
stack --stack-yaml=stack-8.2.1.yaml exec hoogle generate \
&& stack --stack-yaml=stack-8.2.2.yaml exec hoogle generate \
&& stack --stack-yaml=stack-8.4.2.yaml exec hoogle generate \
&& stack --stack-yaml=stack-8.4.3.yaml exec hoogle generate
.PHONY: build-docs
# ------------------------------------------------------
test: submodules
stack --stack-yaml=stack-8.2.1.yaml test \
&& stack --stack-yaml=stack-8.2.2.yaml test \
&& stack --stack-yaml=stack-8.4.2.yaml test \
&& stack --stack-yaml=stack-8.4.3.yaml test
.PHONY: test
build-copy-compiler-tool: submodules
stack --stack-yaml=stack-8.2.1.yaml build --copy-compiler-tool \
&& stack --stack-yaml=stack-8.2.2.yaml build --copy-compiler-tool \
&& stack --stack-yaml=stack-8.4.2.yaml build --copy-compiler-tool \
&& stack --stack-yaml=stack-8.4.3.yaml build --copy-compiler-tool
.PHONY: build-copy-compiler-tool
icu-macos-fix: icu-macos-fix-install icu-macos-fix-build
.PHONY: icu-macos-fix
icu-macos-fix-install:
brew install icu4c
.PHONY: icu-macos-fix-install
icu-macos-fix-build:
stack --stack-yaml=stack-8.2.1.yaml build text-icu \
--extra-lib-dirs=/usr/local/opt/icu4c/lib \
--extra-include-dirs=/usr/local/opt/icu4c/include \
&& stack --stack-yaml=stack-8.2.2.yaml build text-icu \
--extra-lib-dirs=/usr/local/opt/icu4c/lib \
--extra-include-dirs=/usr/local/opt/icu4c/include \
&& stack --stack-yaml=stack-8.4.2.yaml build text-icu \
--extra-lib-dirs=/usr/local/opt/icu4c/lib \
--extra-include-dirs=/usr/local/opt/icu4c/include \
&& stack --stack-yaml=stack-8.4.3.yaml build text-icu \
--extra-lib-dirs=/usr/local/opt/icu4c/lib \
--extra-include-dirs=/usr/local/opt/icu4c/include
.PHONY: icu-macos-fix-build