Replace uses of the old catch function with the new one
[ghc-hetmet.git] / mk / tree.mk
1
2 ifneq "$(findstring 3.7, $(MAKE_VERSION))" ""
3 ifeq "$(findstring 3.79.1, $(MAKE_VERSION))" ""
4 $(error GNU make version 3.79.1 or later is required.)
5 endif
6 endif
7
8 ################################################################################
9 #
10 #       Layout of the source tree
11 #
12 ################################################################################
13
14 # Here we provide defines for the various directories in the source tree,
15 # so we can move things around more easily.  A define $(GHC_FOO_DIR)
16 # indicates a directory relative to the top of the source tree.
17
18 GHC_UTILS_DIR           = utils
19 GHC_INCLUDE_DIR         = includes
20 GHC_COMPILER_DIR        = compiler
21 GHC_PROG_DIR            = ghc
22 GHC_RTS_DIR             = rts
23 GHC_DRIVER_DIR          = driver
24 GHC_COMPAT_DIR          = compat
25
26 GHC_LTX_DIR             = $(GHC_UTILS_DIR)/ltx
27 GHC_LNDIR_DIR           = $(GHC_UTILS_DIR)/lndir
28 GHC_MKDIRHIER_DIR       = $(GHC_UTILS_DIR)/mkdirhier
29 GHC_DOCBOOK_DIR         = $(GHC_UTILS_DIR)/docbook
30 GHC_UNLIT_DIR           = $(GHC_UTILS_DIR)/unlit
31 GHC_HP2PS_DIR           = $(GHC_UTILS_DIR)/hp2ps
32 GHC_GHCTAGS_DIR         = $(GHC_UTILS_DIR)/ghctags
33 GHC_HSC2HS_DIR          = $(GHC_UTILS_DIR)/hsc2hs
34 GHC_TOUCHY_DIR          = $(GHC_UTILS_DIR)/touchy
35 GHC_PKG_DIR             = $(GHC_UTILS_DIR)/ghc-pkg
36 GHC_GENPRIMOP_DIR       = $(GHC_UTILS_DIR)/genprimopcode
37 GHC_GENAPPLY_DIR        = $(GHC_UTILS_DIR)/genapply
38 GHC_CABAL_DIR           = $(GHC_UTILS_DIR)/ghc-cabal
39 GHC_MANGLER_DIR         = $(GHC_DRIVER_DIR)/mangler
40 GHC_SPLIT_DIR           = $(GHC_DRIVER_DIR)/split
41 GHC_SYSMAN_DIR          = $(GHC_RTS_DIR)/parallel
42
43 INPLACE                 = inplace
44 INPLACE_BIN             = $(INPLACE)/bin
45 INPLACE_LIB             = $(INPLACE)/lib
46 INPLACE_TOPDIR          = $(INPLACE)/lib
47 INPLACE_MINGW           = $(INPLACE)/mingw
48 INPLACE_PERL            = $(INPLACE)/perl
49
50 ################################################################################
51 #
52 #    Bindist testing directory
53 #
54 ################################################################################
55
56 BIN_DIST_INST_SUBDIR = "install dir"
57 BIN_DIST_INST_DIR = bindisttest/$(BIN_DIST_INST_SUBDIR)
58
59 ################################################################################
60 #
61 #    rm
62 #
63 ################################################################################
64
65 # These are here, rather than in config.mk, as they need to exist in an
66 # unconfigured tree so that the various clean targets can be used
67 # without configuring:
68 ifeq "$(ONLY_SHOW_CLEANS)" "YES"
69 RM = utils/testremove/wouldrm
70 RM_OPTS = CLEAN_FILES
71 RM_OPTS_REC = CLEAN_REC
72 else
73 RM = rm
74 RM_OPTS = -f
75 RM_OPTS_REC = -rf
76 endif
77