add build flags to version output

This commit is contained in:
Joey Hess 2013-03-09 14:57:23 -04:00
parent 12bf81cd2c
commit 0155f1effa
2 changed files with 53 additions and 0 deletions

51
BuildFlags.hs Normal file
View file

@ -0,0 +1,51 @@
{- git-annex build flags reporting
-
- Copyright 2013 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module BuildFlags where
buildFlags :: [String]
buildFlags = filter (not . null)
[ ""
#ifdef WITH_ASSISTANT
, "Assistant"
#endif
#ifdef WITH_WEBAPP
, "Webapp"
#endif
#ifdef WITH_PAIRING
, "Pairing"
#endif
#ifdef WITH_TESTSUITE
, "Testsuite"
#endif
#ifdef WITH_S3
, "S3"
#endif
#ifdef WITH_WEBDAV
, "WebDAV"
#endif
#ifdef WITH_INOTIFY
, "Inotify"
#endif
#ifdef WITH_FSEVENTS
, "FsEvents"
#endif
#ifdef WITH_KQUEUE
, "Kqueue"
#endif
#ifdef WITH_DBUS
, "DBus"
#endif
#ifdef WITH_XMPP
, "XMPP"
#endif
#ifdef WITH_DNS
, "DNS"
#endif
]

View file

@ -11,6 +11,7 @@ import Common.Annex
import Command import Command
import qualified Build.SysConfig as SysConfig import qualified Build.SysConfig as SysConfig
import Annex.Version import Annex.Version
import BuildFlags
def :: [Command] def :: [Command]
def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $ def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $
@ -28,6 +29,7 @@ start = do
putStrLn $ "default repository version: " ++ defaultVersion putStrLn $ "default repository version: " ++ defaultVersion
putStrLn $ "supported repository versions: " ++ vs supportedVersions putStrLn $ "supported repository versions: " ++ vs supportedVersions
putStrLn $ "upgrade supported from repository versions: " ++ vs upgradableVersions putStrLn $ "upgrade supported from repository versions: " ++ vs upgradableVersions
putStrLn $ "build flags: " ++ unwords buildFlags
stop stop
where where
vs = join " " vs = join " "