No relative inclusion of HsVersions.h
[ghc.git] / distrib / Makefile
1 MAKEFLAGS += --no-builtin-rules
2 .SUFFIXES:
3
4 ProjectVersion:=$(shell bin/ghc --numeric-version)
5
6 include mk/install.mk
7
8 define GHC_WRAPPER
9 #!/bin/sh
10 exec "$(libdir)/bin/ghc" -B"$(libdir)" $${1+"$$@"}
11 endef
12
13 export GHC_WRAPPER
14
15 .PHONY: default
16 default:
17 @echo 'Run "make install" to install'
18 @false
19
20 .PHONY: install
21 install:
22 @cp settings lib/
23 @echo $(prefix) $(bindir) $(libdir)
24 @mkdir -p $(prefix) $(libdir) $(bindir)
25 @cp -R lib/* $(libdir)/
26 # cp the rest to $(prefix) ? or maybe handle $(datadir) etc too?
27 @if [ "$(bindir)" = "$(prefix)/bin" ] || [ "$(libdir)" != "$(prefix)/lib" ]; then \
28 echo "custom bindir or libdir"; \
29 mkdir -p $(libdir)/bin; \
30 cp bin/* $(libdir)/bin/; \
31 echo "$$GHC_WRAPPER" > $(bindir)/ghc; \
32 fi
33 @echo "ghc available at $(bindir)/ghc"
34 @echo done