summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-01-24 02:00:23 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-10 19:19:34 -0500
commita1d979682caeac0c9a99ec213ae53a15a82a3682 (patch)
tree24a8e03b70d9014236d335f0462694d2a22e968f /utils
parent2a47ee9c65140ad5d72ff27949f3fc7948569d9e (diff)
downloadhaskell-a1d979682caeac0c9a99ec213ae53a15a82a3682.tar.gz
Bump Cabal submodule
Adapts GHC to the factoring-out of `Cabal-syntax`. Fixes #20991. Metric Decrease: haddock.Cabal
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-cabal/Main.hs3
-rw-r--r--utils/ghc-cabal/ghc-cabal.cabal11
-rw-r--r--utils/ghc-cabal/ghc.mk14
-rw-r--r--utils/ghc-pkg/ghc-pkg.cabal.in1
4 files changed, 12 insertions, 17 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 0514af148d..20ee539e0a 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -8,12 +8,12 @@ import qualified Distribution.ModuleName as ModuleName
import Distribution.PackageDescription
import Distribution.PackageDescription.Check hiding (doesFileExist)
import Distribution.PackageDescription.Configuration
-import Distribution.PackageDescription.Parsec
import Distribution.Package
import Distribution.Simple
import Distribution.Simple.Configure
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.GHC
+import Distribution.Simple.PackageDescription
import Distribution.Simple.Program
import Distribution.Simple.Program.HcPkg
import Distribution.Simple.Setup (ConfigFlags(configStripLibs), fromFlagOrDefault, toFlag)
@@ -413,6 +413,7 @@ generate directory distdir config_args
mkLibraryRelDir "rts" = "rts/dist-install/build"
mkLibraryRelDir "ghc" = "compiler/stage2/build"
mkLibraryRelDir "Cabal" = "libraries/Cabal/Cabal/dist-install/build"
+ mkLibraryRelDir "Cabal-syntax" = "libraries/Cabal/Cabal-syntax/dist-install/build"
mkLibraryRelDir "containers" = "libraries/containers/containers/dist-install/build"
mkLibraryRelDir l = "libraries/" ++ l ++ "/dist-install/build"
libraryRelDirs = map mkLibraryRelDir transitiveDepNames
diff --git a/utils/ghc-cabal/ghc-cabal.cabal b/utils/ghc-cabal/ghc-cabal.cabal
index bdf638ee47..537b5e357b 100644
--- a/utils/ghc-cabal/ghc-cabal.cabal
+++ b/utils/ghc-cabal/ghc-cabal.cabal
@@ -19,8 +19,9 @@ Executable ghc-cabal
Default-Language: Haskell2010
Main-Is: Main.hs
- Build-Depends: base >= 3 && < 5,
- bytestring >= 0.10 && < 0.12,
- Cabal >= 3.2 && < 3.8,
- directory >= 1.1 && < 1.4,
- filepath >= 1.2 && < 1.5
+ Build-Depends: base >= 3 && < 5,
+ bytestring >= 0.10 && < 0.12,
+ Cabal >= 3.7 && < 3.8,
+ Cabal-syntax >= 3.7 && < 3.8,
+ directory >= 1.1 && < 1.4,
+ filepath >= 1.2 && < 1.5
diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk
index ca1cda5307..035ee8adaa 100644
--- a/utils/ghc-cabal/ghc.mk
+++ b/utils/ghc-cabal/ghc.mk
@@ -37,21 +37,12 @@ ifneq "$(BINDIST)" "YES"
$(ghc-cabal_INPLACE) : $(ghc-cabal_DIST_BINARY) | $$(dir $$@)/.
"$(CP)" $< $@
-# Minor hack, since we can't reuse the `hs-suffix-rules-srcdir` macro
-ifneq ($(wildcard libraries/Cabal/Cabal/src/Distribution/Fields/Lexer.x),)
-# Lexer.x exists so we have to call Alex ourselves
-CABAL_LEXER_DEP := bootstrapping/Cabal/src/Distribution/Fields/Lexer.hs
-
-bootstrapping/Cabal/src/Distribution/Fields/Lexer.hs: libraries/Cabal/Cabal/src/Distribution/Fields/Lexer.x
- mkdir -p bootstrapping/Cabal/src/Distribution/Fields
- $(call cmd,ALEX) $< -o $@
-else
-CABAL_LEXER_DEP := libraries/Cabal/Cabal/src/Distribution/Fields/Lexer.hs
-endif
+CABAL_LEXER_DEP := libraries/Cabal/Cabal-syntax/src/Distribution/Fields/Lexer.hs
$(ghc-cabal_DIST_BINARY): $(wildcard libraries/Cabal/Cabal/src/Distribution/*/*/*.hs)
$(ghc-cabal_DIST_BINARY): $(wildcard libraries/Cabal/Cabal/src/Distribution/*/*.hs)
$(ghc-cabal_DIST_BINARY): $(wildcard libraries/Cabal/Cabal/src/Distribution/*.hs)
+$(ghc-cabal_DIST_BINARY): $(wildcard libraries/Cabal/Cabal-syntax/src/Distribution/*.hs)
# N.B. Compile with -O0 since this is not a performance-critical executable
# and the Cabal takes nearly twice as long to build with -O1. See #16817.
@@ -73,6 +64,7 @@ $(ghc-cabal_DIST_BINARY): $(CABAL_LEXER_DEP) utils/ghc-cabal/Main.hs $(TOUCH_DEP
-hidir bootstrapping \
$(CABAL_LEXER_DEP) \
-ilibraries/Cabal/Cabal/src \
+ -ilibraries/Cabal/Cabal-syntax/src \
-ilibraries/binary/src \
-ilibraries/filepath \
-ilibraries/hpc \
diff --git a/utils/ghc-pkg/ghc-pkg.cabal.in b/utils/ghc-pkg/ghc-pkg.cabal.in
index d299c98372..4d9402c2d3 100644
--- a/utils/ghc-pkg/ghc-pkg.cabal.in
+++ b/utils/ghc-pkg/ghc-pkg.cabal.in
@@ -31,6 +31,7 @@ Executable ghc-pkg
containers,
filepath,
Cabal,
+ Cabal-syntax,
binary,
ghc-boot,
bytestring