summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorMohamed Bamakhrama <mohamed.bamakhrama@intel.com>2015-03-01 23:57:33 (GMT)
committerMohamed Bamakhrama <mohamed.bamakhrama@intel.com>2015-03-01 23:57:33 (GMT)
commitf8f293730de2e12f6575c5d890a16504340f75fe (patch)
treef4544bb3ab1fea478c57a2892616a5761c5769f6 /src/graph.h
parentc406d1c8adfedc1982e2c08ab95d581f65eb65de (diff)
downloadNinja-f8f293730de2e12f6575c5d890a16504340f75fe.zip
Ninja-f8f293730de2e12f6575c5d890a16504340f75fe.tar.gz
Ninja-f8f293730de2e12f6575c5d890a16504340f75fe.tar.bz2
Allow scoping rules through subninja
Ninja didn't support scoping rules through subninja and assumed a unique rule name in the whole namespace. With this change, this behavior is changed to allow scoping rules. Two rules can have the same name if they belong to two different scopes. However, two rules can NOT have the same name in the same scope.
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/graph.h b/src/graph.h
index 9aada38..9eafc05 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -121,27 +121,6 @@ private:
int id_;
};
-/// An invokable build command and associated metadata (description, etc.).
-struct Rule {
- explicit Rule(const string& name) : name_(name) {}
-
- const string& name() const { return name_; }
-
- typedef map<string, EvalString> Bindings;
- void AddBinding(const string& key, const EvalString& val);
-
- static bool IsReservedBinding(const string& var);
-
- const EvalString* GetBinding(const string& key) const;
-
- private:
- // Allow the parsers to reach into this object and fill out its fields.
- friend struct ManifestParser;
-
- string name_;
- map<string, EvalString> bindings_;
-};
-
/// An edge in the dependency graph; links between Nodes using Rules.
struct Edge {
Edge() : rule_(NULL), env_(NULL), outputs_ready_(false), deps_missing_(false),