1 #################################################################################
5 # The Glorious GHC Boilerplate Makefile
7 # This one file should be included (directly or indirectly) by all Makefiles
8 # in the GHC hierarchy.
10 #################################################################################
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
17 # $(FPTOOLS_TOP) is the old name for $(TOP), kept for backwards compat
21 # This rule makes sure that "all" is the default target, regardless of where it appears
22 # THIS RULE MUST REMAIN FIRST!
25 #------------------------------------------------------------
27 # to see the effective value used for a Makefile variable, do
28 # make show VALUE=MY_VALUE
32 @echo '$(VALUE)="$($(VALUE))"'
34 # -----------------------------------------------------------------------------
37 # If $(way) is set then we define $(way_) and $(_way) from it in the
38 # obvious fashion. This must be done before suffix.mk is included,
39 # because the pattern rules in that file depend on these variables.
47 # When using $(patsubst ...) and friends, you can't use a literal comma
48 # freely - so we use ${comma} instead. (See PACKAGE_CPP_OPTS in package.mk
49 # for an example usage.)
52 # -----------------------------------------------------------------------------
53 # Now follow the pieces of boilerplate
54 # The "-" signs tell make not to complain if they don't exist
56 include $(TOP)/mk/config.mk
57 # All configuration information
58 # (generated by "configure" from config.mk.in)
62 include $(TOP)/mk/paths.mk
63 # Variables that say where things belong (e.g install directories)
64 # and where we are right now
65 # Also defines variables for standard files (SRCS, LIBS etc)
68 include $(TOP)/mk/opts.mk
69 # Variables that control the option flags for all the
72 ifeq "$(BootingFromHc)" "YES"
73 include $(TOP)/mk/bootstrap.mk
76 # (Optional) build-specific configuration
77 include $(TOP)/mk/custom-settings.mk
82 # The dependencies file from the current directory