Makefile now builds using cabal, taking advantage of cabal's automatic detection of appropriate build flags.

The only thing lost is ./ghci

Speed: make fast used to take 20 seconds here, when rebuilding from
touching Command/Unused.hs. With cabal, it's 29 seconds.
This commit is contained in:
Joey Hess 2013-02-27 02:39:22 -04:00
parent 32aee1bb3e
commit cbd53b4a8c
18 changed files with 56 additions and 141 deletions

View file

@ -31,14 +31,12 @@ import Data.Maybe
import ADNS.Resolver
import Data.Either
#else
#ifndef WITH_HOST
#ifdef WITH_DNS
import qualified Network.DNS.Lookup as DNS
import Network.DNS.Resolver
import qualified Data.ByteString.UTF8 as B8
#endif
#endif
#endif
newtype SRV = SRV String
deriving (Show, Eq)
@ -64,9 +62,6 @@ lookupSRV (SRV srv) = initResolver [] $ \resolver -> do
resolveSRV resolver srv
return $ either (\_ -> []) id r
#else
#ifdef WITH_HOST
lookupSRV = lookupSRVHost
#else
#ifdef WITH_DNS
lookupSRV (SRV srv) = do
seed <- makeResolvSeed defaultResolvConf
@ -83,7 +78,6 @@ lookupSRV (SRV srv) = do
lookupSRV = lookupSRVHost
#endif
#endif
#endif
lookupSRVHost :: SRV -> IO [HostPort]
lookupSRVHost (SRV srv) = catchDefaultIO [] $