blob: d829b105c2dd8c28b5ba6dd8f54bd76c780b0787 [file] [log] [blame]
Shinichiro Hamaji776ca302015-06-06 03:52:48 +09001#ifndef DEP_H_
2#define DEP_H_
3
4#include <string>
5#include <unordered_map>
6#include <vector>
7
8#include "loc.h"
9#include "string_piece.h"
10
11class Rule;
12class Value;
13class Vars;
14
15struct DepNode {
16 DepNode(StringPiece output, bool is_phony);
17
18 StringPiece output;
19 vector<Value*> cmds;
20 vector<DepNode*> deps;
21 vector<DepNode*> parents;
22 bool has_rule;
23 bool is_order_only;
24 bool is_phony;
25 vector<StringPiece> actual_inputs;
26 Vars* target_specific_vars;
27 Loc loc;
28};
29
30void InitDepNodePool();
31void QuitDepNodePool();
32
33void MakeDep(const vector<Rule*>& rules,
34 const Vars& vars,
35 const unordered_map<StringPiece, Vars*>& rule_vars,
36 const vector<StringPiece>& targets,
37 vector<DepNode*>* nodes);
38
39#endif // DEP_H_