Replace "tail -n +2" with "sed 1d", as Solaris doesn't understand the former
[ghc.git] / compat / compat.mk
1 # Settings for using the libghccompat.a library elsewhere in the build
2 # tree: this file is just included into Makefiles, see
3 # utils/ghc-pkg/Makefile for example.
4 #
5 # This is a poor-mans package, but simpler because we don't
6 # have to deal with variations in the package support of different
7 # versions of GHC.
8
9 ifneq "$(UseStage1)" "YES"
10
11 SRC_HC_OPTS += -DUSING_COMPAT
12
13 # Use libghccompat.a:
14 SRC_HC_OPTS += -i$(GHC_COMPAT_DIR)
15 SRC_LD_OPTS += -L$(GHC_COMPAT_DIR) -lghccompat
16
17 # Do *not* use the installed Cabal:
18 ifeq "$(ghc_ge_603)" "YES"
19 SRC_HC_OPTS += -ignore-package Cabal
20 endif
21
22 ifeq "$(ghc_ge_607)" "YES"
23 SRC_HC_OPTS += -package directory
24 SRC_HC_OPTS += -package pretty
25 SRC_HC_OPTS += -package containers
26 endif
27
28 ifeq "$(ghc_ge_603)" "NO"
29 SRC_HC_OPTS += -package unix
30 endif
31
32 # And similarly for when booting from .hc files:
33 HC_BOOT_LD_OPTS += -L$(GHC_COMPAT_DIR)
34 HC_BOOT_LIBS += -lghccompat
35
36 ifeq "$(Windows)" "YES"
37 # not very nice, but required for -lghccompat on Windows
38 SRC_LD_OPTS += -lshell32
39 HC_BOOT_LIBS += -lshell32
40 endif
41
42 # This is horrible. We ought to be able to omit the entire directory
43 # from mkDependHS.
44 SRC_MKDEPENDHS_OPTS += \
45 -optdep--exclude-module=Compat.RawSystem \
46 -optdep--exclude-module=Compat.Directory \
47 -optdep--exclude-module=Compat.Unicode \
48 -optdep--exclude-module=Distribution.Compat.FilePath \
49 -optdep--exclude-module=Distribution.Compat.ReadP \
50 -optdep--exclude-module=Distribution.Extension \
51 -optdep--exclude-module=Distribution.GetOpt \
52 -optdep--exclude-module=Distribution.InstalledPackageInfo \
53 -optdep--exclude-module=Distribution.License \
54 -optdep--exclude-module=Distribution.Package \
55 -optdep--exclude-module=Distribution.ParseUtils \
56 -optdep--exclude-module=Distribution.Compiler \
57 -optdep--exclude-module=Distribution.Version \
58 -optdep--exclude-module=System.FilePath \
59 -optdep--exclude-module=System.FilePath.Posix \
60 -optdep--exclude-module=System.FilePath.Windows \
61 -optdep--exclude-module=System.Directory.Internals \
62 -optdep--exclude-module=Trace.Hpc.Mix \
63 -optdep--exclude-module=Trace.Hpc.Tix \
64 -optdep--exclude-module=Trace.Hpc.Util
65
66 PACKAGE_CABAL =
67 PACKAGE_HPC =
68
69 else
70
71 PACKAGE_CABAL = -package Cabal
72 PACKAGE_HPC = -package hpc
73
74 endif
75