summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/BinaryDist.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Rules/BinaryDist.hs')
-rw-r--r--hadrian/src/Rules/BinaryDist.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index d52e0c847c..24c5482a59 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -179,11 +179,14 @@ bindistRules = do
root -/- "bindist" -/- "ghc-*" -/- "configure" %> \configurePath -> do
ghcRoot <- topDirectory
copyFile (ghcRoot -/- "aclocal.m4") (ghcRoot -/- "distrib" -/- "aclocal.m4")
+ copyDirectory (ghcRoot -/- "m4") (ghcRoot -/- "distrib")
buildWithCmdOptions [] $
target (vanillaContext Stage1 ghc) (Autoreconf $ ghcRoot -/- "distrib") [] []
-- We clean after ourselves, moving the configure script we generated in
-- our bindist dir
removeFile (ghcRoot -/- "distrib" -/- "aclocal.m4")
+ removeDirectory (ghcRoot -/- "distrib" -/- "m4")
+
moveFile (ghcRoot -/- "distrib" -/- "configure") configurePath
-- Generate the Makefile that enables the "make install" part