From b04f62a962b874d1e3050224607c5431879c8f09 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Mar 2014 16:59:38 -0400 Subject: [PATCH] make configure -Wall clean --- Build/Configure.hs | 6 ------ Build/DesktopFile.hs | 2 -- Build/TestConfig.hs | 2 -- Setup.hs | 11 +++++------ 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Build/Configure.hs b/Build/Configure.hs index 593e3ada79..116a44215f 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -3,20 +3,14 @@ module Build.Configure where import System.Directory -import Data.List -import System.Process import Control.Applicative -import System.FilePath import System.Environment (getArgs) -import Data.Maybe import Control.Monad.IfElse import Control.Monad -import Data.Char import Build.TestConfig import Build.Version import Utility.SafeCommand -import Utility.Monad import Utility.ExternalSHA import Utility.Env import qualified Git.Version diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs index 9f4ba5992c..6a5838f810 100644 --- a/Build/DesktopFile.hs +++ b/Build/DesktopFile.hs @@ -24,9 +24,7 @@ import System.Directory import System.Environment #ifndef mingw32_HOST_OS import System.Posix.User -import System.Posix.Files #endif -import System.FilePath import Data.Maybe systemwideInstall :: IO Bool diff --git a/Build/TestConfig.hs b/Build/TestConfig.hs index 8628ebe58f..e55641fb06 100644 --- a/Build/TestConfig.hs +++ b/Build/TestConfig.hs @@ -7,8 +7,6 @@ import Utility.Monad import Utility.SafeCommand import System.IO -import System.Cmd -import System.Exit import System.FilePath import System.Directory diff --git a/Setup.hs b/Setup.hs index 0a187bd953..470a0d3db8 100644 --- a/Setup.hs +++ b/Setup.hs @@ -16,15 +16,14 @@ import System.Directory import qualified Build.DesktopFile as DesktopFile import qualified Build.Configure as Configure +main :: IO () main = defaultMainWithHooks simpleUserHooks - { preConf = configure + { preConf = \_ _ -> do + Configure.run Configure.tests + return (Nothing, []) , postInst = myPostInst } -configure _ _ = do - Configure.run Configure.tests - return (Nothing, []) - myPostInst :: Args -> InstallFlags -> PackageDescription -> LocalBuildInfo -> IO () myPostInst _ (InstallFlags { installVerbosity }) pkg lbi = do installGitAnnexShell dest verbosity pkg lbi @@ -57,7 +56,7 @@ installManpages copyDest verbosity pkg lbi = manpages = ["git-annex.1", "git-annex-shell.1"] installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () -installDesktopFile copyDest verbosity pkg lbi = +installDesktopFile copyDest _verbosity pkg lbi = DesktopFile.install $ dstBinDir "git-annex" where dstBinDir = bindir $ absoluteInstallDirs pkg lbi copyDest