Fix bindist creation
[ghc.git] / distrib / Makefile
1
2 include Makefile-vars
3
4 .PHONY: in-place mk-version-symlinks install-dirs install
5
6 in-place ::
7 @if test -x "./post-inplace-script" ; then \
8 echo "Running project-specific post-inplace script ..." ; \
9 ./post-inplace-script $(platform) `pwd` \
10 $(package)-$(version); \
11 echo "Done" ; \
12 fi
13 @echo "Finished configuring..to use, add `pwd`/bin/$(platform) to your PATH."
14
15 install-dirs ::
16 $(INSTALL_DIR) $(bindir)
17 (cd lib/$(platform); find . -type d -exec sh -c '$(INSTALL_DIR) $$0 $(libdir)/$$0' {} \; )
18 (cd share; find . -type d -exec sh -c '$(INSTALL_DIR) $(datadir)/$$0' {} \; )
19
20 install :: install-dirs install-driver install-utils install-libs install-datas install-docs postinstall denounce
21
22 .PHONY: install-libs install-utils install-datas postinstall denounce
23
24 denounce:
25 @echo
26 @echo =======================================================================
27 @echo Installation of $(package)-$(version) was successful.
28 @echo
29 @echo To use, add $(bindir) to your PATH.
30 @echo
31 @if test -f share/html/index.html; then \
32 echo For documentation, see $(htmldir)/index.html ; \
33 elif test -d share/html ; then \
34 echo Docs can be found in $(htmldir). ; \
35 else \
36 echo "Warning: this binary distribution does NOT contain documentation!" ; \
37 fi
38 @echo =======================================================================
39
40 postinstall:
41 @if test -x "./post-install-script" ; then \
42 echo "Running project-specific post-install script ..." ; \
43 ./post-install-script $(platform) $(libdir) ; \
44 echo "Done" ; \
45 fi
46
47 install-libs:
48 (cd lib/$(platform); find . -type f -exec sh -c '$(CP) $$0 $(libdir)/$$0' {} \; )
49 $(MAKE) -C libraries install DOING_BIN_DIST=YES
50
51 install-driver:
52 $(MAKE) -C driver install DOING_BIN_DIST=YES
53
54 install-utils:
55 $(MAKE) -C utils install DOING_BIN_DIST=YES
56
57 install-datas:
58 set -e; for i in `(cd share; find . -type f )`; do \
59 $(INSTALL_DATA) share/$$i $(datadir)/$$i; \
60 done
61
62 show-install-setup:
63 @echo "Install setup..."
64 @echo "bindir = $(bindir)"
65 @echo "libdir = $(libdir) (libdir = $(libdir))"
66 @echo "datadir = $(datadir) (datadir = $(datadir))"
67
68 #
69 # Documentation targets: install-docs.
70 #
71
72 .PHONY: show-install-setup install-docs install-dirs-docs
73
74 install-docs : install-dirs-docs
75 if test -d share/html ; then $(CP) -r share/html/* $(htmldir) ; fi
76 set -e; for i in share/*.ps; do \
77 if test -f "$$i"; then \
78 $(CP) $$i $(psdir) ; \
79 fi \
80 done
81
82 install-dirs-docs:
83 $(INSTALL_DIR) $(htmldir)
84