remove commentary that is now in the wiki
[ghc-hetmet.git] / Makefile
1
2 ifeq "$(wildcard distrib/)" ""
3
4 # We're in a bindist
5
6 .PHONY: default
7 default:
8         @echo 'Run "make install" to install'
9         @false
10
11 .PHONY: install
12 install:
13         $(MAKE) -r --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES
14
15 .PHONY: show
16 show:
17         $(MAKE) -r --no-print-directory -f ghc.mk $@
18
19 else
20
21 default : all
22         @:
23
24 # No need to update makefiles for these targets:
25 REALGOALS=$(filter-out clean clean_% distclean maintainer-clean show,$(MAKECMDGOALS))
26
27 # NB. not the same as saying '%: ...', which doesn't do the right thing:
28 # it does nothing if we specify a target that already exists.
29 .PHONY: $(REALGOALS)
30 $(REALGOALS) all:
31         @echo "===--- updating makefiles phase 0"
32         $(MAKE) -r --no-print-directory -f ghc.mk phase=0 just-makefiles
33         @echo "===--- updating makefiles phase 1"
34         $(MAKE) -r --no-print-directory -f ghc.mk phase=1 just-makefiles
35         @echo "===--- updating makefiles phase 2"
36         $(MAKE) -r --no-print-directory -f ghc.mk phase=2 just-makefiles
37         @echo "===--- updating makefiles phase 3"
38         $(MAKE) -r --no-print-directory -f ghc.mk phase=3 just-makefiles
39         @echo "===--- finished updating makefiles"
40         $(MAKE) -r --no-print-directory -f ghc.mk $@
41
42 binary-dist:
43         rm -f bindist-list
44         $(MAKE) -r --no-print-directory -f ghc.mk bindist BINDIST=YES
45         $(MAKE) -r --no-print-directory -f ghc.mk binary-dist
46
47 clean distclean maintainer-clean:
48         $(MAKE) -r --no-print-directory -f ghc.mk $@
49         test ! -d testsuite || $(MAKE) -C testsuite $@
50
51 $(filter clean_%, $(MAKECMDGOALS)) : clean_% :
52         $(MAKE) -r --no-print-directory -f ghc.mk $@
53
54 show:
55         $(MAKE) -r --no-print-directory -f ghc.mk $@
56
57 # If the user says 'make A B', then we don't want to invoke two
58 # instances of the rule above in parallel:
59 .NOTPARALLEL:
60
61 endif
62