Move Hadrian executable to /hadrian.
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Sat, 30 Apr 2016 13:35:22 +0000 (14:35 +0100)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Sat, 30 Apr 2016 13:35:22 +0000 (14:35 +0100)
.gitignore
.travis.yml
appveyor.yml
build.bat
build.sh
src/Rules/Clean.hs

index 967be07..b7bfddb 100644 (file)
@@ -1,7 +1,10 @@
-/.shake/
 /.db/
 cfg/system.config
 
+# build.bat and build.sh specific
+/hadrian
+/hadrian.exe
+
 # build.cabal.sh specific
 /dist/
 /.cabal-sandbox/
index 251f6ba..6832cd8 100644 (file)
@@ -48,8 +48,6 @@ install:
     # ".git"  directory into the appropriate location, and perform a hard reset
     # in order to regenerate the GHC-Shake files.
     - mkdir ghc/hadrian
-    - mkdir ghc/_build
-    - mkdir ghc/_build/hadrian
     - mv .git ghc/hadrian
     - ( cd ghc/hadrian && git reset --hard HEAD )
 
index 8850273..3918779 100644 (file)
@@ -36,9 +36,6 @@ install:
     - alex  --version
     - happy --version
     - stack exec -- ghc-pkg list
-    - mkdir _build
-    - cd _build
-    - mkdir hadrian
 
 build_script:
     - cd C:\msys64\home\ghc\hadrian
index 19a2a05..f9f0b9a 100644 (file)
--- a/build.bat
+++ b/build.bat
@@ -1,5 +1,5 @@
 @cd %~dp0\r
-@mkdir ../_build 2> nul\r
+@mkdir ../_build/hadrian 2> nul\r
 \r
 @set ghcArgs=--make                       ^\r
              -Wall                        ^\r
@@ -13,7 +13,7 @@
              -outputdir=../_build/hadrian ^\r
              -j                           ^\r
              -O                           ^\r
-             -o ../_build/hadrian\r
+             -o hadrian\r
 \r
 @set hadrianArgs=--lint      ^\r
                  --directory ^\r
@@ -27,4 +27,4 @@
 \r
 @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains\r
 @set GHC_PACKAGE_PATH=\r
-@..\_build\hadrian %hadrianArgs%\r
+@hadrian %hadrianArgs%\r
index 8b53f81..f7d06c2 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -30,7 +30,7 @@ function rl {
 
 root="$(dirname "$(rl "$0")")"
 
-mkdir -p "$root/../_build"
+mkdir -p "$root/../_build/hadrian"
 
 ghc                                      \
     "$root/src/Main.hs"                  \
@@ -43,9 +43,9 @@ ghc                                      \
     -threaded                            \
     -outputdir="$root/../_build/hadrian" \
     -j -O                                \
-    -o "$root/../_build/hadrian"
+    -o "$root/hadrian"
 
-"$root/../_build/hadrian"  \
+"$root/hadrian"            \
     --lint                 \
     --directory "$root/.." \
     --colour               \
index 357ac34..0bff316 100644 (file)
@@ -17,8 +17,7 @@ clean dir = do
 cleanRules :: Rules ()
 cleanRules = do
     "clean" ~> do
-        forM_ [Stage0 ..] $ \stage -> clean (buildRootPath -/- stageString stage)
-        clean (buildRootPath -/- "hadrian")
+        clean buildRootPath
         clean programInplacePath
         clean "inplace/lib"
         clean derivedConstantsPath