aboutsummaryrefslogtreecommitdiffstats
path: root/fileutil.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-31 16:47:56 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-08-04 16:06:41 +0900
commitc9b0acaf0a11eee6b0152c51d9633758ad8c662c (patch)
tree006837ec89343f00666c0bc9fc5bedacb96e220e /fileutil.h
parent39970310a89b06bc59c5d35e82bbb3c12109ed31 (diff)
downloadplatform_build_kati-c9b0acaf0a11eee6b0152c51d9633758ad8c662c.tar.gz
platform_build_kati-c9b0acaf0a11eee6b0152c51d9633758ad8c662c.tar.bz2
platform_build_kati-c9b0acaf0a11eee6b0152c51d9633758ad8c662c.zip
[C++] Re-generate ninja file when a file is added/removed
With this change, we store the results of file list related commands in .kati_stamp. If one of them has been changed, we re-generate ninja file. Currently, this check is slow. We need to check the timestamp of directories first like what we are doing for $(wildcard).
Diffstat (limited to 'fileutil.h')
-rw-r--r--fileutil.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fileutil.h b/fileutil.h
index b282603..ff7b9e0 100644
--- a/fileutil.h
+++ b/fileutil.h
@@ -27,7 +27,14 @@ using namespace std;
bool Exists(StringPiece f);
double GetTimestamp(StringPiece f);
-int RunCommand(const string& shell, const string& cmd, bool redirect_stderr,
+enum struct RedirectStderr {
+ NONE,
+ STDOUT,
+ DEV_NULL,
+};
+
+int RunCommand(const string& shell, const string& cmd,
+ RedirectStderr redirect_stderr,
string* out);
void GetExecutablePath(string* path);