diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-12-14 12:46:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-12-14 12:46:57 -0400 |
commit | 3a0bd261d9cfd395ed23ff43515523e6c6658c33 (patch) | |
tree | 9186c5daf386ba8e76c47ec869a737344a5a74d1 /Utility | |
parent | ac4b4a812da85b46e7d656b12d9ff5568ef706fd (diff) |
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.
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/CopyFile.hs | 10 | ||||
-rw-r--r-- | Utility/Gpg.hs | 4 | ||||
-rw-r--r-- | Utility/Lsof.hs | 6 | ||||
-rw-r--r-- | Utility/Url.hs | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/Utility/CopyFile.hs b/Utility/CopyFile.hs index 01c600504..4ad85b7db 100644 --- a/Utility/CopyFile.hs +++ b/Utility/CopyFile.hs @@ -14,7 +14,7 @@ module Utility.CopyFile ( ) where import Common -import qualified Build.SysConfig as SysConfig +import qualified BuildInfo data CopyMetaData -- Copy timestamps when possible, but no other metadata, and @@ -34,11 +34,11 @@ copyFileExternal meta src dest = do where #ifndef __ANDROID__ params = map snd $ filter fst - [ (SysConfig.cp_reflink_auto, Param "--reflink=auto") - , (allmeta && SysConfig.cp_a, Param "-a") - , (allmeta && SysConfig.cp_p && not SysConfig.cp_a + [ (BuildInfo.cp_reflink_auto, Param "--reflink=auto") + , (allmeta && BuildInfo.cp_a, Param "-a") + , (allmeta && BuildInfo.cp_p && not BuildInfo.cp_a , Param "-p") - , (not allmeta && SysConfig.cp_preserve_timestamps + , (not allmeta && BuildInfo.cp_preserve_timestamps , Param "--preserve=timestamps") ] #else diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs index 2ffb0add6..4af0067bb 100644 --- a/Utility/Gpg.hs +++ b/Utility/Gpg.hs @@ -10,7 +10,7 @@ module Utility.Gpg where import Common -import qualified Build.SysConfig as SysConfig +import qualified BuildInfo #ifndef mingw32_HOST_OS import System.Posix.Types import qualified System.Posix.IO @@ -35,7 +35,7 @@ newtype GpgCmd = GpgCmd { unGpgCmd :: String } - command was found at configure time, use it, or otherwise, "gpg". -} mkGpgCmd :: Maybe FilePath -> GpgCmd mkGpgCmd (Just c) = GpgCmd c -mkGpgCmd Nothing = GpgCmd (fromMaybe "gpg" SysConfig.gpg) +mkGpgCmd Nothing = GpgCmd (fromMaybe "gpg" BuildInfo.gpg) boolGpgCmd :: GpgCmd -> [CommandParam] -> IO Bool boolGpgCmd (GpgCmd cmd) = boolSystem cmd diff --git a/Utility/Lsof.hs b/Utility/Lsof.hs index e3ed709ec..ab80258b7 100644 --- a/Utility/Lsof.hs +++ b/Utility/Lsof.hs @@ -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 diff --git a/Utility/Url.hs b/Utility/Url.hs index 3ebbf4160..14a755f26 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -33,7 +33,7 @@ module Utility.Url ( import Common import Utility.Tmp -import qualified Build.SysConfig +import qualified BuildInfo import Network.URI import Network.HTTP.Types @@ -163,7 +163,7 @@ getUrlInfo url uo = case parseURIRelaxed url of sz <- getFileSize' f stat found (Just sz) Nothing Nothing -> dne - | Build.SysConfig.curl -> existscurl u + | BuildInfo.curl -> existscurl u | otherwise -> dne Nothing -> dne where @@ -281,7 +281,7 @@ download' quiet url file uo = do -} #ifndef __ANDROID__ wgetparams = concat - [ if Build.SysConfig.wgetunclutter && not quiet + [ if BuildInfo.wgetunclutter && not quiet then [Param "-nv", Param "--show-progress"] else [] , [ Param "--clobber", Param "-c", Param "-O"] |