Makefile 2.29 KB
Newer Older
1

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

4
.PHONY: in-place mk-version-symlinks install
5

6
7
8
9
10
11
12
13
14
# 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."
15

16
install ::
sof's avatar
sof committed
17
	$(INSTALL_DIR) $(bindir)
Ian Lynagh's avatar
Ian Lynagh committed
18
19
	(cd lib/$(platform); find . -type d -exec sh -c '$(INSTALL_DIR) $$0 $(libdir)/$$0' {} \; )
	(cd share; find . -type d -exec sh -c '$(INSTALL_DIR) $(datadir)/$$0' {} \; )
20

21
22
23
24
25
26
27
install::
	$(MAKE) -C includes  install DOING_BIN_DIST=YES
	$(MAKE) -C driver    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
	$(MAKE) -C compiler  install DOING_BIN_DIST=YES
28
	$(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
29
30

install :: install-docs postinstall denounce
31

32
.PHONY: postinstall denounce
33
34
35

denounce:
	@echo
36
37
	@echo =======================================================================
	@echo Installation of $(package)-$(version) was successful.
38
	@echo
39
	@echo To use, add $(bindir) to your PATH.
40
41
42
43
	@echo
	@if test -f share/html/index.html; then \
	   echo For documentation, see $(htmldir)/index.html ; \
	elif test -d share/html ; then \
44
	   echo Docs can be found in $(htmldir). ; \
45
46
47
	else \
	   echo "Warning: this binary distribution does NOT contain documentation!" ; \
	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
55
		echo "Done" ; \
	fi
56

sof's avatar
sof committed
57
58
59
show-install-setup:
	@echo "Install setup..."
	@echo "bindir  = $(bindir)"
60
61
	@echo "libdir  = $(libdir) (libdir  = $(libdir))"
	@echo "datadir = $(datadir) (datadir = $(datadir))"
62

sof's avatar
sof committed
63
#
64
# Documentation targets: install-docs.
sof's avatar
sof committed
65
#
66

67
.PHONY: show-install-setup install-docs install-dirs-docs
68

69
install-docs : install-dirs-docs
70
	if test -d share/html ; then $(CP) -r share/html/* $(htmldir) ; fi
Ian Lynagh's avatar
Ian Lynagh committed
71
	set -e; for i in share/*.ps; do \
72
73
74
		if test -f "$$i"; then \
		      $(CP) $$i $(psdir) ; \
		fi \
75
	done
sof's avatar
sof committed
76

77
install-dirs-docs:
sof's avatar
sof committed
78
79
	$(INSTALL_DIR) $(htmldir)