a91557e6ee7bd98e0e00ff82fe9ab144191685b1
[ghc-hetmet.git] / distrib / Makefile
1
2 include Makefile-vars
3
4 .PHONY: 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 ::
18         $(INSTALL_DIR) $(bindir)
19
20 install::
21         $(MAKE) -C includes  install      DOING_BIN_DIST=YES
22         $(MAKE) -C driver    install      DOING_BIN_DIST=YES
23         $(MAKE) -C utils     install      DOING_BIN_DIST=YES
24         $(MAKE) -C rts       install      DOING_BIN_DIST=YES
25         $(MAKE) -C libraries install      DOING_BIN_DIST=YES
26         $(MAKE) -C compiler  install      DOING_BIN_DIST=YES
27         $(MAKE) -C gmp       install      DOING_BIN_DIST=YES
28         $(MAKE) -C docs      install-docs DOING_BIN_DIST=YES
29         $(MAKE) -C libraries/Cabal/doc install-docs DOING_BIN_DIST=YES
30         $(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
31
32 install :: postinstall denounce
33
34 denounce:
35         @echo
36         @echo =======================================================================
37         @echo Installation of $(package)-$(version) was successful.
38         @echo
39         @echo To use, add $(bindir) to your PATH.
40         @echo
41         @if test -f share/html/index.html; then \
42            echo For documentation, see $(htmldir)/index.html ; \
43         elif test -d share/html ; then \
44            echo Docs can be found in $(htmldir). ; \
45         else \
46            echo "Warning: this binary distribution does NOT contain documentation!" ; \
47         fi
48         @echo =======================================================================
49
50 postinstall:
51         @if test -x "./post-install-script" ; then \
52                 echo "Running project-specific post-install script ..." ; \
53                 ./post-install-script $(platform) $(libdir) ; \
54                 echo "Done" ; \
55         fi
56
57 show-install-setup:
58         @echo "Install setup..."
59         @echo "bindir  = $(bindir)"
60         @echo "libdir  = $(libdir) (libdir  = $(libdir))"
61         @echo "datadir = $(datadir) (datadir = $(datadir))"
62