wibble the distrib Makefile
[ghc.git] / distrib / Makefile
1
2 include Makefile-vars
3
4 .PHONY: install-strip install postinstall denounce show-install-setup
5
6 #.PHONY: in-place
7 # This has bitrotted:
8 #in-place ::
9 # @if test -x "./post-inplace-script" ; then \
10 # echo "Running project-specific post-inplace script ..." ; \
11 # ./post-inplace-script $(platform) `pwd` \
12 # $(package)-$(version); \
13 # echo "Done" ; \
14 # fi
15 # @echo "Finished configuring..to use, add `pwd`/bin/$(platform) to your PATH."
16
17 install-strip:
18 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
19
20 install ::
21 $(INSTALL_DIR) $(bindir)
22
23 install::
24 $(MAKE) -C includes install DOING_BIN_DIST=YES
25 $(MAKE) -C utils install DOING_BIN_DIST=YES
26 $(MAKE) -C rts install DOING_BIN_DIST=YES
27 $(MAKE) -C libraries install DOING_BIN_DIST=YES
28 $(MAKE) -C compiler install DOING_BIN_DIST=YES
29 $(MAKE) -C ghc install DOING_BIN_DIST=YES
30 $(MAKE) -C driver install DOING_BIN_DIST=YES
31 $(MAKE) -C gmp install DOING_BIN_DIST=YES
32 $(MAKE) -C docs install-docs DOING_BIN_DIST=YES
33 $(MAKE) -C libraries/Cabal/doc install-docs DOING_BIN_DIST=YES
34 $(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
35
36 install :: postinstall denounce
37
38 # Look to see if $(bindir) is in $(PATH). Assumes there are no funky
39 # characters.
40 GREPPED_PATH=$(shell echo "$(PATH)" | grep "\(^\|:\)$(bindir)\(:\|$$\)")
41
42 denounce:
43 @echo
44 @echo =======================================================================
45 @echo Installation of $(package)-$(version) was successful.
46 @echo
47 ifneq "$(GREPPED_PATH)" ""
48 @echo To use, add $(bindir) to your PATH.
49 @echo
50 endif
51 @if test -f $(htmldir)/index.html; then \
52 echo For documentation, see $(htmldir)/index.html ; \
53 else \
54 echo "Warning: this binary distribution does NOT contain documentation!" ; \
55 fi
56 @echo =======================================================================
57
58 postinstall:
59 @if test -x "./post-install-script" ; then \
60 echo "Running project-specific post-install script ..." ; \
61 ./post-install-script $(platform) $(libdir) ; \
62 echo "Done" ; \
63 fi
64
65 show-install-setup:
66 @echo "Install setup..."
67 @echo "bindir = $(bindir)"
68 @echo "libdir = $(libdir) (libdir = $(libdir))"
69 @echo "datadir = $(datadir) (datadir = $(datadir))"
70