From 07ca31c4725e1b62863ec93a6d03f2e13c41b3fa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 9 Mar 2013 14:57:23 -0400 Subject: add build flags to version output --- BuildFlags.hs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ Command/Version.hs | 2 ++ 2 files changed, 53 insertions(+) create mode 100644 BuildFlags.hs diff --git a/BuildFlags.hs b/BuildFlags.hs new file mode 100644 index 000000000..f37782c97 --- /dev/null +++ b/BuildFlags.hs @@ -0,0 +1,51 @@ +{- git-annex build flags reporting + - + - Copyright 2013 Joey Hess + - + - 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 + ] diff --git a/Command/Version.hs b/Command/Version.hs index 907811e75..e066bba5d 100644 --- a/Command/Version.hs +++ b/Command/Version.hs @@ -11,6 +11,7 @@ import Common.Annex import Command import qualified Build.SysConfig as SysConfig import Annex.Version +import BuildFlags def :: [Command] def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $ @@ -28,6 +29,7 @@ start = do putStrLn $ "default repository version: " ++ defaultVersion putStrLn $ "supported repository versions: " ++ vs supportedVersions putStrLn $ "upgrade supported from repository versions: " ++ vs upgradableVersions + putStrLn $ "build flags: " ++ unwords buildFlags stop where vs = join " " -- cgit v1.2.3