summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-05 22:29:57 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-06 10:58:16 -0400
commit50dfa94127fe397f7cd1caaf5bf2cbd0214c7774 (patch)
tree0faf61537283337e79a4ad6b8a3f9930aa1fb855 /mk
parent78ec83021aba72362c4801b6108ce610f2598ab1 (diff)
downloadhaskell-50dfa94127fe397f7cd1caaf5bf2cbd0214c7774.tar.gz
Drop make build system
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler-ghc.mk58
-rw-r--r--mk/custom-settings.mk14
-rw-r--r--mk/flavours/bench-cross-ncg.mk15
-rw-r--r--mk/flavours/bench-cross.mk15
-rw-r--r--mk/flavours/bench-llvm.mk10
-rw-r--r--mk/flavours/bench.mk10
-rw-r--r--mk/flavours/devel-cross-ncg.mk18
-rw-r--r--mk/flavours/devel1.mk16
-rw-r--r--mk/flavours/devel2.mk16
-rw-r--r--mk/flavours/dwarf.mk14
-rw-r--r--mk/flavours/perf-cross-ncg.mk14
-rw-r--r--mk/flavours/perf-cross.mk14
-rw-r--r--mk/flavours/perf-llvm.mk8
-rw-r--r--mk/flavours/perf.mk8
-rw-r--r--mk/flavours/prof-llvm.mk12
-rw-r--r--mk/flavours/prof.mk11
-rw-r--r--mk/flavours/quick-cross-ncg.mk15
-rw-r--r--mk/flavours/quick-cross.mk15
-rw-r--r--mk/flavours/quick-llvm.mk10
-rw-r--r--mk/flavours/quick.mk10
-rw-r--r--mk/flavours/quickest.mk10
-rw-r--r--mk/flavours/validate.mk56
-rw-r--r--mk/sub-makefile.mk67
-rw-r--r--mk/tree.mk73
-rw-r--r--mk/validate.mk.sample4
-rw-r--r--mk/warnings.mk155
-rw-r--r--mk/ways.mk105
27 files changed, 0 insertions, 773 deletions
diff --git a/mk/compiler-ghc.mk b/mk/compiler-ghc.mk
deleted file mode 100644
index 739f6157d5..0000000000
--- a/mk/compiler-ghc.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# -----------------------------------------------------------------------------
-#
-# (c) 2009 The University of Glasgow
-#
-# This file is part of the GHC build system.
-#
-# To understand how the build system works and how to modify it, see
-# https://gitlab.haskell.org/ghc/ghc/wikis/building/architecture
-# https://gitlab.haskell.org/ghc/ghc/wikis/building/modifying
-#
-# -----------------------------------------------------------------------------
-
-TOP = ..
-SPEC_TARGETS = 1 2 3 re1 re2 re3
-include $(TOP)/mk/sub-makefile.mk
-
-FAST_MAKE_OPTS += compiler_stage1_NO_BUILD_DEPS=YES \
- compiler_stage2_NO_BUILD_DEPS=YES \
- compiler_stage3_NO_BUILD_DEPS=YES \
- ghc_stage1_NO_BUILD_DEPS=YES \
- ghc_stage2_NO_BUILD_DEPS=YES \
- ghc_stage3_NO_BUILD_DEPS=YES
-
-.PHONY: 1 2 3
-
-1:
- +$(TOPMAKE) stage=1 all_ghc_stage1 $(FAST_MAKE_OPTS) ONLY_DEPS_FOR="compiler_stage1 ghc_stage1"
-
-2:
- +$(TOPMAKE) stage=2 all_ghc_stage2 $(FAST_MAKE_OPTS) ONLY_DEPS_FOR="compiler_stage2 ghc_stage2" NO_STAGE2_DEPS=YES
-
-3:
- +$(TOPMAKE) stage=3 all_ghc_stage3 $(FAST_MAKE_OPTS) ONLY_DEPS_FOR="compiler_stage3 ghc_stage3" NO_STAGE3_DEPS=YES
-
-
-# 'make re2' rebuilds stage2, removing the old executable first. Useful for
-# something like 'make re2 GhcDebugged=YES'.
-
-.PHONY: re1 re2 re3
-re1:
- $(RM) $(TOP)/ghc/stage1/build/tmp/ghc-stage1
- $(MAKE) 1
-re2:
- $(RM) $(TOP)/ghc/stage2/build/tmp/ghc-stage2
- $(MAKE) 2
-re3:
- $(RM) $(TOP)/ghc/stage3/build/tmp/ghc-stage3
- $(MAKE) 3
-
-.PHONY: extra-help
-help : extra-help
-extra-help :
- @echo " make 1"
- @echo " make 2"
- @echo " make 3"
- @echo
- @echo " Build the stage 1, 2 or 3 GHC respectively, omitting dependencies"
- @echo " and initial phases for speed."
diff --git a/mk/custom-settings.mk b/mk/custom-settings.mk
deleted file mode 100644
index 2b4b127102..0000000000
--- a/mk/custom-settings.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-
--include mk/are-validating.mk
-
-ifeq "$(Validating)" "YES"
-include mk/flavours/validate.mk
--include mk/validate.mk
-else
--include $(firstword $(wildcard mk/$(TargetPlatformFull)-build.mk) mk/build.mk)
-endif
-
-ifeq "$(BINDIST)" "YES"
--include bindist.mk
-endif
-
diff --git a/mk/flavours/bench-cross-ncg.mk b/mk/flavours/bench-cross-ncg.mk
deleted file mode 100644
index d52eb1ca80..0000000000
--- a/mk/flavours/bench-cross-ncg.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/bench-cross.mk b/mk/flavours/bench-cross.mk
deleted file mode 100644
index 98f0531bc7..0000000000
--- a/mk/flavours/bench-cross.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O0 -fllvm
-GhcLibHcOpts = -O2 -fllvm
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/bench-llvm.mk b/mk/flavours/bench-llvm.mk
deleted file mode 100644
index 58fb92df21..0000000000
--- a/mk/flavours/bench-llvm.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC_HC_OPTS = -O -H64m -fllvm
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
diff --git a/mk/flavours/bench.mk b/mk/flavours/bench.mk
deleted file mode 100644
index ecfc535178..0000000000
--- a/mk/flavours/bench.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
diff --git a/mk/flavours/devel-cross-ncg.mk b/mk/flavours/devel-cross-ncg.mk
deleted file mode 100644
index 0d5325dd25..0000000000
--- a/mk/flavours/devel-cross-ncg.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O2 -DDEBUG
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
-DYNAMIC_GHC_PROGRAMS = NO
-
-libraries/Cabal_dist-install_HC_OPTS += -O0
diff --git a/mk/flavours/devel1.mk b/mk/flavours/devel1.mk
deleted file mode 100644
index 1c03aff10b..0000000000
--- a/mk/flavours/devel1.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O0 -DDEBUG
-GhcStage2HcOpts = -O
-GhcLibHcOpts = -O -dcore-lint
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-
-LAX_DEPENDENCIES = YES
-
-# Reduce optimisation when building Cabal; this makes a significant difference
-# in overall build time. See #16817.
-libraries/Cabal_dist-install_HC_OPTS += -O0
diff --git a/mk/flavours/devel2.mk b/mk/flavours/devel2.mk
deleted file mode 100644
index 2d7d3b3884..0000000000
--- a/mk/flavours/devel2.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0 -DDEBUG
-GhcLibHcOpts = -O -dcore-lint
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-
-LAX_DEPENDENCIES = YES
-
-# Reduce optimisation when building Cabal; this makes a significant difference
-# in overall build time. See #16817.
-libraries/Cabal_dist-install_HC_OPTS += -O0
diff --git a/mk/flavours/dwarf.mk b/mk/flavours/dwarf.mk
deleted file mode 100644
index 15f16e2c37..0000000000
--- a/mk/flavours/dwarf.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# Build flavour which produces a compiler, RTS, and core libraries with DWARF
-# debug information. For best results run ./configure with
-# --enable-dwarf-unwind.
-
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O2 -g3
-GhcRtsHcOpts = -O2 -g3
-GhcLibHcOpts = -O2 -g3
-BUILD_PROF_LIBS = YES
-#SplitObjs
-#HADDOCK_DOCS
-#BUILD_SPHINX_HTML
-#BUILD_SPHINX_PDF
diff --git a/mk/flavours/perf-cross-ncg.mk b/mk/flavours/perf-cross-ncg.mk
deleted file mode 100644
index 61db9b5d43..0000000000
--- a/mk/flavours/perf-cross-ncg.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O2
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = YES
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/perf-cross.mk b/mk/flavours/perf-cross.mk
deleted file mode 100644
index 7b85cc6979..0000000000
--- a/mk/flavours/perf-cross.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O2 -fllvm
-GhcLibHcOpts = -O2 -fllvm
-BUILD_PROF_LIBS = YES
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/perf-llvm.mk b/mk/flavours/perf-llvm.mk
deleted file mode 100644
index 2598f4a40d..0000000000
--- a/mk/flavours/perf-llvm.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-SRC_HC_OPTS = -O -H64m -fllvm
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O2
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = YES
-#HADDOCK_DOCS
-#BUILD_SPHINX_HTML
-#BUILD_SPHINX_PDF
diff --git a/mk/flavours/perf.mk b/mk/flavours/perf.mk
deleted file mode 100644
index ee856626ad..0000000000
--- a/mk/flavours/perf.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-SRC_HC_OPTS = -O -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O2
-GhcLibHcOpts = -O2
-BUILD_PROF_LIBS = YES
-#HADDOCK_DOCS
-#BUILD_SPHINX_HTML
-#BUILD_SPHINX_PDF
diff --git a/mk/flavours/prof-llvm.mk b/mk/flavours/prof-llvm.mk
deleted file mode 100644
index 9c284432aa..0000000000
--- a/mk/flavours/prof-llvm.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m -fllvm
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = YES
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-
-GhcProfiled = YES
diff --git a/mk/flavours/prof.mk b/mk/flavours/prof.mk
deleted file mode 100644
index 6c4a6baac3..0000000000
--- a/mk/flavours/prof.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = YES
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-
-GhcProfiled = YES
diff --git a/mk/flavours/quick-cross-ncg.mk b/mk/flavours/quick-cross-ncg.mk
deleted file mode 100644
index 748720f01c..0000000000
--- a/mk/flavours/quick-cross-ncg.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/quick-cross.mk b/mk/flavours/quick-cross.mk
deleted file mode 100644
index 4e3f47fd67..0000000000
--- a/mk/flavours/quick-cross.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O0 -fllvm
-GhcLibHcOpts = -O -fllvm
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
-WITH_TERMINFO = NO
-
-BIGNUM_BACKEND = native
-Stage1Only = YES
-DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/quick-llvm.mk b/mk/flavours/quick-llvm.mk
deleted file mode 100644
index 9869041012..0000000000
--- a/mk/flavours/quick-llvm.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m -fllvm
-GhcStage1HcOpts = -O
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
diff --git a/mk/flavours/quick.mk b/mk/flavours/quick.mk
deleted file mode 100644
index 286cb2ed23..0000000000
--- a/mk/flavours/quick.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
diff --git a/mk/flavours/quickest.mk b/mk/flavours/quickest.mk
deleted file mode 100644
index 5583748eb9..0000000000
--- a/mk/flavours/quickest.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-GhcStage1HcOpts = -O2
-GhcStage2HcOpts = -O0
-GhcLibHcOpts = -O0
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = NO
-BUILD_SPHINX_HTML = NO
-BUILD_SPHINX_PDF = NO
-BUILD_MAN = NO
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk
deleted file mode 100644
index eddd22fb82..0000000000
--- a/mk/flavours/validate.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-SRC_HC_OPTS = -O0 -H64m
-SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage # See #11487
-GhcStage1HcOpts = -O2 -DDEBUG
-GhcStage2HcOpts = -O -dcore-lint -dno-debug-output
-GhcLibHcOpts = -O -dcore-lint -dno-debug-output
-BUILD_PROF_LIBS = NO
-SplitSections = NO
-HADDOCK_DOCS = YES
-BUILD_SPHINX_HTML ?= YES
-BUILD_SPHINX_PDF ?= NO
-
-ifeq "$(ValidateHpc)" "YES"
-GhcStage2HcOpts += -fhpc -hpcdir $(TOP)/testsuite/hpc_output/
-endif
-
-ifeq "$(ValidateSpeed)" "SLOW"
-GhcStage2HcOpts += -DDEBUG
-endif
-
-ifeq "$(ValidateSpeed)" "SLOW"
-BUILD_PROF_LIBS = YES
-endif
-
-ifneq "$(ValidateSpeed)" "FAST"
-BUILD_EXTRA_PKGS = YES
-endif
-
-WERROR = -Werror
-
-# Reduce optimisation when building Cabal; this makes a significant difference
-# in overall build time. See #16817.
-libraries/Cabal_dist-install_HC_OPTS += -O0
-
-# DO NOT EDIT THIS FILE! Instead, create a file mk/validate.mk, whose settings
-# will override these. See also mk/custom-settings.mk.
-#
-#
-# (Note: these comments are at the end of this file, to make it easier to diff
-# this file with other build flavours.)
-#
-#
-# Note [validate build settings]
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-# Using GhcStage2HcOpts=-O (rather than -O0) here bringes my validate down from
-# 22mins to 16 mins. Compiling stage2 takes longer, but we gain a faster
-# haddock, faster running of the tests, and faster building of the utils to be
-# installed
-#
-# dblatex with miktex under msys/mingw can't build the PS and PDF docs,
-# and just building the HTML docs is sufficient to check that the
-# markup is correct, so we turn off PS and PDF doc building when
-# validating.
-#
-# We set BUILD_EXTRA_PKGS=YES to build the "extra" packages (see ./packages),
-# so that we can test them.
diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk
deleted file mode 100644
index 73d98c992c..0000000000
--- a/mk/sub-makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-# This file is included by all the "stub makefiles" in every directory
-# in the tree except the root. Its job is to invoke $(MAKE) on the
-# top-level Makefile, but modifying the target so that it applies to
-# the current directory only.
-#
-# eg.
-# make foo.o ==> make -C $(TOP) dir/foo.o
-# make all ==> make -C $(TOP) all_dir
-# make clean ==> make -C $(TOP) clean_dir
-#
-
-# 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)
-
-default: all
-
-fast: all
-
-FAST_MAKE_OPTS =\
- $(dir)_dist_NO_BUILD_DEPS=YES \
- $(dir)_dist-boot_NO_BUILD_DEPS=YES \
- $(dir)_dist-install_NO_BUILD_DEPS=YES \
- NO_GENERATED_MAKEFILE_RULES=YES \
- OMIT_PHASE_0=YES OMIT_PHASE_1=YES
-
-ifneq "$(filter fast,$(MAKECMDGOALS))" ""
-EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS)
-else
-ifeq "$(FAST)" "YES"
-EXTRA_MAKE_OPTS += $(FAST_MAKE_OPTS)
-endif
-endif
-
-# We must not execute multiple recursive invocations of make in parallel.
-.NOTPARALLEL:
-
-STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
-DIRECTORY_INDEPENDENT_TARGETS = show show!
-
-# The + tells make that we're recursively invoking make, otherwise 'make -j2'
-# goes wrong.
-$(STD_TARGETS):
- +$(TOPMAKE) $@_$(dir) $(EXTRA_MAKE_OPTS)
-
-$(DIRECTORY_INDEPENDENT_TARGETS):
- +$(TOPMAKE) $@ $(EXTRA_MAKE_OPTS)
-
-OTHERTARGETS=$(filter-out fast help $(DIRECTORY_INDEPENDENT_TARGETS) $(STD_TARGETS) $(SPEC_TARGETS),$(MAKECMDGOALS))
-.PHONY: $(OTHERTARGETS)
-$(OTHERTARGETS):
- +$(TOPMAKE) $(dir)/$@ $(EXTRA_MAKE_OPTS)
-
-.PHONY: help
-help : sub-help
-
-.PHONY: sub-help
-sub-help :
- @echo "You are in subdirectory \"$(dir)\"."
- @echo "Useful targets in this directory:"
- @sed '1,/Using `make` in subdirectories/d' $(TOP)/MAKEHELP.md
diff --git a/mk/tree.mk b/mk/tree.mk
deleted file mode 100644
index a8925d60c3..0000000000
--- a/mk/tree.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-
-################################################################################
-#
-# Layout of the source tree
-#
-################################################################################
-
-# Here we provide defines for the various directories in the source tree,
-# so we can move things around more easily. A define $(GHC_FOO_DIR)
-# indicates a directory relative to the top of the source tree.
-
-GHC_UTILS_DIR = utils
-GHC_RTS_DIR = rts
-GHC_DRIVER_DIR = driver
-
-INPLACE = inplace
-INPLACE_BIN = $(INPLACE)/bin
-INPLACE_LIB = $(INPLACE)/lib
-INPLACE_TOPDIR = $(INPLACE)/lib
-INPLACE_MINGW = $(INPLACE)/mingw
-
-################################################################################
-#
-# Bindist testing directory
-#
-################################################################################
-
-# See Note [Spaces in TEST_HC].
-# Directory contains multiple spaces, to test that multiple spaces aren't
-# getting collapsed into a single space.
-BIN_DIST_INST_SUBDIR = "install dir"
-BIN_DIST_INST_DIR = bindisttest/$(BIN_DIST_INST_SUBDIR)
-
-################################################################################
-#
-# rm
-#
-################################################################################
-
-# These are here, rather than in config.mk, as they need to exist in an
-# unconfigured tree so that the various clean targets can be used
-# without configuring:
-ifeq "$(ONLY_SHOW_CLEANS)" "YES"
-RM = utils/testremove/wouldrm
-RM_OPTS = CLEAN_FILES
-RM_OPTS_REC = CLEAN_REC
-else
-RM = rm
-RM_OPTS = -f
-RM_OPTS_REC = -rf
-endif
-
-# If $1 is empty then we don't do anything (as "rm -rf" fails on
-# Solaris; trac #4916).
-# If $1 contains a * then we fail; globbing needs to be done at the call
-# site using $(wildcard ...). This makes it a little safer, as it's
-# harder to accidentally delete something you didn't mean to.
-# Similarly, we fail if any argument contains ".." or starts with a "/".
-
-removeFiles = $(call removeHelper,removeFiles,"$(RM)",$(RM_OPTS),$1)
-removeTrees = $(call removeHelper,removeTrees,"$(RM)",$(RM_OPTS_REC),$1)
-
-removeHelper = $(if $(strip $4),\
- $(if $(findstring *,$4),\
- $(error $1: Got a star: $4),\
- $(if $(findstring ..,$4),\
- $(error $1: Got dot-dot: $4),\
- $(if $(filter /%,$4),\
- $(error $1: Got leading slash: $4),\
- $2 $3 $4\
- )))\
- )
-
diff --git a/mk/validate.mk.sample b/mk/validate.mk.sample
deleted file mode 100644
index 83c2c40afd..0000000000
--- a/mk/validate.mk.sample
+++ /dev/null
@@ -1,4 +0,0 @@
-# These settings override mk/flavours/validate.mk (see
-# mk/custom-settings.mk).
-#HADDOCK_DOCS = NO
-#BUILD_SPHINX_HTML = NO
diff --git a/mk/warnings.mk b/mk/warnings.mk
deleted file mode 100644
index bdbdc79213..0000000000
--- a/mk/warnings.mk
+++ /dev/null
@@ -1,155 +0,0 @@
-# See Note [Order of warning flags].
-SRC_CC_OPTS += -Wall $(WERROR)
-SRC_HC_OPTS += -Wall
-# Don't add -Werror to SRC_HC_OPTS_STAGE0 (or SRC_HC_OPTS), because otherwise
-# validate may unnecessarily fail when booting with an older compiler.
-# It would be better to only exclude certain warnings from becoming errors
-# (e.g. '-Werror -Wno-error=unused-imports -Wno-error=...'), but -Wno-error
-# isn't supported yet (https://gitlab.haskell.org/ghc/ghc/wikis/design/warnings).
-#
-# See Note [Stage number in build variables] in mk/config.mk.in.
-SRC_HC_OPTS_STAGE1 += $(WERROR)
-SRC_HC_OPTS_STAGE2 += $(WERROR)
-
-# Enable -Wcpp-undef for GHC components only, as we don't (currently) expect
-# core libraries to build in this configuration (see #13636).
-GhcRtsHcOpts += -Wcpp-undef
-GhcStage1HcOpts += -Wcpp-undef
-GhcStage2HcOpts += -Wcpp-undef -Wincomplete-uni-patterns -Wincomplete-record-updates
-
-ifneq "$(CcLlvmBackend)" "YES"
-
-# Debian doesn't turn -Werror=unused-but-set-variable on by default, so
-# we turn it on explicitly for consistency with other users
-# Never set the flag on Windows as the host gcc may be too old.
-ifneq "$(HostOS_CPP)" "mingw32"
-SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable
-endif
-
-# Suppress the warning about __sync_fetch_and_nand (#9678).
-libraries/ghc-prim/cbits/atomic_CC_OPTS += -Wno-sync-nand
-# gcc 4.6 gives 3 warnings for giveCapabilityToTask not being inlined
-# gcc 4.4 gives 2 warnings for lockClosure not being inlined
-SRC_CC_WARNING_OPTS += -Wno-error=inline
-
-else
-
-# Don't warn about unknown GCC pragmas when using clang
-SRC_CC_WARNING_OPTS += -Wno-unknown-pragmas
-
-endif
-
-SRC_HC_WARNING_OPTS_STAGE1 += -Wnoncanonical-monad-instances
-SRC_HC_WARNING_OPTS_STAGE2 += -Wnoncanonical-monad-instances
-
-
-######################################################################
-# Disable some warnings in packages we use
-
-# NB: The GHC version used for bootstrapping may not support the
-# `-W`-aliases for `-f(no-)warn` flags introduced in GHC 8.0, so in
-# some cases (watch out for make-variables with a name containing
-# "boot") we need to pass the legacy `-f(no-)warn`-flags instead.
-
-# Libraries that have dubious RULES
-libraries/bytestring_dist-install_EXTRA_HC_OPTS += -Wno-inline-rule-shadowing
-
-# Turn off import warnings for bad unused imports
-utils/haddock_dist_EXTRA_HC_OPTS += -Wno-unused-imports
-libraries/vector_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-libraries/directory_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-
-# haddock's attoparsec uses deprecated `inlinePerformIO`
-utils/haddock_dist_EXTRA_HC_OPTS += -Wno-deprecations
-# binary too
-libraries/binary_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
-
-# On Windows, there are/were some unused import warnings
-ifeq "$(HostOS_CPP)" "mingw32"
-libraries/time_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports -Wno-identities
-endif
-
-# On Windows, the pattern for CallConv is already exhaustive. Ignore the warning
-ifeq "$(HostOS_CPP)" "mingw32"
-libraries/ghci_dist-install_EXTRA_HC_OPTS += -Wno-overlapping-patterns
-endif
-
-# haskeline has warnings about deprecated use of block/unblock
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-simplifiable-class-constraints
-
-
-# temporarily turn off unused-imports warnings for pretty
-libraries/pretty_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-
-# primitive has a warning about deprecated use of GHC.IOBase
-libraries/primitive_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-# primitive uses deprecated Control.Monad.Trans.Error
-libraries/primitive_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
-
-# See https://github.com/haskell/random/pull/20
-libraries/random_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
-
-# temporarily turn off unused-imports warnings for terminfo
-libraries/terminfo_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-imports
-libraries/terminfo_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-
-# vector has some unused match warnings
-libraries/vector_dist-install_EXTRA_HC_OPTS += -Wwarn
-
-# temporarily turn off unused-imports warnings for xhtml
-libraries/xhtml_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-libraries/xhtml_dist-install_EXTRA_HC_OPTS += -Wno-tabs
-
-libraries/dph/dph-base_dist-install_EXTRA_HC_OPTS += -Wwarn
-libraries/dph/dph-prim-interface_dist-install_EXTRA_HC_OPTS += -Wwarn
-libraries/dph/dph-prim-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
-libraries/dph/dph-prim-par_dist-install_EXTRA_HC_OPTS += -Wwarn
-libraries/dph/dph-lifted-common-install_EXTRA_HC_OPTS += -Wwarn
-
-# transformers has unused function parameters warnings
-libraries/transformers_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-matches -fno-warn-unused-imports
-libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-unused-matches -Wno-unused-imports
-libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
-libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-orphans
-
-# parsec has various warnings
-libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-name-shadowing -Wno-unused-matches
-libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-unused-do-bind -Wno-missing-signatures
-libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports -Wno-type-defaults
-
-# text warns with integer-simple
-libraries/text_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
-
-# Turn of trustworthy-safe warning
-libraries/base_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
-libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
-libraries/Win32_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
-
-# We need -Wno-deprecated-flags to avoid failure with -Werror
-GhcLibExtraHcOpts += -Wno-deprecated-flags
-GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags
-
-# Note [Order of warning flags]
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# In distdir-way-opts, build flags are added in the following order (this
-# list is not exhaustive):
-#
-# * SRC_HC_OPTS(_STAGE$4)
-# * ghc-options from .cabal files ($1_$2_HC_OPTS)
-# * SRC_HC_WARNING_OPTS(_STAGE$4)
-#
-# Considerations:
-#
-# * Most .cabal files specify -Wall. But not all, and not all building we
-# do relies on .cabal files. So we have to add -Wall ourselves somewhere.
-#
-# * Some .cabal also specify warning suppression flags. Because -Wall
-# overrides any warning suppression flags that come before it, we have to
-# make sure -Wall comes before any warning suppression flags. So we add it
-# to SRC_HC_OPTS.
-#
-# * Similarly, our own warning suppression should come after the -Wall from
-# the .cabal files, so we do *not* add them to SRC_HC_OPTS.
diff --git a/mk/ways.mk b/mk/ways.mk
deleted file mode 100644
index 53f900f80e..0000000000
--- a/mk/ways.mk
+++ /dev/null
@@ -1,105 +0,0 @@
-#
-# Options for compiling in different `ways'.
-#
-# To configure up your own way, have a look at some of the standard ways
-# such as profiling, and create your own set of WAY_*_OPTS defs below.
-# After having done that, add your way string to WAYS, and after having
-# run the configure script, the different projects will add the new way
-# to the list of ways they support.
-#
-
-#
-# Definitions of the different ways:
-#
-# * their name:
-# - tag, e.g., p
-# - description, e.g., profiling
-# * what they mean to the driver:
-# - WAY_p_HC_OPTS gives the list of command-line options
-# to the driver.
-#
-# For consistency, the way name should be formed from the tags in the following
-# order (the same ordering defined in DynFlags.Way),
-#
-# - thr: threaded
-# - debug: debugging
-# - p: profiled
-# - dyn: dynamically-linked
-
-#
-# The ways currently defined.
-#
-ALL_WAYS=v debug dyn thr p_dyn p debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_debug debug_p thr_debug_p thr_p
-
-#
-# The following ways currently are treated specially,
-# as the driver script treats these guys specially and needs to carefully be told
-# about the options for these. Hence, we hide the required command line options
-# for these in the driver, as this is the only place they are needed.
-#
-# If you want to add to these default options, fill in the variables below:
-
-# Way 'v':
-WAY_v_NAME=vanilla
-WAY_v_HC_OPTS= -static
-
-# Way 'p':
-WAY_p_NAME=profiling
-WAY_p_HC_OPTS= -static -prof
-
-#
-# These ways apply to the RTS only:
-#
-
-# Way 'thr':
-WAY_thr_NAME=threaded
-WAY_thr_HC_OPTS= -static -optc-DTHREADED_RTS
-
-# Way 'thr_p':
-WAY_thr_p_NAME=threaded profiling
-WAY_thr_p_HC_OPTS= -static -prof -optc-DTHREADED_RTS
-
-# Way 'debug':
-WAY_debug_NAME=debug
-WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY
-
-# Way 'debug_p':
-WAY_debug_p_NAME=debug profiled
-WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof
-
-# Way 'p':
-WAY_p_NAME=profiling
-WAY_p_HC_OPTS= -static -prof
-
-# Way 'thr_debug':
-WAY_thr_debug_NAME=threaded debug
-WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG
-
-# Way 'thr_debug_p':
-WAY_thr_debug_p_NAME=threaded debug profiling
-WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof
-
-# Way 'dyn': build dynamic shared libraries
-WAY_dyn_NAME=dyn
-WAY_dyn_HC_OPTS=-fPIC -dynamic
-
-# Way 'p_dyn':
-WAY_p_dyn_NAME=p_dyn
-WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof
-
-# Way 'thr_p_dyn':
-WAY_thr_p_dyn_NAME=thr_p_dyn
-WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -optc-DTHREADED_RTS
-
-# Way 'thr_dyn':
-WAY_thr_dyn_NAME=thr_dyn
-WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
-
-# Way 'thr_debug_dyn':
-WAY_thr_debug_dyn_NAME=thr_debug_dyn
-WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
-
-# Way 'debug_dyn':
-WAY_debug_dyn_NAME=debug_dyn
-WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY
-