From 3a0bd261d9cfd395ed23ff43515523e6c6658c33 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 14 Dec 2017 12:46:57 -0400 Subject: 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. --- Build/BundledPrograms.hs | 22 +++++++++++----------- Build/Configure.hs | 2 +- Build/TestConfig.hs | 5 ++--- 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'Build') diff --git a/Build/BundledPrograms.hs b/Build/BundledPrograms.hs index 9e590bcf1..a6afdb763 100644 --- a/Build/BundledPrograms.hs +++ b/Build/BundledPrograms.hs @@ -11,7 +11,7 @@ module Build.BundledPrograms where import Data.Maybe -import Build.SysConfig as SysConfig +import BuildInfo {- Programs that git-annex uses, to include in the bundle. - @@ -28,7 +28,7 @@ extraBundledPrograms = catMaybes -- integrate with the system gpg-agent, etc. -- On Windows, gpg is bundled with git for windows. #ifndef mingw32_HOST_OS - [ SysConfig.gpg + [ BuildInfo.gpg #else [ #endif @@ -75,19 +75,19 @@ preferredBundledPrograms = catMaybes -- wget on OSX has been problematic, looking for certs in the wrong -- places. Don't ship it, use curl or the OSX's own wget if it has -- one. - , ifset SysConfig.wget "wget" + , ifset BuildInfo.wget "wget" #endif #endif - , SysConfig.lsof - , SysConfig.gcrypt + , BuildInfo.lsof + , BuildInfo.gcrypt #ifndef mingw32_HOST_OS -- All these utilities are included in git for Windows - , ifset SysConfig.curl "curl" - , SysConfig.sha1 - , SysConfig.sha256 - , SysConfig.sha512 - , SysConfig.sha224 - , SysConfig.sha384 + , ifset BuildInfo.curl "curl" + , BuildInfo.sha1 + , BuildInfo.sha256 + , BuildInfo.sha512 + , BuildInfo.sha224 + , BuildInfo.sha384 , Just "cp" #endif #ifdef linux_HOST_OS diff --git a/Build/Configure.hs b/Build/Configure.hs index f51ceef79..b40ca9250 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -1,4 +1,4 @@ -{- Checks system configuration and generates SysConfig.hs. -} +{- Checks system configuration and generates SysConfig. -} {-# OPTIONS_GHC -fno-warn-tabs #-} diff --git a/Build/TestConfig.hs b/Build/TestConfig.hs index f6ad2df6f..2f7213f46 100644 --- a/Build/TestConfig.hs +++ b/Build/TestConfig.hs @@ -1,4 +1,4 @@ -{- Tests the system and generates Build.SysConfig.hs. -} +{- Tests the system and generates SysConfig. -} {-# OPTIONS_GHC -fno-warn-tabs #-} @@ -42,12 +42,11 @@ instance Show Config where valuetype (MaybeBoolConfig _) = "Maybe Bool" writeSysConfig :: [Config] -> IO () -writeSysConfig config = writeFile "Build/SysConfig.hs" body +writeSysConfig config = writeFile "Build/SysConfig" body where body = unlines $ header ++ map show config ++ footer header = [ "{- Automatically generated. -}" - , "module Build.SysConfig where" , "" ] footer = [] -- cgit v1.2.3