Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add build flags to version output

  • Loading branch information...
commit 0155f1effa36005516a65126be3e1557f3cc87dd 1 parent 12bf81c
@joeyh authored
Showing with 53 additions and 0 deletions.
  1. +51 −0 BuildFlags.hs
  2. +2 −0  Command/Version.hs
View
51 BuildFlags.hs
@@ -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
2  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 " "

0 comments on commit 0155f1e

Please sign in to comment.
Something went wrong with that request. Please try again.