diff options
Diffstat (limited to 'hadrian/src/Rules/BinaryDist.hs')
-rw-r--r-- | hadrian/src/Rules/BinaryDist.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index d52e0c847c..6b1bad005c 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -2,6 +2,7 @@ module Rules.BinaryDist where import Hadrian.Haskell.Cabal +import CommandLine import Context import Expression import Oracles.Setting @@ -98,6 +99,18 @@ other, the install script: bindistRules :: Rules () bindistRules = do root <- buildRootRules + phony "install" $ do + need ["binary-dist-dir"] + version <- setting ProjectVersion + targetPlatform <- setting TargetPlatformFull + let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform + bindistFilesDir = root -/- "bindist" -/- ghcVersionPretty + prefixErr = "You must specify a path with --prefix when using the" + ++ " 'install' rule" + installPrefix <- fromMaybe (error prefixErr) <$> cmdPrefix + runBuilder (Configure bindistFilesDir) ["--prefix="++installPrefix] [] [] + runBuilder (Make bindistFilesDir) ["install"] [] [] + phony "binary-dist-dir" $ do -- We 'need' all binaries and libraries targets <- mapM pkgTarget =<< stagePackages Stage1 |