Skip to content

Commit

Permalink
ENH Display embed status with --version-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
unode committed Jan 31, 2017
1 parent 0b9879f commit ddde5a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions NGLess/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module Configuration
, bwaBin
, versionStr
, compilationDateStr
, embeddedStr
, dateStr
, setQuiet
) where
Expand Down Expand Up @@ -51,6 +52,13 @@ dateStr = "not released"
compilationDateStr :: String
compilationDateStr = __DATE__

embeddedStr :: String
#ifndef NO_EMBED_SAMTOOLS_BWA
embeddedStr = "Yes"
#else
embeddedStr = "No"
#endif

defaultBaseURL :: FilePath
defaultBaseURL = "http://vm-lux.embl.de/~coelho/ngless-data/"

Expand Down
4 changes: 2 additions & 2 deletions NGLess/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ modeExec (DownloadFileMode url local) = runNGLessIO "download a file" $

main = do
let metainfo = fullDesc <> footer foottext <> progDesc "ngless implement the NGLess language"
foottext = concat ["ngless v", versionStr, "(C) NGLess Authors 2013-2016"]
foottext = concat ["ngless v", versionStr, "(C) NGLess Authors 2013-2017"]
versioner =
(infoOption ("ngless v" ++ versionStr ++ " (release date: " ++ dateStr ++ ")")
(long "version" <> short 'V' <> help "print version and exit"))
<*>
(infoOption versionStr (long "version-short" <> help "print just version string (useful for scripting)"))
<*>
(infoOption ("ngless v" ++ versionStr ++ " (release date: " ++ dateStr ++ "; compilation date: " ++ compilationDateStr ++ ")")
(infoOption ("ngless v" ++ versionStr ++ " (release date: " ++ dateStr ++ "; compilation date: " ++ compilationDateStr ++ "; embedded binaries: " ++ embeddedStr ++ ")")
(long "version-debug" <> help "print detailed version information"))
<*>
(infoOption dateStr (long "date-short" <> help "print just release date string (useful for scripting)"))
Expand Down

0 comments on commit ddde5a8

Please sign in to comment.