Commit 0c67f7d2 authored by Zhen Zhang's avatar Zhen Zhang Committed by Andrey Mokhov
Browse files

Move need of inplaceLibCopyTargets to top-level (#388)

parent 5026b9c6
...@@ -24,7 +24,8 @@ import qualified Rules.Perl ...@@ -24,7 +24,8 @@ import qualified Rules.Perl
import qualified Rules.Program import qualified Rules.Program
import qualified Rules.Register import qualified Rules.Register
import Settings import Settings
import Settings.Path import Settings.Path (inplaceLibCopyTargets, pkgLibraryFile,
pkgSetupConfigFile, pkgHaddockFile)
import Target import Target
import Utilities import Utilities
...@@ -41,10 +42,11 @@ topLevelTargets = action $ do ...@@ -41,10 +42,11 @@ topLevelTargets = action $ do
libs <- concatForM [Stage0, Stage1] $ \stage -> libs <- concatForM [Stage0, Stage1] $ \stage ->
concatForM libraryPackages $ packageTargets stage concatForM libraryPackages $ packageTargets stage
prgs <- concatForM programsStage1Only $ packageTargets Stage0 prgs <- concatForM programsStage1Only $ packageTargets Stage0
return $ libs ++ prgs return $ libs ++ prgs ++ inplaceLibCopyTargets
else else do
concatForM allStages $ \stage -> targets <- concatForM allStages $ \stage ->
concatForM (knownPackages \\ [rts, libffi]) $ packageTargets stage concatForM (knownPackages \\ [rts, libffi]) $ packageTargets stage
return $ targets ++ inplaceLibCopyTargets
-- | Return the list of targets associated with a given 'Stage' and 'Package'. -- | Return the list of targets associated with a given 'Stage' and 'Package'.
packageTargets :: Stage -> Package -> Action [FilePath] packageTargets :: Stage -> Package -> Action [FilePath]
......
...@@ -11,7 +11,8 @@ import Oracles.PackageData ...@@ -11,7 +11,8 @@ import Oracles.PackageData
import Oracles.Setting import Oracles.Setting
import Rules.Wrappers import Rules.Wrappers
import Settings import Settings
import Settings.Path import Settings.Path (buildPath, inplaceLibBinPath, rtsContext, objectPath,
inplaceLibPath, inplaceBinPath)
import Target import Target
import Utilities import Utilities
...@@ -26,8 +27,6 @@ buildProgram rs context@Context {..} = when (isProgram package) $ do ...@@ -26,8 +27,6 @@ buildProgram rs context@Context {..} = when (isProgram package) $ do
context' <- programContext stage package context' <- programContext stage package
buildBinaryAndWrapper rs context' bin buildBinaryAndWrapper rs context' bin
when (package == ghc) $ want inplaceLibCopyTargets
-- Rules for programs built in install directories -- Rules for programs built in install directories
when (stage == Stage0 || package == ghc) $ do when (stage == Stage0 || package == ghc) $ do
-- Some binaries in inplace/bin are wrapped -- Some binaries in inplace/bin are wrapped
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment