# be to do `env PATH=$(PATH) make ghc' to minimise the environment. (or the
# equivalent of `env' if it doesn't exist locally).
#
-ifneq "$(BuildPackageGHC)" "YES"
ifneq "$(way)" "dll"
ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
HS_PROG=$(odir)/ghc$(_way)-$(ProjectVersion)
else
HS_PROG=$(odir)/ghc-$(ProjectVersion)
endif
-endif
# -----------------------------------------------------------------------------
# Create compiler configuration
# Yes, include the interepreter, readline, and Template Haskell extensions
SRC_HC_OPTS += -DGHCI -package template-haskell
+PKG_DEPENDS += template_haskell
ALL_DIRS += ghci
ifeq "$(stage)" "1"
ifeq "$(GhcHasReadline)" "YES"
SRC_HC_OPTS += -package readline -DUSE_READLINE
+PKG_DEPENDS += readline
endif
else
ifeq "$(GhcLibsWithReadline)" "YES"
SRC_HC_OPTS += -package readline -DUSE_READLINE
+PKG_DEPENDS += readline
endif
endif # stage=1
endif # not windows
SRC_HC_OPTS += -package posix
else
SRC_HC_OPTS += -package unix
+PKG_DEPENDS += unix
endif
endif
ifneq "$(findstring YES, $(bootstrapped) $(ghc_ge_603))" ""
SRC_HC_OPTS += -package Cabal
+PKG_DEPENDS += Cabal
endif
SRC_CC_OPTS += -Iparser -I. -O
coreSyn/CorePrep_HC_OPTS += -auto-all
#-----------------------------------------------------------------------------
-# Building GHC package
+# Building the GHC package
-ifeq "$(BuildPackageGHC)" "YES"
+# The GHC package is made from the stage 2 build. Fortunately the
+# package build system framework more or less does the right thing for
+# us here.
+ifeq "$(stage)" "2"
PACKAGE = ghc
-VERSION = 6.4
-STANDALONE_PACKAGE = YES
-PACKAGE_DEPS =
+HIERARCHICAL_LIB = NO
+VERSION = $(ProjectVersion)
+PKG_DEPENDS += base haskell98
+PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)'
+# override default definition of HS_IFACES so we can add $(odir)
+HS_IFACES = $(addsuffix .$(way_)hi,$(basename $(HS_OBJS)))
endif
#-----------------------------------------------------------------------------
version: VERSION
license: BSD3
maintainer: glasgow-haskell-users@haskell.org
-exposed: True
+exposed: False
exposed-modules:
BasicTypes,
Util
#ifdef INSTALLING
-import-dirs: "$libdir/ghc-package"
+import-dirs: PKG_LIBDIR"/hslibs-imports/ghc"
#else
-import-dirs: FPTOOLS_TOP_ABS"/ghc/compiler/stage1/utils",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/basicTypes",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/types",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/hsSyn",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/prelude",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/rename",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/typecheck",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/deSugar",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/coreSyn",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/specialise",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/simplCore",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/stranal",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/stgSyn",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/simplStg",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/codeGen",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/main",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/profiling",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/parser",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/cprAnalysis",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/compMan",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/ndpFlatten",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/iface",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/cmm",
- FPTOOLS_TOP_ABS"/ghc/compiler/stage1/nativeGen"
+import-dirs: FPTOOLS_TOP_ABS"/ghc/compiler/stage2/utils",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/basicTypes",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/types",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/hsSyn",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/prelude",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/rename",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/typecheck",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/deSugar",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/coreSyn",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/specialise",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/simplCore",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/stranal",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/stgSyn",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/simplStg",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/codeGen",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/main",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/profiling",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/parser",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/cprAnalysis",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/compMan",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/ndpFlatten",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/iface",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/cmm",
+ FPTOOLS_TOP_ABS"/ghc/compiler/stage2/nativeGen"
#endif
#ifdef INSTALLING
-library-dirs: "$libdir",
+library-dirs: LIB_DIR
#else
-library-dirs: FPTOOLS_TOP_ABS"/ghc/compiler"
+library-dirs: FPTOOLS_TOP_ABS"/ghc/compiler"
#endif
-hs-libraries: LIBRARY
-
+hs-libraries: "HSghc"
extra-libraries:
-
-package_deps: "base", "haskell98"
+package_deps: PKG_DEPENDS
+haddock-interfaces: HADDOCK_IFACE
+haddock-html: HTML_DIR