Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 1 | // Copyright 2015 Google Inc. All rights reserved |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | #ifndef NINJA_H_ |
| 16 | #define NINJA_H_ |
| 17 | |
Shinichiro Hamaji | a4bb774 | 2015-07-31 11:27:30 +0900 | [diff] [blame] | 18 | #include <time.h> |
| 19 | |
Shinichiro Hamaji | e9f7e67 | 2015-07-03 15:57:45 +0900 | [diff] [blame] | 20 | #include <string> |
Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 21 | #include <vector> |
| 22 | |
Shinichiro Hamaji | e9f7e67 | 2015-07-03 15:57:45 +0900 | [diff] [blame] | 23 | #include "string_piece.h" |
| 24 | |
Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 25 | using namespace std; |
| 26 | |
Shinichiro Hamaji | f24ed14 | 2015-07-13 20:57:42 -0700 | [diff] [blame] | 27 | struct DepNode; |
Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 28 | class Evaluator; |
| 29 | |
Shinichiro Hamaji | f9869fc | 2015-09-28 17:18:59 +0900 | [diff] [blame] | 30 | void GenerateNinja(const vector<DepNode*>& nodes, |
Shinichiro Hamaji | 43defe0 | 2015-07-11 07:06:43 +0900 | [diff] [blame] | 31 | Evaluator* ev, |
Shinichiro Hamaji | a4bb774 | 2015-07-31 11:27:30 +0900 | [diff] [blame] | 32 | const string& orig_args, |
Shinichiro Hamaji | 36eeb75 | 2015-07-31 15:12:04 +0900 | [diff] [blame] | 33 | double start_time); |
Shinichiro Hamaji | a4bb774 | 2015-07-31 11:27:30 +0900 | [diff] [blame] | 34 | |
Shinichiro Hamaji | 8ef0ce5 | 2016-01-19 18:07:43 +0900 | [diff] [blame] | 35 | string GetNinjaFilename(); |
| 36 | string GetNinjaShellScriptFilename(); |
| 37 | string GetNinjaStampFilename(); |
Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 38 | |
Shinichiro Hamaji | e9f7e67 | 2015-07-03 15:57:45 +0900 | [diff] [blame] | 39 | // Exposed only for test. |
Shinichiro Hamaji | 7196641 | 2015-07-11 03:12:59 +0900 | [diff] [blame] | 40 | bool GetDepfileFromCommand(string* cmd, string* out); |
Shinichiro Hamaji | 2c9fcbe | 2015-07-14 03:36:34 +0900 | [diff] [blame] | 41 | size_t GetGomaccPosForAndroidCompileCommand(StringPiece cmdline); |
Shinichiro Hamaji | e9f7e67 | 2015-07-03 15:57:45 +0900 | [diff] [blame] | 42 | |
Shinichiro Hamaji | 5f86e1a | 2015-06-29 14:25:39 +0900 | [diff] [blame] | 43 | #endif // NINJA_H_ |