@@ -5,7 +5,9 @@ all: help
55.PHONY : all
66
77# # Builds hie for all supported GHC versions (8.2.1, 8.2.2, 8.4.2 and 8.4.3, 8.4.4)
8- build : hie-8.2.1 hie-8.2.2 hie-8.4.2 hie-8.4.3 hie-8.4.4
8+ build : hie-8.2.1 hie-8.2.2 \
9+ hie-8.4.2 hie-8.4.3 hie-8.4.4 \
10+ hie-8.6.1 hie-8.6.2
911.PHONY : build
1012
1113# # Builds hie and hoogle databases for all supported GHC versions
@@ -15,7 +17,7 @@ build-all: build build-docs
1517# ------------------------------------------------------
1618
1719# # Builds hie for GHC version 8.2.1 only
18- hie-8.2.1 : submodules
20+ hie-8.2.1 : submodules cabal
1921 stack --stack-yaml=stack-8.2.1.yaml install happy
2022 stack --stack-yaml=stack-8.2.1.yaml build
2123 stack --stack-yaml=stack-8.2.1.yaml install \
@@ -24,7 +26,7 @@ hie-8.2.1: submodules
2426.PHONY : hie-8.2.1
2527
2628# # Builds hie for GHC version 8.2.2 only
27- hie-8.2.2 : submodules
29+ hie-8.2.2 : submodules cabal
2830 stack --stack-yaml=stack-8.2.2.yaml install happy
2931 stack --stack-yaml=stack-8.2.2.yaml build
3032 stack --stack-yaml=stack-8.2.2.yaml install \
@@ -33,63 +35,101 @@ hie-8.2.2: submodules
3335.PHONY : hie-8.2.2
3436
3537# # Builds hie for GHC version 8.4.2 only
36- hie-8.4.2 : submodules
38+ hie-8.4.2 : submodules cabal
3739 stack --stack-yaml=stack-8.4.2.yaml build
3840 stack --stack-yaml=stack-8.4.2.yaml install \
3941 && cp ' $(STACKLOCALBINDIR)/hie' ' $(STACKLOCALBINDIR)/hie-8.4.2' \
4042 && cp ' $(STACKLOCALBINDIR)/hie-8.4.2' ' $(STACKLOCALBINDIR)/hie-8.4'
4143.PHONY : hie-8.2.2
4244
4345# # Builds hie for GHC version 8.4.3 only
44- hie-8.4.3 : submodules
46+ hie-8.4.3 : submodules cabal
4547 stack --stack-yaml=stack-8.4.3.yaml build
4648 stack --stack-yaml=stack-8.4.3.yaml install \
4749 && cp ' $(STACKLOCALBINDIR)/hie' ' $(STACKLOCALBINDIR)/hie-8.4.3' \
4850 && cp ' $(STACKLOCALBINDIR)/hie-8.4.3' ' $(STACKLOCALBINDIR)/hie-8.4'
4951.PHONY : hie-8.4.3
5052
5153# # Builds hie for GHC version 8.4.4 only
52- hie-8.4.4 : submodules
54+ hie-8.4.4 : submodules cabal
5355 stack --stack-yaml=stack-8.4.4.yaml build
5456 stack --stack-yaml=stack-8.4.4.yaml install \
5557 && cp ' $(STACKLOCALBINDIR)/hie' ' $(STACKLOCALBINDIR)/hie-8.4.4' \
5658 && cp ' $(STACKLOCALBINDIR)/hie-8.4.4' ' $(STACKLOCALBINDIR)/hie-8.4'
5759.PHONY : hie-8.4.4
5860
61+ # # Builds hie for GHC version 8.6.1 only
62+ hie-8.6.1 : submodules cabal
63+ stack --stack-yaml=stack-8.6.1.yaml build
64+ stack --stack-yaml=stack-8.6.1.yaml install \
65+ && cp ' $(STACKLOCALBINDIR)/hie' ' $(STACKLOCALBINDIR)/hie-8.6.1' \
66+ && cp ' $(STACKLOCALBINDIR)/hie-8.6.1' ' $(STACKLOCALBINDIR)/hie-8.4'
67+ .PHONY : hie-8.6.1
68+
69+ # # Builds hie for GHC version 8.6.2 only
70+ hie-8.6.2 : submodules cabal
71+ stack --stack-yaml=stack-8.6.2.yaml build
72+ stack --stack-yaml=stack-8.6.2.yaml install \
73+ && cp ' $(STACKLOCALBINDIR)/hie' ' $(STACKLOCALBINDIR)/hie-8.6.2' \
74+ && cp ' $(STACKLOCALBINDIR)/hie-8.6.2' ' $(STACKLOCALBINDIR)/hie-8.4'
75+ .PHONY : hie-8.6.2
76+
5977# ------------------------------------------------------
6078
6179# # Updates local git submodules
6280submodules :
6381 git submodule update --init
6482.PHONY : submodules
6583
84+ # ------------------------------------------------------
85+
86+ # # Makes sure that Cabal the lib is available for cabal-helper-wapper,
87+ # # to speed up project start
88+
89+ # # NOTE 1: cabal-helper-wrapper builds with old style cabal build, so
90+ # # must be installed this way.
91+ # # NOTE 2: this is temporary, will go away once the new cabal-helper lands.
92+ # # NOTE 3: This is needed for stack only projects too
93+ cabal :
94+ cabal update
95+ cabal install Cabal-2.4.1.0
96+ .PHONY : cabal
97+
98+ # ------------------------------------------------------
99+
66100# # Builds the Hoogle database for all supported GHC versions
67101build-docs :
68102 stack --stack-yaml=stack-8.2.1.yaml exec hoogle generate \
69103 && stack --stack-yaml=stack-8.2.2.yaml exec hoogle generate \
70104 && stack --stack-yaml=stack-8.4.2.yaml exec hoogle generate \
71105 && stack --stack-yaml=stack-8.4.3.yaml exec hoogle generate \
72106 && stack --stack-yaml=stack-8.4.4.yaml exec hoogle generate
107+ && stack --stack-yaml=stack-8.6.1.yaml exec hoogle generate
108+ && stack --stack-yaml=stack-8.6.2.yaml exec hoogle generate
73109.PHONY : build-docs
74110
75111
76112# ------------------------------------------------------
77113
78114# # Runs hie tests
79- test : submodules
115+ test : submodules cabal
80116 stack --stack-yaml=stack-8.2.1.yaml test \
81117 && stack --stack-yaml=stack-8.2.2.yaml test \
82118 && stack --stack-yaml=stack-8.4.2.yaml test \
83119 && stack --stack-yaml=stack-8.4.3.yaml test \
84120 && stack --stack-yaml=stack-8.4.4.yaml test
121+ && stack --stack-yaml=stack-8.6.1.yaml test
122+ && stack --stack-yaml=stack-8.6.2.yaml test
85123.PHONY : test
86124
87- build-copy-compiler-tool : submodules
125+ build-copy-compiler-tool : submodules cabal
88126 stack --stack-yaml=stack-8.2.1.yaml build --copy-compiler-tool \
89127 && stack --stack-yaml=stack-8.2.2.yaml build --copy-compiler-tool \
90128 && stack --stack-yaml=stack-8.4.2.yaml build --copy-compiler-tool \
91129 && stack --stack-yaml=stack-8.4.3.yaml build --copy-compiler-tool \
92130 && stack --stack-yaml=stack-8.4.4.yaml build --copy-compiler-tool
131+ && stack --stack-yaml=stack-8.6.1.yaml build --copy-compiler-tool
132+ && stack --stack-yaml=stack-8.6.2.yaml build --copy-compiler-tool
93133.PHONY : build-copy-compiler-tool
94134
95135# # Fixes icu related problems in MacOS
@@ -114,6 +154,12 @@ icu-macos-fix-build:
114154 --extra-lib-dirs=/usr/local/opt/icu4c/lib \
115155 --extra-include-dirs=/usr/local/opt/icu4c/include \
116156 && stack --stack-yaml=stack-8.4.4.yaml build text-icu \
157+ --extra-lib-dirs=/usr/local/opt/icu4c/lib \
158+ --extra-include-dirs=/usr/local/opt/icu4c/include \
159+ && stack --stack-yaml=stack-8.6.1.yaml build text-icu \
160+ --extra-lib-dirs=/usr/local/opt/icu4c/lib \
161+ --extra-include-dirs=/usr/local/opt/icu4c/include \
162+ && stack --stack-yaml=stack-8.6.2.yaml build text-icu \
117163 --extra-lib-dirs=/usr/local/opt/icu4c/lib \
118164 --extra-include-dirs=/usr/local/opt/icu4c/include
119165.PHONY : icu-macos-fix-build
0 commit comments