fix warnings
[ghc-hetmet.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 driver    install      DOING_BIN_DIST=YES
26         $(MAKE) -C utils     install      DOING_BIN_DIST=YES
27         $(MAKE) -C rts       install      DOING_BIN_DIST=YES
28         $(MAKE) -C libraries install      DOING_BIN_DIST=YES
29         $(MAKE) -C compiler  install      DOING_BIN_DIST=YES
30         $(MAKE) -C gmp       install      DOING_BIN_DIST=YES
31         $(MAKE) -C docs      install-docs DOING_BIN_DIST=YES
32         $(MAKE) -C libraries/Cabal/doc install-docs DOING_BIN_DIST=YES
33         $(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
34
35 install :: postinstall denounce
36
37 # Look to see if $(bindir) is in $(PATH). Assumes there are no funky
38 # characters.
39 GREPPED_PATH=$(shell echo "$(PATH)" | grep "\(^\|:\)$(bindir)\(:\|$$\)")
40
41 denounce:
42         @echo
43         @echo =======================================================================
44         @echo Installation of $(package)-$(version) was successful.
45         @echo
46 ifneq "$(GREPPED_PATH)" ""
47         @echo To use, add $(bindir) to your PATH.
48         @echo
49 endif
50         @if test -f $(htmldir)/index.html; then \
51            echo For documentation, see $(htmldir)/index.html ; \
52         else \
53            echo "Warning: this binary distribution does NOT contain documentation!" ; \
54         fi
55         @echo =======================================================================
56
57 postinstall:
58         @if test -x "./post-install-script" ; then \
59                 echo "Running project-specific post-install script ..." ; \
60                 ./post-install-script $(platform) $(libdir) ; \
61                 echo "Done" ; \
62         fi
63
64 show-install-setup:
65         @echo "Install setup..."
66         @echo "bindir  = $(bindir)"
67         @echo "libdir  = $(libdir) (libdir  = $(libdir))"
68         @echo "datadir = $(datadir) (datadir = $(datadir))"
69