File: ghc.mk

package info (click to toggle)
ghc 8.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 80,760 kB
  • sloc: haskell: 461,232; ansic: 62,975; sh: 8,706; python: 1,902; asm: 1,714; makefile: 1,120; perl: 458; javascript: 207; xml: 196; cpp: 147; ruby: 84; lisp: 7
file content (44 lines) | stat: -rw-r--r-- 1,898 bytes parent folder | download | duplicates (2)
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
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------

utils/runghc_PACKAGE = runghc
utils/runghc_dist-install_USES_CABAL = YES
utils/runghc_dist-install_PROGNAME = runghc
utils/runghc_dist-install_SHELL_WRAPPER = YES
utils/runghc_dist-install_INSTALL = YES
utils/runghc_dist-install_INSTALL_INPLACE = YES
utils/runghc_dist-install_INSTALL_SHELL_WRAPPER_NAME = runghc-$(ProjectVersion)
utils/runghc_dist-install_EXTRA_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\""

# Be explicit about which version of ghc to call (#9054).
define utils/runghc_dist-install_INPLACE_SHELL_WRAPPER_EXTRA
echo 'ghcprog="$(ghc_stage2_INPLACE_SHELL_WRAPPER_NAME)"' >> "$(WRAPPER)"
endef
define utils/runghc_dist-install_INSTALL_SHELL_WRAPPER_EXTRA
echo 'ghcprog="$(ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_NAME)"' >> "$(WRAPPER)"
endef

$(eval $(call build-prog,utils/runghc,dist-install,1))

install: install_runhaskell

.PHONY: install_runhaskell
ifeq "$(Windows_Host)" "YES"
install_runhaskell: install_bins
	"$(CP)" $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc$(exeext1) $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell$(exeext1)
else
install_runhaskell:
	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell")
	$(LN_S) $(CrossCompilePrefix)runghc "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell"
	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc")
	$(LN_S) $(CrossCompilePrefix)runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc"
endif