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