aboutsummaryrefslogtreecommitdiff
path: root/ninja.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-31 11:27:30 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-31 11:52:11 +0900
commita4bb77402230bcd3f296dbdccc1d4cda66d52a14 (patch)
tree87b42d0d55f80241d31e14329ad09d7d6fd000e9 /ninja.h
parentb58bb4b2c8df6984ff64db21e8bbad928d2fd33e (diff)
downloadkati-a4bb77402230bcd3f296dbdccc1d4cda66d52a14.tar.gz
[C++] Update ninja file only when necessary
As this feature is incomplete, this is enabled only with --regen flag. I decided not to use ninja's "generator" feature because we cannot create appropriate regeneration rules for globs in Android. There are some directory names which are also used as target names (e.g., "cts"). Ninja tries to build such targets to check if regeneration is necessary.
Diffstat (limited to 'ninja.h')
-rw-r--r--ninja.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ninja.h b/ninja.h
index 8846a2b..d7f9e32 100644
--- a/ninja.h
+++ b/ninja.h
@@ -15,6 +15,8 @@
#ifndef NINJA_H_
#define NINJA_H_
+#include <time.h>
+
#include <string>
#include <vector>
@@ -30,7 +32,11 @@ void GenerateNinja(const char* ninja_suffix,
const vector<DepNode*>& nodes,
Evaluator* ev,
bool build_all_targets,
- const string& orig_args);
+ const string& orig_args,
+ time_t start_time);
+
+bool NeedsRegen(const char* ninja_suffix,
+ const char* ninja_dir);
// Exposed only for test.
bool GetDepfileFromCommand(string* cmd, string* out);