Pretty-printer missing parens for infix class declaration
[ghc.git] / Makefile
index 348375f..cffd4ec 100644 (file)
--- a/Makefile
+++ b/Makefile
 MAKEFLAGS += --no-builtin-rules
 .SUFFIXES:
 
+
+# -----------------------------------------------------------------------------
+# Sanitize environment
+
+# See Trac #11530
+export GREP_OPTIONS :=
+
+ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
+-include mk/config.mk
+else
+include mk/config.mk
+ifeq "$(ProjectVersion)" ""
+$(error Please run ./configure first)
+endif
+endif
+
+include mk/custom-settings.mk
+
+
 ifeq "$(wildcard distrib/)" ""
 
 # We're in a bindist
@@ -45,7 +64,7 @@ install show:
 .PHONY: install-strip
 install-strip:
        # See Note [install-strip].
-       $(MAKE) --no-print-directory -f ghc.mk INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+       $(MAKE) --no-print-directory -f ghc.mk INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install BINDIST=YES NO_INCLUDE_DEPS=YES
 
 else
 
@@ -58,24 +77,6 @@ default : all
 help:
        @cat MAKEHELP.md
 
-ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
--include mk/config.mk
-else
-include mk/config.mk
-ifeq "$(ProjectVersion)" ""
-$(error Please run ./configure first)
-endif
-endif
-
-include mk/custom-settings.mk
-
-# Verify that stage 0 LLVM backend isn't affected by Bug #9439 if needed
-ifeq "$(GHC_LLVM_AFFECTED_BY_9439)" "1"
-ifneq "$(findstring -fllvm,$(SRC_HC_OPTS) $(GhcHcOpts) $(GhcStage1HcOpts))" ""
-$(error Stage 0 compiler is affected by Bug #9439. Refusing to bootstrap with -fllvm)
-endif
-endif
-
 # No need to update makefiles for these targets:
 # (the ones we're filtering out)
 REALGOALS=$(filter-out \
@@ -128,9 +129,15 @@ endif
        @echo "===--- building final phase"
        $(MAKE) --no-print-directory -f ghc.mk phase=final $@
 
+# if BINARY_DIST_DIR is not set, assume we want the old
+# behaviour of placing the binary dist into the current
+# directory. Provide BINARY_DIST_DIR to put the final
+# binary distribution elsewhere.
+BINARY_DIST_DIR ?= .
+
 .PHONY: binary-dist
 binary-dist: binary-dist-prep
-       mv bindistprep/*.tar.$(TAR_COMP_EXT) .
+       mv bindistprep/*.tar.$(TAR_COMP_EXT) "$(BINARY_DIST_DIR)"
 
 .PHONY: binary-dist-prep
 binary-dist-prep:
@@ -208,13 +215,17 @@ endif
 # out-of-date, it is useful if Phabricator, via a normal `./validate` and `make
 # test`, runs each test at least once.
 .PHONY: fasttest
-fasttest:
+fasttest: testsuite_utils
        $(MAKE) -C testsuite/tests CLEANUP=1 SUMMARY_FILE=../../testsuite_summary.txt fast
 
 .PHONY: test
-test:
+test: testsuite_utils
        $(MAKE) -C testsuite/tests CLEANUP=1 SUMMARY_FILE=../../testsuite_summary.txt
 
 .PHONY: slowtest fulltest
-slowtest fulltest:
+slowtest fulltest: testsuite_utils
        $(MAKE) -C testsuite/tests CLEANUP=1 SUMMARY_FILE=../../testsuite_summary.txt slow
+
+.PHONY: testsuite_utils
+testsuite_utils:
+       $(MAKE) -f ghc.mk testsuite_utils