Fix Trac #3219: type of a record update
[ghc-hetmet.git] / Makefile
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 ifeq "$(wildcard distrib/)" ""
14
15 # We're in a bindist
16
17 .PHONY: default
18 default:
19         @echo 'Run "make install" to install'
20         @false
21
22 .PHONY: install
23 install:
24         $(MAKE) -r --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES
25
26 .PHONY: show
27 show:
28         $(MAKE) -r --no-print-directory -f ghc.mk $@
29
30 else
31
32 default : all
33         @:
34
35 include mk/config.mk
36
37 ifeq "$(ProjectVersion)" ""
38 $(error Please run ./configure first)
39 endif
40
41 include mk/custom-settings.mk
42
43 # No need to update makefiles for these targets:
44 REALGOALS=$(filter-out framework-pkg clean clean_% distclean maintainer-clean show,$(MAKECMDGOALS))
45
46 # NB. not the same as saying '%: ...', which doesn't do the right thing:
47 # it does nothing if we specify a target that already exists.
48 .PHONY: $(REALGOALS)
49 $(REALGOALS) all:
50         @echo "===--- updating makefiles phase 0"
51         $(MAKE) -r --no-print-directory -f ghc.mk phase=0 just-makefiles
52         @echo "===--- updating makefiles phase 1"
53         $(MAKE) -r --no-print-directory -f ghc.mk phase=1 just-makefiles
54         @echo "===--- updating makefiles phase 2"
55         $(MAKE) -r --no-print-directory -f ghc.mk phase=2 just-makefiles
56         @echo "===--- updating makefiles phase 3"
57         $(MAKE) -r --no-print-directory -f ghc.mk phase=3 just-makefiles
58         @echo "===--- finished updating makefiles"
59         $(MAKE) -r --no-print-directory -f ghc.mk $@
60
61 binary-dist:
62         rm -f bindist-list
63         $(MAKE) -r --no-print-directory -f ghc.mk bindist BINDIST=YES
64         $(MAKE) -r --no-print-directory -f ghc.mk binary-dist
65
66 clean distclean maintainer-clean:
67         $(MAKE) -r --no-print-directory -f ghc.mk $@
68         test ! -d testsuite || $(MAKE) -C testsuite $@
69
70 $(filter clean_%, $(MAKECMDGOALS)) : clean_% :
71         $(MAKE) -r --no-print-directory -f ghc.mk $@
72
73 show:
74         $(MAKE) -r --no-print-directory -f ghc.mk $@
75
76 ifeq "$(darwin_TARGET_OS)" "1"
77 framework-pkg:
78         $(MAKE) -C distrib/MacOS $@
79 endif
80
81 # If the user says 'make A B', then we don't want to invoke two
82 # instances of the rule above in parallel:
83 .NOTPARALLEL:
84
85 endif
86