Make dependencies easier to copy
[hadrian.git] / build.bat
1 @cd %~dp0
2 @mkdir ../_build/hadrian 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 -i../libraries/Cabal/Cabal ^
15 -j ^
16 -O ^
17 -o hadrian
18
19 @set hadrianArgs=--lint ^
20 --directory ^
21 ".." ^
22 %*
23
24
25 @ghc %ghcArgs%
26
27 @if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
28
29 @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains
30 @set GHC_PACKAGE_PATH=
31 @hadrian %hadrianArgs%