summaryrefslogtreecommitdiff
path: root/distrib/Makefile-bin-vars.in
blob: cb69ac675eac115158c576a10f5c1642475d3471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

# Where we are
bindist_abs_root = @hardtop@
FPTOOLS_TOP_ABS  = @hardtop@

# This Makefile isn't used on Windows, so we always have ghc-pkg.bin
# rather than ghc-pkg.exe.
GHC_PKG_PROG = $(FPTOOLS_TOP_ABS)/utils/ghc-pkg/ghc-pkg.bin

# Where the different pieces of the bundle should go:
bindir      = @bindir@
libdir      = @libdir@/$(package)-$(version)
libexecdir  = $(libdir)
datarootdir = @datarootdir@
# datadir is set to libdir here as GHC needs package.conf and unlit
# to be in the same place (and things like ghc-pkg need to agree on
# where package.conf is, so we just set it globally).
datadir     = $(libdir)

platform    = @TargetPlatform@
prefix      = @prefix@
exec_prefix = @exec_prefix@

mandir      = $(datarootdir)/man

headerdir   = $(libdir)/include

# default
docdir      = @datadir@/doc/ghc
htmldir     = $(docdir)
psdir       = $(docdir)
pdfdir      = $(docdir)


PERL        = @PerlCmd@
SH	    = /bin/sh
RM          = rm -f
MV          = mv
CP          = cp
LN_S        = @LN_S@
CHMOD       = chmod
INSTALL	    = @INSTALL@
#
# Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
# install-sh script (if chosen). This not terribly useful to us, so we convert
# it into an abs. path.
# 
INSTALL			:= $(subst ./install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))

exeext      = @exeext@
SED	        = @SedCmd@
DEFAULT_TMPDIR = /tmp
RANLIB      = @RANLIB@
CPP         = @CPP@

RAWCPP_FLAGS            = -undef -traditional

#----------end of user-serviceable parts------------
#
#
# How to install the different pieces
# 
INSTALL_DIR     = $(bindist_abs_root)/utils/mkdirhier/mkdirhier
INSTALL_BIN     = $(INSTALL) $(INSTALL_BIN_OPTS)
INSTALL_LIB     = $(INSTALL) $(INSTALL_LIB_OPTS)
INSTALL_DATA    = $(INSTALL) $(INSTALL_DATA_OPTS)
INSTALL_SCRIPT  = $(INSTALL) $(INSTALL_SCRIPT_OPTS)
INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_OPTS)
INSTALL_HEADER  = $(INSTALL) $(INSTALL_HEADER_OPTS)
INSTALL_SHLIB   = $(INSTALL) $(INSTALL_SHLIB_OPTS)
INSTALL_MAN     = $(INSTALL) $(INSTALL_MAN_OPTS)

# What's common to all installs
INSTALL_OPTS= $(EXTRA_INSTALL_OPTS)

BIN_PERMS = 755
LIB_PERMS = 644

INSTALL_BIN_OPTS     = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_BIN_OPTS)
INSTALL_LIB_OPTS     = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_LIB_OPTS)
INSTALL_DATA_OPTS    = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_DATA_OPTS)
INSTALL_SCRIPT_OPTS  = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_SCRIPT_OPTS)
INSTALL_PROGRAM_OPTS = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_PROGRAM_OPTS)
INSTALL_HEADER_OPTS  = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_HEADER_OPTS)
INSTALL_SHLIB_OPTS   = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_SHLIB_OPTS)
INSTALL_MAN_OPTS     = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_MAN_OPTS)

EXECUTABLE_FILE = chmod $(BIN_PERMS)

GHC_COMPAT_DIR=$(TOP)/mk