Remove useless UNPACK pragmas
[ghc.git] / driver / ghci / ghc.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 ifneq "$(Windows)" "YES"
14
15 install: install_driver_ghci
16
17 .PHONY: install_driver_ghci
18 install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion)
19 install_driver_ghci:
20 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
21 "$(RM)" $(RM_OPTS) "$(WRAPPER)"
22 $(CREATE_SCRIPT) "$(WRAPPER)"
23 echo '#!$(SHELL)' >> "$(WRAPPER)"
24 echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive $${1+"$$@"}' >> "$(WRAPPER)"
25 $(EXECUTABLE_FILE) "$(WRAPPER)"
26 "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghci"
27 $(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
28
29 else # Windows...
30
31 driver/ghci_dist_C_SRCS = ghci.c ../utils/cwrapper.c ../utils/getLocation.c
32 driver/ghci_dist_CC_OPTS += -I driver/utils
33 driver/ghci_dist_PROG = ghci$(exeext)
34 driver/ghci_dist_INSTALL = YES
35 driver/ghci_dist_OTHER_OBJS = driver/ghci/ghci.res
36
37 $(eval $(call build-prog,driver/ghci,dist,0))
38
39 driver/ghci_dist_PROG_VER = ghci-$(ProjectVersion)$(exeext)
40
41 INSTALL_BINS += driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG_VER)
42
43 driver/ghci/ghci.res : driver/ghci/ghci.rc driver/ghci/ghci.ico
44 $(INPLACE_MINGW)/bin/windres --preprocessor="$(CPP) -xc -DRC_INVOKED" -o driver/ghci/ghci.res -i driver/ghci/ghci.rc -O coff
45
46 driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG_VER) : driver/ghci/dist/build/tmp/$(driver/ghci_dist_PROG)
47 "$(CP)" $< $@
48
49 install : install_driver_ghcii
50
51 .PHONY: install_driver_ghcii
52 install_driver_ghcii: GHCII_SCRIPT=$(DESTDIR)$(bindir)/ghcii.sh
53 install_driver_ghcii: GHCII_SCRIPT_VERSIONED = $(DESTDIR)$(bindir)/ghcii-$(ProjectVersion).sh
54 install_driver_ghcii:
55 $(INSTALL_DIR) $(DESTDIR)$(bindir)
56 "$(RM)" $(RM_OPTS) $(GHCII_SCRIPT)
57 echo "#!$(SHELL)" >> $(GHCII_SCRIPT)
58 echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT)
59 $(EXECUTABLE_FILE) $(GHCII_SCRIPT)
60 cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
61 $(EXECUTABLE_FILE) $(GHCII_SCRIPT_VERSIONED)
62
63 endif
64