summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-07-27 19:03:40 +0200
committerDouglas Wilson <douglas.wilson@gmail.com>2022-07-28 10:40:23 +0100
commita5590869734b3e51cd36475729cec1f0cbaaea52 (patch)
tree8c4c0fe51dd53c7792001dac68fc24e9a64d1b3e
parent6971ec584077ef03e6cbce02a97b14fb60f7478b (diff)
downloadhaskell-a5590869734b3e51cd36475729cec1f0cbaaea52.tar.gz
hadrian: also include boot-generated files only needed for make
For some libraries the `boot` script generates a `ghc.mk` and `GNUmakefile` which is required for the make build system. We also should include these files in the source-dist to save make users from having to run the `./boot.source` script in the tarball (which confusingly has a different name to previous GHC releases, thanks to hadrian). With this change, the source-dist should be on parity with GHC 9.2.2 and earlier releases again after the regression in GHC 9.2.3. Closes #21626. (cherry picked from commit 90ccdb9c84fe7133244d661766f1aa7a29a94a72)
-rw-r--r--hadrian/src/Rules/SourceDist.hs40
1 files changed, 40 insertions, 0 deletions
diff --git a/hadrian/src/Rules/SourceDist.hs b/hadrian/src/Rules/SourceDist.hs
index b218f66c63..7d5fca6ccc 100644
--- a/hadrian/src/Rules/SourceDist.hs
+++ b/hadrian/src/Rules/SourceDist.hs
@@ -157,6 +157,46 @@ prepareTree dest = do
, "configure"
, "aclocal.m4"
, "mk" -/- "config.h.in" ]
+ -- also include files generated by boot that are only used by the make build system
+ ++ concatMap libBootFilesForMake
+ [ base
+ , ghcBootTh
+ , ghcCompact
+ , ghcHeap
+ , ghcPrim
+ , ghci
+ , integerGmp
+ , libiserv
+ , templateHaskell
+ , ghcBignum
+ , cabal
+ , cabalSyntax
+ , win32
+ , array
+ , binary
+ , bytestring
+ , containers
+ , deepseq
+ , directory
+ , exceptions
+ , filepath
+ , haskeline
+ , hpc
+ , mtl
+ , parsec
+ , pretty
+ , process
+ , stm
+ , terminfo
+ , text
+ , time
+ , transformers
+ , unix
+ , xhtml ]
+
+ libBootFilesForMake pkg =
+ [ pkgPath pkg -/- "ghc.mk"
+ , pkgPath pkg -/- "GNUmakefile" ]
copyAlexHappyFiles =
forM_ alexHappyFiles $ \(stg, pkg, inp, out) -> do