Build system: don't build runghc if GhcWithInterpreter=NO (#10261)
authorThomas Miedema <thomasmiedema@gmail.com>
Thu, 28 May 2015 17:34:15 +0000 (19:34 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Sat, 30 May 2015 15:04:10 +0000 (17:04 +0200)
To test:
  * run `make clean` in utils/runghc
  * make sure inplace/bin doesn't contain runghc
  * set GhcWithInterpreter=NO in build.mk
  * run `make`
  * note that inplace/bin doesn't contain runghc

It won't be installed either, nor will runhaskell.

Differential Revision: https://phabricator.haskell.org/D920

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 5c239cd..5a1845c 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -661,7 +661,11 @@ BUILD_DIRS += utils/dll-split
 BUILD_DIRS += utils/ghc-pwd
 BUILD_DIRS += utils/ghc-cabal
 BUILD_DIRS += utils/hpc
+ifeq "$(GhcWithInterpreter)" "YES"
 BUILD_DIRS += utils/runghc
+else ifeq "$(CLEANING)" "YES"
+BUILD_DIRS += utils/runghc
+endif
 BUILD_DIRS += ghc
 
 ifneq "$(BINDIST)" "YES"