Commit c94111ff authored by simonmar's avatar simonmar
Browse files

[project @ 2005-03-23 13:27:42 by simonmar]

Build GHC package as part of stage 2, and install it.

The following changes will affect those building the GHC package:

  - BuildPackageGHC=YES is no longer required in build.mk
  - You must build stage 2 in order to get package ghc.
  - 'make install-inplace-pkg' is not required (nor does it work)
  - -package ghc can be used with the local stage1 or stage2 compiler
    in the current build tree, and it will be available after a
    'make install'.

The GHC package is no longer optional, but it doesn't add much to the
build time.
parent 1a84b27d
......@@ -181,7 +181,6 @@ endif
# 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)
......@@ -191,7 +190,6 @@ endif
else
HS_PROG=$(odir)/ghc-$(ProjectVersion)
endif
endif
# -----------------------------------------------------------------------------
# Create compiler configuration
......@@ -407,6 +405,7 @@ ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES"
# Yes, include the interepreter, readline, and Template Haskell extensions
SRC_HC_OPTS += -DGHCI -package template-haskell
PKG_DEPENDS += template_haskell
ALL_DIRS += ghci
......@@ -421,10 +420,12 @@ ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
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
......@@ -476,11 +477,13 @@ ifeq "$(bootstrapped) $(ghc_ge_601)" "NO NO"
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
......@@ -732,15 +735,21 @@ endif
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
#-----------------------------------------------------------------------------
......
......@@ -2,7 +2,7 @@ name: PACKAGE
version: VERSION
license: BSD3
maintainer: glasgow-haskell-users@haskell.org
exposed: True
exposed: False
exposed-modules:
BasicTypes,
......@@ -260,42 +260,42 @@ exposed-modules:
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment