[project @ 2004-02-12 02:11:33 by mthomas]
[ghc-hetmet.git] / ghc / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.24 2004/02/12 02:11:34 mthomas Exp $
3 #
4
5 TOP=.
6 include $(TOP)/mk/boilerplate.mk
7
8 #
9 # subdir dependencies:
10 #       everything needs utils
11 #       includes/ needs driver (to easily c.pile mkNativeGen.c)
12 #       make depend except in {utils,driver} needs includes     
13 #       RTS and compiler need includes
14 #
15
16 #
17 # Order is important! It's e.g. necessary to descend into include/
18 # before the rest to have a config.h, etc.
19 #
20 # If we're booting from .hc files, swap the order
21 # we descend into subdirs - to boot utils must be before driver.
22 #
23
24 # First - check whether we should build the docs directory.
25 # On Windows, the tools to build docs are not always available.
26
27 ifneq "$(SGMLDocWays)" ""
28 DOCS_DIR = docs
29 else
30 DOCS_DIR =
31 endif
32
33 ifeq "$(BootingFromHc)" "YES"
34 SUBDIRS = includes rts $(DOCS_DIR) compiler utils driver
35 else
36 ifneq "$(ILXized)" "YES"
37 SUBDIRS = includes utils driver $(DOCS_DIR) compiler rts
38 else
39 # No RTS for ILX
40 SUBDIRS = includes utils driver $(DOCS_DIR) compiler
41 endif
42 endif
43
44 ifeq ($(IncludeTestDirsInBuild),YES)
45 SUBDIRS += tests
46 endif
47
48 SRC_DIST_FILES += configure
49
50 DIST_CLEAN_FILES += config.cache config.status ghc.spec
51
52 extraclean::
53         $(RM) -rf autom4te.cache
54
55 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
56 # These files need to be in the InstallShield
57 # INSTALL_DATAS rather than INSTALL_DOCS is used so these files go
58 # in the top-level directory of the distribution
59 INSTALL_DATAS += ANNOUNCE LICENSE README VERSION
60 endif
61
62 include $(TOP)/mk/target.mk