[commit: ghc] wip/nfs-locking: Move Hadrian executable to /hadrian. (666f5c2)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:57:12 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/666f5c246d0465fd7c11bce4dadeacd46152edf5/ghc

>---------------------------------------------------------------

commit 666f5c246d0465fd7c11bce4dadeacd46152edf5
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Apr 30 14:35:22 2016 +0100

    Move Hadrian executable to /hadrian.


>---------------------------------------------------------------

666f5c246d0465fd7c11bce4dadeacd46152edf5
 .gitignore         | 5 ++++-
 .travis.yml        | 2 --
 appveyor.yml       | 3 ---
 build.bat          | 6 +++---
 build.sh           | 6 +++---
 src/Rules/Clean.hs | 3 +--
 6 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
index 967be07..b7bfddb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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/
diff --git a/.travis.yml b/.travis.yml
index 251f6ba..6832cd8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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 )
 
diff --git a/appveyor.yml b/appveyor.yml
index 8850273..3918779 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -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
diff --git a/build.bat b/build.bat
index 19a2a05..f9f0b9a 100644
--- a/build.bat
+++ b/build.bat
@@ -1,5 +1,5 @@
 @cd %~dp0
- at mkdir ../_build 2> nul
+ at mkdir ../_build/hadrian 2> nul
 
 @set ghcArgs=--make                       ^
              -Wall                        ^
@@ -13,7 +13,7 @@
              -outputdir=../_build/hadrian ^
              -j                           ^
              -O                           ^
-             -o ../_build/hadrian
+             -o hadrian
 
 @set hadrianArgs=--lint      ^
                  --directory ^
@@ -27,4 +27,4 @@
 
 @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains
 @set GHC_PACKAGE_PATH=
- at ..\_build\hadrian %hadrianArgs%
+ at hadrian %hadrianArgs%
diff --git a/build.sh b/build.sh
index 8b53f81..f7d06c2 100755
--- 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               \
diff --git a/src/Rules/Clean.hs b/src/Rules/Clean.hs
index 357ac34..0bff316 100644
--- a/src/Rules/Clean.hs
+++ b/src/Rules/Clean.hs
@@ -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



More information about the ghc-commits mailing list