+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/ReadP.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/TempFile.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compiler.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/GetOpt.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/InstalledPackageInfo.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/License.hs"
-
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ModuleName.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Package.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ParseUtils.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ReadE.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Program.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Utils.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/System.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Text.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Verbosity.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Version.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "Cabal/Language/Haskell/Extension.hs"
--- dummy comment
ALL_DIRS = \
Data \
Compat \
- Distribution \
- Distribution/Compat \
- Distribution/Simple \
- Language/Haskell \
- System \
- System/FilePath \
- System/Directory \
Trace/Hpc \
cbits
# This module shouldn't be compiled itself, only #included into other files
EXCLUDED_SRCS += System/FilePath/Internal.hs
-ifneq "$(ghc_ge_607)" "YES"
-# GHC 6.3+ has Cabal, but we're replacing it:
-SRC_HC_OPTS += -ignore-package Cabal
-
-# only GHC 6.3+ has -ignore-package
-SRC_HC_OPTS += -ignore-package filepath
-endif
-
ifeq "$(ghc_ge_607)" "YES"
SRC_HC_OPTS += -package directory
SRC_HC_OPTS += -package pretty
# Some explicit dependencies, needed because ghc -M can't discover the
# true dependencies of these stub files.
System/Directory/Internals.$(way_)o : $(FPTOOLS_TOP)/libraries/directory/System/Directory/Internals.hs
-Distribution/Compat/ReadP.$(way_) : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/ReadP.hs
-Distribution/GetOpt.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/GetOpt.hs
-Distribution/InstalledPackageInfo.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/InstalledPackageInfo.hs
-Distribution/License.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/License.hs
-Distribution/Package.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Package.hs
-Distribution/ParseUtils.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/ParseUtils.hs
-Distribution/Compiler.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compiler.hs
-Distribution/Version.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Version.hs
-Language/Haskell/Extension.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Language/Haskell/Extension.hs
Trace/Hpc/Mix.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Mix.hs
Trace/Hpc/Util.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Util.hs
Trace/Hpc/Tix.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Tix.hs
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Internal.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Posix.hs"
--- dummy comment
+++ /dev/null
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Windows.hs"
--- dummy comment
SRC_HC_OPTS += -i$(GHC_COMPAT_DIR)
SRC_LD_OPTS += -L$(GHC_COMPAT_DIR) -lghccompat
-# Do *not* use the installed Cabal:
-SRC_HC_OPTS += -ignore-package Cabal
-
ifeq "$(ghc_ge_607)" "YES"
SRC_HC_OPTS += -package directory
SRC_HC_OPTS += -package pretty
# from mkDependHS.
SRC_MKDEPENDHS_OPTS += \
-optdep--exclude-module=Compat.Unicode \
- -optdep--exclude-module=Distribution.Compat.FilePath \
- -optdep--exclude-module=Distribution.Compat.ReadP \
- -optdep--exclude-module=Distribution.Extension \
- -optdep--exclude-module=Distribution.GetOpt \
- -optdep--exclude-module=Distribution.InstalledPackageInfo \
- -optdep--exclude-module=Distribution.License \
- -optdep--exclude-module=Distribution.ModuleName \
- -optdep--exclude-module=Distribution.Package \
- -optdep--exclude-module=Distribution.ParseUtils \
- -optdep--exclude-module=Distribution.Compiler \
- -optdep--exclude-module=Distribution.Version \
- -optdep--exclude-module=Distribution.ReadE \
- -optdep--exclude-module=Distribution.Text \
- -optdep--exclude-module=System.FilePath \
- -optdep--exclude-module=System.FilePath.Posix \
- -optdep--exclude-module=System.FilePath.Windows \
-optdep--exclude-module=Trace.Hpc.Mix \
-optdep--exclude-module=Trace.Hpc.Tix \
-optdep--exclude-module=Trace.Hpc.Util
PKG_DEPENDS += unix
endif
-# We use the Cabal package in stages 2/3 only; in stage 1 we're using
-# the libcompat library which provides the Cabal modules.
-ifneq "$(stage)" "1"
SRC_HC_OPTS += -package Cabal
PKG_DEPENDS += Cabal
-endif
# Ignore lang, to avoid potential clash with the Generics module if
# lang happens to be a dependency of some exposed package in the local
GHC_STAGE2 = $(GHC_COMPILER_DIR)/stage2/ghc-inplace -no-user-package-conf
GHC_STAGE3 = $(GHC_COMPILER_DIR)/stage3/ghc-inplace -no-user-package-conf
+BOOTSTRAPPING_CONF = $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
+
# NOTE: add -no-user-package-conf for stage 1-3 above, so that
# we avoid picking up any packages the user might happen to have
# installed for this GHC version. They are bound to be incompatible
HC = @WithHc@
MKDEPENDHS = $(GHC)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
+BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
GhcVersion = @GhcVersion@
GhcPatchLevel = @GhcPatchLevel@
GhcMajVersion = @GhcMajVersion@
# All the standard gluing together, as in the comment right at the front
-HC_OPTS = $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
+HC_OPTS = $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
HC_POST_OPTS = $(SRC_HC_POST_OPTS) $(WAY$(_way)_HC_POST_OPTS) $($*_HC_POST_OPTS) $(EXTRA_HC_POST_OPTS)
HC_PRE_OPTS = $(SRC_HC_PRE_OPTS) $(WAY$(_way)_HC_PRE_OPTS) $($*_HC_PRE_OPTS) $(EXTRA_HC_PRE_OPTS)
LIT2LATEX_OPTS = $(SRC_LIT2LATEX_OPTS) $(WAY$(_way)_LIT2LATEX_OPTS) $(EXTRA_LIT2LATEX_OPTS)
LIT2PGM_OPTS = $(SRC_LIT2PGM_OPTS) $(WAY$(_way)_LIT2PGM_OPTS) $(EXTRA_LIT2PGM_OPTS)
MKDEPENDC_OPTS = $(SRC_MKDEPENDC_OPTS) $(WAY$(_way)_MKDEPENDC_OPTS) $(EXTRA_MKDEPENDC_OPTS)
-MKDEPENDHS_OPTS = $(SRC_MKDEPENDHS_OPTS) $(WAY$(_way)_MKDEPENDHS_OPTS) \
+MKDEPENDHS_OPTS = $(BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS) \
+ $(SRC_MKDEPENDHS_OPTS) $(WAY$(_way)_MKDEPENDHS_OPTS) \
$(EXTRA_MKDEPENDHS_OPTS)
MKDEPENDLIT_OPTS = $(SRC_MKDEPENDLIT_OPTS) $(WAY$(_way)_MKDEPENDLIT_OPTS) \
$(EXTRA_MKDEPENDLIT_OPTS)
ifneq "$(NO_SET_HC)" "YES"
HC = $(GHC_INPLACE)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS =
endif
IGNORE_PACKAGE_FLAG = -package-name $(PACKAGE)-$(VERSION)
SRC_HC_OPTS += -package containers
endif
+SRC_HC_OPTS += -package Cabal
+
# On Windows, ghc-pkg is a standalone program
# ($bindir/ghc-pkg.exe), whereas on Unix it needs a wrapper script
# to pass the appropriate flag to the real binary