blob: 89683e8cbd59a338663a9b1dbbc98f1e0aadca85 [file] [log] [blame]
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +09001// 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 Hamajia4bb7742015-07-31 11:27:30 +090018#include <time.h>
19
Shinichiro Hamajie9f7e672015-07-03 15:57:45 +090020#include <string>
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090021#include <vector>
22
Shinichiro Hamajie9f7e672015-07-03 15:57:45 +090023#include "string_piece.h"
24
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090025using namespace std;
26
Shinichiro Hamajif24ed142015-07-13 20:57:42 -070027struct DepNode;
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090028class Evaluator;
29
Shinichiro Hamajif9869fc2015-09-28 17:18:59 +090030void GenerateNinja(const vector<DepNode*>& nodes,
Shinichiro Hamaji43defe02015-07-11 07:06:43 +090031 Evaluator* ev,
Shinichiro Hamajia4bb7742015-07-31 11:27:30 +090032 const string& orig_args,
Shinichiro Hamaji36eeb752015-07-31 15:12:04 +090033 double start_time);
Shinichiro Hamajia4bb7742015-07-31 11:27:30 +090034
Shinichiro Hamaji8ef0ce52016-01-19 18:07:43 +090035string GetNinjaFilename();
36string GetNinjaShellScriptFilename();
37string GetNinjaStampFilename();
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090038
Shinichiro Hamajie9f7e672015-07-03 15:57:45 +090039// Exposed only for test.
Shinichiro Hamaji71966412015-07-11 03:12:59 +090040bool GetDepfileFromCommand(string* cmd, string* out);
Shinichiro Hamaji2c9fcbe2015-07-14 03:36:34 +090041size_t GetGomaccPosForAndroidCompileCommand(StringPiece cmdline);
Shinichiro Hamajie9f7e672015-07-03 15:57:45 +090042
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090043#endif // NINJA_H_