summaryrefslogtreecommitdiffstats
path: root/src/graph.h
Commit message (Collapse)AuthorAgeFilesLines
* rearrange handling of builtin bindings to make rules simplerEvan Martin2012-12-291-33/+10
| | | | | Now, a 'build' block can override any special binding like 'command' or 'description' if it needs to.
* wrap some overlong linesEvan Martin2012-12-291-1/+1
|
* update a commentEvan Martin2012-12-211-6/+3
|
* Make Edge->pool() a pointer like it should have beenRobert Iannucci2012-11-301-1/+1
|
* block parse method doneRobert Iannucci2012-11-101-0/+1
|
* and some basic implementationRobert Iannucci2012-11-091-0/+2
|
* stub out an api and de-constify PoolRobert Iannucci2012-11-091-0/+2
|
* remove unfortunate header dependencyEvan Martin2012-09-041-1/+0
| | | | This was temporarily added, and now it can be removed.
* clarify setterEvan Martin2012-09-041-1/+3
|
* move BuildLog to DependencyScanEvan Martin2012-09-041-5/+13
| | | | | | | The build log is needed in computing whether an edge is dirty, so I think it belongs here. (It's a bit weird that Builder needs to reach into it to record completed commands, maybe it will become cleaner with more thought.)
* remove a redundant arg to RecomputeOutputDirtyEvan Martin2012-09-021-2/+1
|
* split out dirty recomputation logic from Edge classEvan Martin2012-09-021-17/+32
| | | | | | | | | | Rather than passing States and DiskInterfaces through all the calls, put the necessary ambient information in a new DependencyScan object and move the code accordingly. Note: I didn't move the source location of the functions to preserve history, though this does result in a sort of weird order for the functions in graph.cc.
* windows: fix size_t<->int conversions in ninja.exeEvan Martin2012-08-101-4/+4
|
* Improving Edge::Dump, introducing Node::DumpMaxim Kalaev2012-06-281-1/+3
| | | | | | | - Edge::Dump could crash if called while inputs_ is being extended - Node::Dump prints Node attributes, in-edge and lists of out-edges - Dump functions now accept "prefix" parameter, printed along with the object for easier orientation. For example, edge->Dump("Re-reading deps files").
* views: Mark single-argument constructors as explicit.Thiago Farina2012-05-061-3/+7
| | | | | | | | This was reported by cpplint as: python ~/depot_tools/cpplint.py 2>&1 | grep -v "Done processing" | grep explicit Signed-off-by: Thiago Farina <tfarina@chromium.org>
* add support for -d explain to help debug why rules are runningScott Graham2012-04-131-1/+2
|
* fix some public/private errors in rspfile patchEvan Martin2012-02-231-0/+2
|
* Merge pull request #217 from PetrWolf/masterEvan Martin2012-02-231-1/+16
|\ | | | | Response files
| * Add comments, remove unwanted whitespace changePetr Wolf2012-02-101-0/+10
| |
| * Response filesunknown2012-02-091-1/+6
| |
* | Fix the TODO in graph.h.Thiago Farina2012-02-161-2/+1
|/ | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* convert all time_t to a new TimeStamp typeEvan Martin2012-01-051-4/+4
|
* Fix warning about class previously declared as struct.Nicolas Despres2012-01-031-1/+1
| | | | Reported by clang++.
* switch the core ninja parser to use re2c for the lexerEvan Martin2011-12-291-2/+2
| | | | | | | | | - Delete the old "Tokenizer" code. - Write separate tests for the lexer distinct from the parser. - Switch the parser to use the new code. - New lexer error output has file:line numbers so e.g. Emacs can jump your editor to the syntax error. - The EvalEnv ($-interpolation) code is now part of the lexer as well.
* Follow up fix to commit 32bf74f (Fix the TODO in Rule class.)Thiago Farina2011-12-241-0/+1
| | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Fix the TODO in Rule class.Thiago Farina2011-12-241-13/+15
| | | | | | Move various data members to private section and provide accessors for them. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* make Rule::generator_ and restat_ privateEvan Martin2011-12-071-2/+10
|
* make Rule::name_ privateEvan Martin2011-12-071-0/+7
|
* remove unused functionEvan Martin2011-12-071-3/+0
|
* make Node::out_edges_ privateEvan Martin2011-12-071-3/+4
|
* make Node::in_edge_ privateEvan Martin2011-12-071-1/+7
|
* make Node::dirty_ privateEvan Martin2011-12-071-5/+11
|
* merge FileStat into NodeEvan Martin2011-12-071-18/+30
| | | | | | The two were always one-to-one anyway. I started adding accessors to FileStat and then realized most users wanted them on Node and that forwarding them through was silly.
* refactor to remove Node::ready()Evan Martin2011-12-071-1/+3
|
* add and use getter for Edge::rule_Evan Martin2011-12-071-0/+1
|
* Factor out Edge::EvaluateDepFilePeter Collingbourne2011-12-061-0/+1
|
* refactor RecomputeOutputDirty to return true/false for dirtyEvan Martin2011-12-041-2/+10
| | | | | | | | | Rather than taking whether the edge is dirty as an input, instead only consider the arguments and return true/false, allowing the caller to decide what to do with that information. (In the restat case we were faking out the environment to get particular behavior for this.) Should have no side effects, but this is part of fixing issue 148.
* Implement restat rulesPeter Collingbourne2011-10-241-2/+2
| | | | | | | | | | | | | | | | | A restat rule is a rule which is capable of pruning the build tree depending on the timestamps of its outputs before and after a build. After a restat rule is rebuilt, Ninja will re-stat each output file to obtain its current timestamp. If the timestamp is unchanged from when Ninja initially stat'ed the file before starting the build, Ninja will mark that output file as clean, and recursively for each reverse dependency of the output file, recompute its dirty status. Ninja then stores the most recent timestamp of any input file in the build log entry associated with the output file. This timestamp will be treated by future invocations of Ninja as the output file's modification time instead of the output file's actual modification time for the purpose of deciding whether it is dirty (but not whether its reverse dependencies are dirty).
* Split Node::dirty_ into two flags: Node::dirty_ and Edge::outputs_ready_Peter Collingbourne2011-10-181-16/+23
| | | | | dirty_ is intended to remain static during the build (unless a restat occurs), while outputs_ready_ reflects the dynamic state of the build.
* Implement generator rulesPeter Collingbourne2011-10-151-1/+2
| | | | | | | | | | | | | Introduce a rule attribute "generator" which, if present, specifies that this rule is used to re-invoke the generator program. Files built using generator rules are treated specially in two ways: firstly, they will not be rebuilt if the command line changes; and secondly, they are not cleaned by default. A command line flag "-g" is introduced for the clean tool, which causes it to remove generator files. Fixes issue #102.
* add doxygen-compatibile comments to most classesEvan Martin2011-04-291-2/+10
|
* Move CanonicalizePath into util.h so it can be shared by the other modules.Thiago Farina2011-04-151-3/+0
| | | | | | Also add util_test.cc and move the CanonicalizePathTest into there. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* canonicalize paths loaded from depfilesEvan Martin2011-03-071-0/+3
| | | | | | | | | If a C file #includes "../foo.cc", then gcc will emit paths like "bar/../foo.cc" into the dependency file; canonicalize these when we load the file. Add a test module for testing the graph dirty recomputation directly, without all the build classes around it.
* add copyrightsEvan Martin2011-02-061-0/+14
|
* cleanup phony testingEvan Martin2011-02-051-0/+2
|
* remove bottom-up dirtyingEvan Martin2011-01-081-4/+1
|
* split out graph into its own headerEvan Martin2011-01-081-0/+109