Remove GHC_TOP; we don't actually use it
[ghc-hetmet.git] / mk / boilerplate.mk
1 #################################################################################
2 #
3 #                           mk/boilerplate.mk
4 #
5 #               The Glorious GHC Boilerplate Makefile
6 #
7 # This one file should be included (directly or indirectly) by all Makefiles 
8 # in the GHC hierarchy.
9 #
10 #################################################################################
11
12 # We want to disable all the built-in rules that make uses; having them
13 # just slows things down, and we write all the rules ourselves.
14 # Setting .SUFFIXES to empty disables them all.
15 MAKEFLAGS += --no-builtin-rules
16
17 # $(FPTOOLS_TOP) is the old name for $(TOP), kept for backwards compat
18 FPTOOLS_TOP := $(TOP)
19
20
21 # This rule makes sure that "all" is the default target, regardless of where it appears
22 #               THIS RULE MUST REMAIN FIRST!
23 default: all
24
25 # -----------------------------------------------------------------------------
26 # Misc bits
27
28 # If $(way) is set then we define $(way_) and $(_way) from it in the
29 # obvious fashion.  This must be done before suffix.mk is included,
30 # because the pattern rules in that file depend on these variables.
31
32 ifneq "$(way)" ""
33   way_ := $(way)_
34   _way := _$(way)
35 endif
36
37
38 # When using $(patsubst ...) and friends, you can't use a literal comma
39 # freely - so we use ${comma} instead.  (See PACKAGE_CPP_OPTS in package.mk
40 # for an example usage.)
41 comma=,
42
43 # -----------------------------------------------------------------------------
44 #       Now follow the pieces of boilerplate
45 #       The "-" signs tell make not to complain if they don't exist
46
47 include $(TOP)/mk/config.mk
48 # All configuration information
49 #       (generated by "configure" from config.mk.in)
50 #
51
52
53 include $(TOP)/mk/paths.mk
54 # Variables that say where things belong (e.g install directories)
55 # and where we are right now
56 # Also defines variables for standard files (SRCS, LIBS etc)
57
58
59 include $(TOP)/mk/opts.mk
60 # Variables that control the option flags for all the
61 # language processors
62
63 ifeq "$(BootingFromHc)" "YES"
64 include $(TOP)/mk/bootstrap.mk
65 endif
66
67 # (Optional) build-specific configuration
68 include $(TOP)/mk/custom-settings.mk
69
70 ifndef FAST
71 -include .depend
72 endif
73 # The dependencies file from the current directory