.bat file tidy up plus shake-0.16 compatibility (#392)
[hadrian.git] / build.bat
1 @echo off
2 setlocal
3 cd %~dp0
4 mkdir bin 2> nul
5
6 set ghcArgs=--make ^
7 -Wall ^
8 -fno-warn-name-shadowing ^
9 -XRecordWildCards ^
10 src\Main.hs ^
11 -threaded ^
12 -isrc ^
13 -i..\libraries\Cabal\Cabal ^
14 -rtsopts ^
15 -with-rtsopts=-I0 ^
16 -outputdir=bin ^
17 -j ^
18 -O ^
19 -o bin\hadrian
20
21 set hadrianArgs=--lint ^
22 --directory ^
23 ".." ^
24 %*
25
26
27 ghc %ghcArgs%
28
29 if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
30
31 rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains
32 set GHC_PACKAGE_PATH=
33 bin\hadrian %hadrianArgs%