4 ################################################################################
8 # This file sets up the installation directories.
10 # DO NOT EDIT THIS FILE!
12 # - install.mk is auto-generated from install.mk.in by configure.
13 # If you edit install.mk your changes will be spammed.
15 # - Settings in this file may be overriden by giving replacement
16 # definitions in build.mk.
18 # Definition of installation directories, we don't use half of these, but since
19 # the configure script has them on offer while passing through, we might as well
20 # set them. Note that we have to be careful, because the GNU coding standards
21 # have changed a bit over the course of time, and autoconf development reflects
24 # A little bit of history regarding autoconf and GNU coding standards, use this
25 # as a cheat-sheet for the stuff below:
27 # variable | default < 2.60 | default >= 2.60
28 # ------------+--------------------+--------------------------------------
29 # exec_prefix | ${prefix} | ${prefix}
30 # libdir | ${exec_prefix}/lib | ${exec_prefix}/lib
31 # datarootdir | NONE! | ${prefix}/share
32 # datadir | ${prefix}/share | ${datarootdir}
33 # infodir | ${prefix}/info | ${datarootdir}/info
34 # mandir | ${prefix}/man | ${datarootdir}/man
35 # docdir | NONE! | ${datarootdir}/doc/${PACKAGE_TARNAME}
36 # htmldir | NONE! | ${docdir}
37 # dvidir | NONE! | ${docdir}
38 # pdfdir | NONE! | ${docdir}
39 # psdir | NONE! | ${docdir}
41 # NOTE: The default e.g. ${docdir} above means that autoconf substitutes the
42 # string "${docdir}", not the value of docdir! This is crucial for the GNU
46 # $1 = variable to set
47 # $2 = default value to use, if configure didn't expand it
48 # If $1 starts with an @ then configure didn't set it,
49 # so set it to a sensible value
50 ifneq "$$(filter @%,$$($1))" ""
55 # This gets used in the default docdir when autoconf >= 2.60 is used
56 PACKAGE_TARNAME = @PACKAGE_TARNAME@
60 datarootdir = @datarootdir@
61 $(eval $(call set_default,datarootdir,$${prefix}/share))
63 exec_prefix = @exec_prefix@
67 includedir = @includedir@
70 # New autoconf (>= 2.60?) make a configure with --docdir=DIR etc flags.
71 # However, in order to support older autoconf's we don't use them.
74 $(eval $(call set_default,docdir,$${datarootdir}/doc/ghc))
80 $(eval $(call set_default,htmldir,$${docdir}))
81 $(eval $(call set_default,dvidir,$${docdir}))
82 $(eval $(call set_default,pdfdir,$${docdir}))
83 $(eval $(call set_default,psdir,$${docdir}))
85 ifeq "$(RelocatableBuild)" "YES"
87 # Hack: our directory layouts tend to be different on Windows, so
88 # hack around configure's bogus assumptions here.
89 datarootdir = $(prefix)
90 datadir = $(prefix)/lib
91 libdir = $(prefix)/lib
93 docdir = $(prefix)/doc
100 ghcdocdir = $(datarootdir)/doc
104 # Unix: override libdir and datadir to put ghc-specific stuff in
105 # a subdirectory with the version number included.
107 # datadir is set to libdir here as GHC needs package.conf and unlit
108 # to be in the same place (and things like ghc-pkg need to agree on
109 # where package.conf is, so we just set it globally).
111 ghclibdir = $(libdir)/ghc-$(ProjectVersion)
112 ghcdocdir = $(datarootdir)/doc/ghc
115 ghclibexecdir = $(ghclibdir)
116 topdir = $(ghclibdir)
117 ghcheaderdir = $(ghclibdir)/include
119 #-----------------------------------------------------------------------------
120 # install configuration
123 # Set this to have files installed with a specific owner
128 # Set this to have files installed with a specific group
133 # Invocations of `install' for the four different classes
136 CREATE_SCRIPT = create () { touch "$$1" && chmod 755 "$$1" ; } && create
137 CREATE_DATA = create () { touch "$$1" && chmod 644 "$$1" ; } && create
138 INSTALL_PROGRAM = $(INSTALL) -m 755
139 INSTALL_SCRIPT = $(INSTALL) -m 755
140 INSTALL_SHLIB = $(INSTALL) -m 755
141 INSTALL_DATA = $(INSTALL) -m 644
142 INSTALL_HEADER = $(INSTALL) -m 644
143 INSTALL_MAN = $(INSTALL) -m 644
144 INSTALL_DOC = $(INSTALL) -m 644
145 INSTALL_DIR = $(INSTALL) -m 755 -d
148 # runhaskell and hsc2hs are special, in that other compilers besides
149 # GHC might provide them. Systems with a package manager often come
150 # with tools to manage this kind of clash, e.g. RPM's
151 # update-alternatives. When building a distribution for such a system,
152 # we recommend setting both of the following to 'YES'.
154 # NO_INSTALL_RUNHASKELL = YES
155 # NO_INSTALL_HSC2HS = YES
157 # NB. we use negative tests here because for binary-distributions we cannot
158 # test build-time variables at install-time, so they must default to on.