Remove Cabal modules from compat
authorIan Lynagh <igloo@earth.li>
Thu, 3 Jul 2008 22:46:33 +0000 (22:46 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 3 Jul 2008 22:46:33 +0000 (22:46 +0000)
We now get them from the bootstrapping package.conf instead

28 files changed:
compat/Distribution/Compat/ReadP.hs [deleted file]
compat/Distribution/Compat/TempFile.hs [deleted file]
compat/Distribution/Compiler.hs [deleted file]
compat/Distribution/GetOpt.hs [deleted file]
compat/Distribution/InstalledPackageInfo.hs [deleted file]
compat/Distribution/License.hs [deleted file]
compat/Distribution/ModuleName.hs [deleted file]
compat/Distribution/Package.hs [deleted file]
compat/Distribution/ParseUtils.hs [deleted file]
compat/Distribution/ReadE.hs [deleted file]
compat/Distribution/Simple/Program.hs [deleted file]
compat/Distribution/Simple/Utils.hs [deleted file]
compat/Distribution/System.hs [deleted file]
compat/Distribution/Text.hs [deleted file]
compat/Distribution/Verbosity.hs [deleted file]
compat/Distribution/Version.hs [deleted file]
compat/Language/Haskell/Extension.hs [deleted file]
compat/Makefile
compat/System/FilePath.hs [deleted file]
compat/System/FilePath/Internal.hs [deleted file]
compat/System/FilePath/Posix.hs [deleted file]
compat/System/FilePath/Windows.hs [deleted file]
compat/compat.mk
compiler/Makefile
mk/config.mk.in
mk/opts.mk
mk/package.mk
utils/ghc-pkg/Makefile

diff --git a/compat/Distribution/Compat/ReadP.hs b/compat/Distribution/Compat/ReadP.hs
deleted file mode 100644 (file)
index 5fc69da..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/ReadP.hs"
--- dummy comment
diff --git a/compat/Distribution/Compat/TempFile.hs b/compat/Distribution/Compat/TempFile.hs
deleted file mode 100644 (file)
index 631eb76..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/TempFile.hs"
--- dummy comment
diff --git a/compat/Distribution/Compiler.hs b/compat/Distribution/Compiler.hs
deleted file mode 100644 (file)
index b5a2f68..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compiler.hs"
--- dummy comment
diff --git a/compat/Distribution/GetOpt.hs b/compat/Distribution/GetOpt.hs
deleted file mode 100644 (file)
index 7da2e30..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/GetOpt.hs"
--- dummy comment
diff --git a/compat/Distribution/InstalledPackageInfo.hs b/compat/Distribution/InstalledPackageInfo.hs
deleted file mode 100644 (file)
index 03f5092..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/InstalledPackageInfo.hs"
--- dummy comment
diff --git a/compat/Distribution/License.hs b/compat/Distribution/License.hs
deleted file mode 100644 (file)
index 31b1b27..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/License.hs"
-
--- dummy comment
diff --git a/compat/Distribution/ModuleName.hs b/compat/Distribution/ModuleName.hs
deleted file mode 100644 (file)
index 24db2a0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ModuleName.hs"
--- dummy comment
diff --git a/compat/Distribution/Package.hs b/compat/Distribution/Package.hs
deleted file mode 100644 (file)
index d40171e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Package.hs"
--- dummy comment
diff --git a/compat/Distribution/ParseUtils.hs b/compat/Distribution/ParseUtils.hs
deleted file mode 100644 (file)
index f5bf266..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ParseUtils.hs"
--- dummy comment
diff --git a/compat/Distribution/ReadE.hs b/compat/Distribution/ReadE.hs
deleted file mode 100644 (file)
index 821b902..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ReadE.hs"
--- dummy comment
diff --git a/compat/Distribution/Simple/Program.hs b/compat/Distribution/Simple/Program.hs
deleted file mode 100644 (file)
index 86d2e1a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Program.hs"
--- dummy comment
diff --git a/compat/Distribution/Simple/Utils.hs b/compat/Distribution/Simple/Utils.hs
deleted file mode 100644 (file)
index 004418d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Utils.hs"
--- dummy comment
diff --git a/compat/Distribution/System.hs b/compat/Distribution/System.hs
deleted file mode 100644 (file)
index 8cf5f26..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/System.hs"
--- dummy comment
diff --git a/compat/Distribution/Text.hs b/compat/Distribution/Text.hs
deleted file mode 100644 (file)
index e841203..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Text.hs"
--- dummy comment
diff --git a/compat/Distribution/Verbosity.hs b/compat/Distribution/Verbosity.hs
deleted file mode 100644 (file)
index 2c18f59..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Verbosity.hs"
--- dummy comment
diff --git a/compat/Distribution/Version.hs b/compat/Distribution/Version.hs
deleted file mode 100644 (file)
index 1140c03..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Version.hs"
--- dummy comment
diff --git a/compat/Language/Haskell/Extension.hs b/compat/Language/Haskell/Extension.hs
deleted file mode 100644 (file)
index 410a07b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Language/Haskell/Extension.hs"
--- dummy comment
index a95e161..fb28e2c 100644 (file)
@@ -4,13 +4,6 @@ include $(TOP)/mk/boilerplate.mk
 ALL_DIRS = \
        Data \
        Compat \
-       Distribution \
-       Distribution/Compat \
-       Distribution/Simple \
-       Language/Haskell \
-       System \
-       System/FilePath \
-       System/Directory \
        Trace/Hpc \
        cbits
 
@@ -60,14 +53,6 @@ SRC_CC_OPTS += -D__GHC_PATCHLEVEL__=$(GhcPatchLevel)
 # 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
@@ -76,15 +61,6 @@ endif
 # 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
diff --git a/compat/System/FilePath.hs b/compat/System/FilePath.hs
deleted file mode 100644 (file)
index 749d727..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Internal.hs b/compat/System/FilePath/Internal.hs
deleted file mode 100644 (file)
index ce99a93..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Internal.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Posix.hs b/compat/System/FilePath/Posix.hs
deleted file mode 100644 (file)
index 132f5cb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Posix.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Windows.hs b/compat/System/FilePath/Windows.hs
deleted file mode 100644 (file)
index 85a3214..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Windows.hs"
--- dummy comment
index c2bfeb1..00a3c9f 100644 (file)
@@ -14,9 +14,6 @@ SRC_HC_OPTS += -DUSING_COMPAT
 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
@@ -37,22 +34,6 @@ endif
 # 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
index ce69bae..5e503ea 100644 (file)
@@ -602,12 +602,8 @@ SRC_HC_OPTS += -package unix
 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
index e19a1cd..3749b3e 100644 (file)
@@ -884,6 +884,8 @@ GHC_STAGE1  = $(GHC_COMPILER_DIR)/stage1/ghc-inplace -no-user-package-conf
 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
@@ -912,6 +914,8 @@ else # not UseStage1 or BootingFromHc
 
 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@
index fe2d060..08ec4b6 100644 (file)
@@ -60,7 +60,7 @@ endif
 # 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)
 
@@ -95,7 +95,8 @@ LIT2HTML_OPTS      = $(SRC_LIT2HTML_OPTS) $(WAY$(_way)_LIT2HTML_OPTS) $(EXTRA_LI
 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)
index f17f9e0..44087aa 100644 (file)
@@ -120,6 +120,7 @@ SRC_HSC2HS_OPTS += -I.
 
 ifneq "$(NO_SET_HC)" "YES"
 HC = $(GHC_INPLACE)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS =
 endif
 IGNORE_PACKAGE_FLAG = -package-name  $(PACKAGE)-$(VERSION)
 
index f35bbf9..adce829 100644 (file)
@@ -33,6 +33,8 @@ ifeq "$(ghc_ge_607)" "YES"
 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