Build Hadrian in _build.
[hadrian.git] / build.bat
1 @cd %~dp0
2 @mkdir ../_build 2> nul
3
4 @set ghcArgs=--make ^
5 -Wall ^
6 -fno-warn-name-shadowing ^
7 -XRecordWildCards ^
8 src/Main.hs ^
9 -threaded ^
10 -isrc ^
11 -rtsopts ^
12 -with-rtsopts=-I0 ^
13 -outputdir=../_build/hadrian ^
14 -j ^
15 -O ^
16 -o ../_build/hadrian
17
18 @set hadrianArgs=--lint ^
19 --directory ^
20 ".." ^
21 %*
22
23
24 @ghc %ghcArgs%
25
26 @if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
27
28 @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains
29 @set GHC_PACKAGE_PATH=
30 @..\_build\hadrian %hadrianArgs%