summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-08-28 12:23:04 +0100
committerIan Lynagh <igloo@earth.li>2011-08-28 12:23:04 +0100
commit12646a9c0f748da67098d9da3f357a756fd7df7c (patch)
tree534b24e66e7909a9e922874093c715988341be6a /ghc.mk
parent3a6120a279aa290e98a42f4c955ac5a1de781cec (diff)
downloadhaskell-12646a9c0f748da67098d9da3f357a756fd7df7c.tar.gz
By default, be lax about dependencies on GHC
There are a number of things which technically depend on GHC (e.g. if ghc changes then Haskell files may be compiled differently, or Cabal packages may be configured differently). However, in practice, having a real dependency on GHC is just a pain: We normally don't want to spend time recompiling other things while we're working on the compiler, and even if we did, GHC will normally decide compilation isn't needed anyway. So by default we use order-only dependencies on GHC, i.e. GHC must exist, but if it's newer than other targets then rebuilding is not necessary.
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index bae8d91273..53ad19d5a0 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -284,6 +284,25 @@ include rules/bindist.mk
%/. : | $(MKDIRHIER)
"$(MKDIRHIER)" $@
+# -----------------------------------------------------------------------------
+# Lax dependencies
+
+ifeq "$(LAX_DEPENDENCIES)" "YES"
+LAX_DEPS_FOLLOW = |
+else
+LAX_DEPS_FOLLOW =
+endif
+
+# This is a bit of a hack. When LAX_DEPS_FOLLOW is | some rules end up
+# looking like
+# target: a | b | c
+# The first | signals the start of the order-only dependencies, but make
+# treats the second | as a dependency. So we need to tell make how to
+# build that dependency.
+
+.PHONY: |
+| :
+ @:
# -----------------------------------------------------------------------------
# Properties of packages