summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-05-20 19:57:57 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-05-30 17:02:38 +0200
commit577d315824440bba5e2f56d2eeba9bd8c5ee17e4 (patch)
tree3feef6a7cf0f595a5bf671b7447761b8890b78ec /mk
parent48ed2f128ac0e550022826154e449a5cc55f2d3a (diff)
downloadhaskell-577d315824440bba5e2f56d2eeba9bd8c5ee17e4.tar.gz
Build system: always use `make -r`
Do what this comment was suggesting: "Ideally we'd like to have 'make -r' turned on by default, because that disables all the implicit rules, but there doesn't seem to be a good way to do that." This change doesn't seem to have much effect on the time it takes to run make. Apparently clearing .SUFFIXES was enough for that. But it does make the output of `make -d` quite a bit shorter, which is nice. Note: ghc.mk is always called indirectly, so no need to set .SUFFIXES or MAKEFLAGS there again. Differential Revision: https://phabricator.haskell.org/D915
Diffstat (limited to 'mk')
-rw-r--r--mk/sub-makefile.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk
index 0ed85c8d56..12f47f0f45 100644
--- a/mk/sub-makefile.mk
+++ b/mk/sub-makefile.mk
@@ -9,7 +9,12 @@
# make clean ==> make -C $(TOP) clean_dir
#
-# Important, otherwise we get silly built-in rules:
+# Eliminate use of the built-in implicit rules, and clear out the default list
+# of suffixes for suffix rules. Speeds up make quite a bit. Both are needed
+# for the shortest `make -d` output.
+# Don't set --no-builtin-variables; some rules might stop working if you do
+# (e.g. 'make clean' in testsuite/ currently relies on an implicit $RM).
+MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
TOPMAKE = $(MAKE) -C $(TOP)