blob: 35053c046df96b267ad19337b0fbb3f3e4b46d8c [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
Sasha Smundake8f4d6d2018-07-27 10:34:04 -070023#include "dep.h"
Dan Willemsenee57a3f2018-11-05 16:18:44 -080024#include "string_piece.h"
Shinichiro Hamajie9f7e672015-07-03 15:57:45 +090025
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090026using namespace std;
27
Shinichiro Hamaji5f86e1a2015-06-29 14:25:39 +090028class Evaluator;
29
Sasha Smundake8f4d6d2018-07-27 10:34:04 -070030void GenerateNinja(const vector<NamedDepNode>& 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_