summaryrefslogtreecommitdiffstats
path: root/src/ninja.cc
Commit message (Collapse)AuthorAgeFilesLines
* include version numberEvan Martin2012-05-081-2/+10
|
* No need to convert log_path to c-string. Two places.Thiago Farina2012-05-061-4/+3
| | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Merge pull request #274 from polrop/max_load_averageEvan Martin2012-04-281-2/+11
|\ | | | | Max load average
| * Add -l N option to limit the load average.Nicolas Despres2012-04-191-2/+11
| | | | | | | | | | | | | | This is similar to GNU make -l/--load-average option. It limits the number of job started if the load average exceed the given value. It can be very useful when running ninja on a continuous integration server where we want to use parallelism as much as possible without overloading the server.
* | suggest ninja -h when someone runs 'ninja help'Evan Martin2012-04-261-0/+2
| |
* | add support for -d explain to help debug why rules are runningScott Graham2012-04-131-2/+7
|/
* Include unistd.h where neededBen Boeckel2012-03-281-0/+1
|
* make urtle fit on 24-line terminalEvan Martin2012-03-061-1/+1
|
* Give a useful hint if the user runs "ninja clean" and there is no "clean" targetPeter Collingbourne2012-03-051-3/+7
|
* add an "urtle" toolEvan Martin2012-03-011-0/+28
|
* Do not reload the manifest if a restat cleans it while being rebuiltPeter Collingbourne2012-02-211-1/+6
|
* If a command fails, wait for all running commands to terminate before we doPeter Collingbourne2012-02-041-3/+5
| | | | | | | | | | | | | | | | | | Previously, if a command fails, the fate of the other child processes running in parallel was inadequately controlled. On POSIX platforms, the processes were orphaned. Normally they would run to completion, but were liable to being killed by a SIGPIPE. On Windows, the child processes would terminate with the parent. The cleanup-on-interrupt patch caused the SubprocessSet and Builder destructors to clean up after themselves by killing any running child processes and deleting their output files, making the behaviour more predictable and consistent across platforms. If the build is interrupted by the user, this is correct behaviour. But in the case where the build is stopped by a failed command, this would be inconsistent with user expectations. In the latter case, we now let any remaining child processes run to completion before leaving the main loop in Builder::Build.
* rearrange query/browse output to be more sensibleEvan Martin2012-01-241-18/+22
|
* only msvc needs these workaroundsPeter Kuemmel2012-01-221-1/+1
|
* windows: use _WIN32 define everywhereEvan Martin2012-01-221-5/+5
| | | | Rather than mixing use of WIN32 and _WIN32.
* windows: hash_map bucket count has different getterFrances Buontempo2012-01-111-1/+6
|
* include main hash load in -d stats outputEvan Martin2012-01-091-1/+8
|
* add a '-d stats' flag for detailed timingsEvan Martin2012-01-051-3/+28
| | | | | | 1) Add a system for recording detailed timing info of functions. 2) Add a -d flag for requesting debug info at runtime, with the above as the first user.
* factor out the main builder callEvan Martin2012-01-051-30/+36
|
* ninja.cc: Clear the rules/variables/state when reloading build.ninjaEvan Jones2012-01-051-20/+32
| | | | | This error was introduced in commit 4f6f015b. Previously, the reload goto label created a new State. This now does the same, manually.
* make Lexer::Error not emit trailing newlineEvan Martin2012-01-051-4/+1
| | | | | Now it's consistent with other errors. Fixes part of issue #187.
* allow spellcheck to be used with a vector of stringsEvan Martin2012-01-041-3/+4
|
* refactor tool list into a tableEvan Martin2012-01-041-102/+111
|
* don't attempt to build browse.* in bootstrap modeEvan Martin2012-01-041-1/+1
|
* switch the core ninja parser to use re2c for the lexerEvan Martin2011-12-291-3/+9
| | | | | | | | | - 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.
* remove huge indent from tools listEvan Martin2011-12-271-8/+8
|
* Fix the TODO in Rule class.Thiago Farina2011-12-241-2/+2
| | | | | | Move various data members to private section and provide accessors for them. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* print 'entering directory' when -C is usedEvan Martin2011-12-151-0/+4
| | | | | | This allows Emacs to track what directory you're in. Patch from Ami Fischman <fischman@chromium.org>.
* Fix 'list' tool.Nicolas Despres2011-12-091-1/+1
|
* make Rule::name_ privateEvan Martin2011-12-071-5/+5
|
* make Node::out_edges_ privateEvan Martin2011-12-071-4/+4
|
* make Node::in_edge_ privateEvan Martin2011-12-071-10/+10
|
* merge FileStat into NodeEvan Martin2011-12-071-8/+8
| | | | | | 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.
* add help output to clean toolEvan Martin2011-12-051-10/+16
|
* also spell-check the 'clean' tool; abort on misspellingEvan Martin2011-12-051-2/+3
|
* split out tool list into a separate subcommandEvan Martin2011-12-051-14/+27
| | | | | Fits the -h output on one screen again, and allows more whitespace in both the -h output and the tool list.
* disable the 'unused parameter' warningEvan Martin2011-12-051-1/+1
| | | | It was firing too often, and hadn't uncovered any bugs.
* Remove warning triggered by -Wextra on MinGW.Nicolas Despres2011-11-191-0/+4
|
* Add -Wextra warning flag.Nicolas Despres2011-11-191-2/+2
| | | | | | | Fix triggered warnings: - unused parameter - type qualifiers ignored on function return type - missing initializer for member
* Fix compilation warning with getopt() on MinGW.Nicolas Despres2011-11-191-1/+1
|
* Add spelling suggestions for four cases:Nico Weber2011-11-161-4/+30
| | | | | | | | | | | 1. For targets, when invoking ninja to build a target. 2. For targets, when doing a "query" command. 3. For command names. 4. For the subcommands of the "targets" command. Also change CmdTargets() to call LookupNode() instead of GetNode() -- since the result was checked for NULL, that's probably what was intended here originally.
* Add a "commands" toolPeter Collingbourne2011-11-041-6/+38
| | | | | | | | | | | | | | | This tool performs a post-order traversal of the build graph, starting from a list of targets specified on the command line, and for each build statement encountered, prints the evaluated command line. Use cases include: - Generating input for a tool which needs to know the full command line for every command invoked during a build. Many static analysis and indexing tools require this information. - Generating a build script which does not depend on Ninja. For example, such a script could be used by Ninja to bootstrap itself.
* Make the command line interface for the clean tool consistentPeter Collingbourne2011-10-151-22/+15
| | | | | | Since we have started using command line flags for the clean tool, it is inconsistent to keep the "target" and "rule" prefixes. Replace them with a "-r" flag with the same semantics as "rule".
* Implement generator rulesPeter Collingbourne2011-10-151-2/+21
| | | | | | | | | | | | | 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.
* pass extra flags into the toolEvan Martin2011-10-141-2/+5
|
* make CanonicalizePath report an error on empty pathEvan Martin2011-10-061-2/+4
| | | | Fixes part of issue 121, but the fix exposed a further issue.
* add syntax to build output from a given fileEvan Martin2011-09-221-0/+23
| | | | e.g. "ninja src/graph.cc^" builds the object file generated from that input
* command line supports multiple targetsEvan Martin2011-09-221-2/+2
|
* make options constEvan Martin2011-09-221-6/+6
|
* stylistic cleanupsEvan Martin2011-09-221-19/+20
|