Implement the equivalent of D4955 (#648)
[hadrian.git] / build.bat
index 4cbbc42..01a869f 100644 (file)
--- a/build.bat
+++ b/build.bat
@@ -1,22 +1,6 @@
-@mkdir .shake 2> nul\r
-\r
-@set ghcArgs=--make            ^\r
-             -Wall             ^\r
-             src/Main.hs       ^\r
-             -isrc             ^\r
-             -rtsopts          ^\r
-             -with-rtsopts=-I0 ^\r
-             -outputdir=.shake ^\r
-             -j                ^\r
-             -O                ^\r
-             -o .shake/build\r
-\r
-@set shakeArgs=--lint      ^\r
-               --directory ^\r
-               ".."        ^\r
-               %*\r
-\r
-@rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains\r
-@if defined GHC_PACKAGE_PATH ( set GHC_PACKAGE_PATH )\r
-\r
-@ghc %ghcArgs% && .shake\build %shakeArgs%\r
+@echo off
+setlocal
+cd %~dp0
+
+rem By default on Windows we build Hadrian using Stack
+./build.stack.bat %*