fold Build/SysConfig.hs into BuildInfo via include
This avoids warnings from stack about the module not being listed in the cabal file. So, the generated file is also renamed to Build/SysConfig. Note that the setup program seems to be cached despite these changes; I had to cabal clean to get cabal to update it so that Build/SysConfig was written. This commit was sponsored by Jochen Bartl on Patreon.
This commit is contained in:
parent
ad6683e722
commit
308cd1383c
24 changed files with 64 additions and 63 deletions
|
@ -10,7 +10,7 @@
|
|||
module Utility.Lsof where
|
||||
|
||||
import Common
|
||||
import Build.SysConfig as SysConfig
|
||||
import BuildInfo
|
||||
import Utility.Env
|
||||
|
||||
import System.Posix.Types
|
||||
|
@ -23,12 +23,12 @@ type CmdLine = String
|
|||
data ProcessInfo = ProcessInfo ProcessID CmdLine
|
||||
deriving (Show)
|
||||
|
||||
{- lsof is not in PATH on all systems, so SysConfig may have the absolute
|
||||
{- lsof is not in PATH on all systems, so BuildInfo may have the absolute
|
||||
- path where the program was found. Make sure at runtime that lsof is
|
||||
- available, and if it's not in PATH, adjust PATH to contain it. -}
|
||||
setup :: IO ()
|
||||
setup = do
|
||||
let cmd = fromMaybe "lsof" SysConfig.lsof
|
||||
let cmd = fromMaybe "lsof" BuildInfo.lsof
|
||||
when (isAbsolute cmd) $ do
|
||||
path <- getSearchPath
|
||||
let path' = takeDirectory cmd : path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue