summaryrefslogtreecommitdiff
path: root/build.global-db.bat
diff options
context:
space:
mode:
Diffstat (limited to 'build.global-db.bat')
-rw-r--r--build.global-db.bat32
1 files changed, 32 insertions, 0 deletions
diff --git a/build.global-db.bat b/build.global-db.bat
new file mode 100644
index 0000000000..0d6a6968a8
--- /dev/null
+++ b/build.global-db.bat
@@ -0,0 +1,32 @@
+@echo off
+setlocal
+cd %~dp0
+mkdir bin 2> nul
+
+set ghcArgs=--make ^
+ -Wall ^
+ -fno-warn-name-shadowing ^
+ -XRecordWildCards ^
+ src\Main.hs ^
+ -threaded ^
+ -isrc ^
+ -i..\libraries\Cabal\Cabal ^
+ -rtsopts ^
+ -with-rtsopts=-I0 ^
+ -outputdir=bin ^
+ -j ^
+ -O ^
+ -o bin\hadrian
+
+set hadrianArgs=--lint ^
+ --directory ^
+ ".." ^
+ %*
+
+ghc %ghcArgs%
+
+if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
+
+rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains
+set GHC_PACKAGE_PATH=
+bin\hadrian %hadrianArgs%