diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-01-13 16:35:43 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-01-13 16:35:43 +0000 |
commit | ff9af107d3aa1362af906972c490773eeaaad4b5 (patch) | |
tree | 1478366b613551a2744a3802b1c74f081bf2a013 /src | |
parent | 3495d153b317a0853abd7114f29b44517f7c3813 (diff) |
* Option `-B' to always show the output of builders, regardless of
verbosity level.
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/shared.cc | 2 | ||||
-rw-r--r-- | src/libstore/exec.cc | 2 | ||||
-rw-r--r-- | src/libstore/globals.cc | 2 | ||||
-rw-r--r-- | src/libstore/globals.hh | 4 |
4 files changed, 9 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 92349488e..24bedb3fb 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -51,6 +51,8 @@ static void initAndRun(int argc, char * * argv) string arg = *i; if (arg == "--verbose" || arg == "-v") verbosity = (Verbosity) ((int) verbosity + 1); + else if (arg == "--build-output" || arg == "-B") + buildVerbosity = lvlError; /* lowest */ else if (arg == "--help") { printHelp(); return; diff --git a/src/libstore/exec.cc b/src/libstore/exec.cc index 2adf03841..b25423b44 100644 --- a/src/libstore/exec.cc +++ b/src/libstore/exec.cc @@ -22,7 +22,7 @@ void runProgram(const string & program, { /* Create a log file. */ string logCommand = - verbosity >= lvlDebug + verbosity >= buildVerbosity ? "tee " + logFileName + " >&2" : "cat > " + logFileName; /* !!! auto-pclose on exit */ diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index e5d76ff48..b3c658c29 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -7,3 +7,5 @@ string nixStateDir = "/UNINIT"; string nixDBPath = "/UNINIT"; bool keepFailed = false; + +Verbosity buildVerbosity = lvlDebug; diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 3da294cc8..5d5e9efcf 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -2,6 +2,7 @@ #define __GLOBALS_H #include <string> +#include "util.hh" using namespace std; @@ -28,5 +29,8 @@ extern string nixDBPath; /* Whether to keep temporary directories of failed builds. */ extern bool keepFailed; +/* Verbosity level for build output. */ +extern Verbosity buildVerbosity; + #endif /* !__GLOBALS_H */ |