Makefile 2.25 KB
Newer Older
1

2
include Makefile-vars
sof's avatar
sof committed
3

4
.PHONY: install-strip install postinstall denounce show-install-setup
5

6
#.PHONY: in-place
7
8
9
10
11
12
13
14
15
# This has bitrotted:
#in-place ::
#	@if test -x "./post-inplace-script" ; then \
#		echo "Running project-specific post-inplace script ..." ; \
#		./post-inplace-script $(platform) `pwd` \
#			$(package)-$(version); \
#		echo "Done" ; \
#	fi
#	@echo "Finished configuring..to use, add `pwd`/bin/$(platform) to your PATH."
16

17
18
19
install-strip:
	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install

20
install ::
sof's avatar
sof committed
21
	$(INSTALL_DIR) $(bindir)
22

23
install::
24
25
26
27
	$(MAKE) -C includes  install      DOING_BIN_DIST=YES
	$(MAKE) -C utils     install      DOING_BIN_DIST=YES
	$(MAKE) -C rts       install      DOING_BIN_DIST=YES
	$(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
Ian Lynagh's avatar
Ian Lynagh committed
30
	$(MAKE) -C ghc       install      DOING_BIN_DIST=YES
Ian Lynagh's avatar
Ian Lynagh committed
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
40
41
42
# Look to see if $(bindir) is in $(PATH). Assumes there are no funky
# characters.
GREPPED_PATH=$(shell echo "$(PATH)" | grep "\(^\|:\)$(bindir)\(:\|$$\)")

43
44
denounce:
	@echo
45
46
	@echo =======================================================================
	@echo Installation of $(package)-$(version) was successful.
47
	@echo
48
ifeq "$(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
55
56
	else \
	   echo "Warning: this binary distribution does NOT contain documentation!" ; \
	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
64
		echo "Done" ; \
	fi
65

sof's avatar
sof committed
66
67
68
show-install-setup:
	@echo "Install setup..."
	@echo "bindir  = $(bindir)"
69
70
	@echo "libdir  = $(libdir) (libdir  = $(libdir))"
	@echo "datadir = $(datadir) (datadir = $(datadir))"
71