49 Commits

Author SHA1 Message Date
Evan Martin
34b46f28c5 drop the "rules" tool completely
I had already broken this earlier, but the refactor of variable handling
broke it completely.
2012-12-29 12:34:25 -08:00
Evan Martin
94ea3e9d08 update docs to clarify scoping rules 2012-12-29 12:34:25 -08:00
yannicklm
6943f05372 NINJA_STATUS: add support of %p for percentage 2012-12-14 22:26:39 +01:00
Robert Iannucci
3311c32f3e Improve the manual documentation 2012-11-29 16:28:44 -08:00
Robert Iannucci
f2eeca20f4 add docs 2012-11-09 21:55:01 -08:00
Evan Martin
49dd59d707 document that \r and \t are disallowed
Finishes #394.
2012-08-10 10:58:36 -07:00
Evan Martin
f7a22e3bc9 Merge pull request #351 from syntheticpp/rate
print edges per second
2012-07-27 10:59:19 -07:00
Evan Martin
183a2d8f19 fix manual to reflect reality of depfile cleaning
Fixes issue #362.
2012-07-17 09:00:06 -07:00
Peter Kuemmel
c0c5ef9bff print edges per second
prints the rate of finished edges per second to the console,
for instance with NINJA_STATUS="[%s/%t %o(%c)/s] ":

[132/1922 16.1(14)/s]

16.1 is the average for all processed files (here 132 since start)
14 is the average of the last n files while n is the number specifies by
-j (or its default)
2012-07-15 22:22:27 +02:00
Scott Graham
e0dd93a258 add $in_newline 2012-06-15 14:48:43 -07:00
Nico Weber
0ad33b9198 Minor spelling fixes in manual. 2012-05-12 18:27:49 -07:00
Evan Martin
d73af72473 clarify what i mean by "policy" 2012-05-08 09:07:04 -07:00
Evan Martin
054ff2b69b mention reactos 2012-05-04 16:07:37 -07:00
Evan Martin
c95042dd0a mention platform support 2012-05-04 16:04:59 -07:00
Evan Martin
cca1a4b07b add $: to docs 2012-05-01 20:37:24 -07:00
Hiroyuki Iwatsuki
41ab151f60 Fix a link to Google+. 2012-04-28 10:57:06 +09:00
Evan Martin
9b8e55d235 rearrange the manual
My goals were:
- shorten the introductory text, hopefully quickly answering the "why?"
  question first.
- put the information relevant to ninja users (e.g. people using CMake
  who don't especially care about ninja) next, at the beginning.
- consolidate the "generating ninja files" text below.
2012-04-27 09:08:22 -07:00
Evan Martin
e3b98c7fe4 doc encoding support 2012-04-25 21:55:32 -07:00
Evan Martin
27fb0d1e8c Merge pull request #278 from tychoish/master
Minor Documentation Tweak
2012-04-25 21:22:21 -07:00
Nicolas Despres
34ad4de664 Introduce NINJA_STATUS env var for customization.
Some people may want to display different relevant information about
the progress of the build.  Also it can be usefull to debug jobs
allocation.
2012-04-24 11:14:28 +02:00
tycho garen
0e34c422a2 docs: clarifying that there can be only one command per rule 2012-04-23 22:26:35 -04:00
Evan Martin
523734f2cf adjust rspfile docs to properly render 2012-03-06 10:15:19 -08:00
unknown
af070e5208 Response files 2012-02-09 22:23:35 +01:00
Nicolas Despres
4dead2ff9c Fix typo in manual. 2011-12-30 14:39:01 +01:00
Evan Martin
684e4447ce move some docs to home page 2011-12-27 23:24:46 -08:00
Evan Martin
1227d8f953 link to blog post in docs 2011-12-27 21:43:39 -08:00
Evan Martin
7a6eb9c534 rearrange manual to centralize quoting rules 2011-12-20 10:54:10 -08:00
Evan Martin
51cab0b9db move build/install to README 2011-12-06 09:33:55 -08:00
Evan Martin
fd40d87dc0 remove reference to nonexistent file 2011-12-05 13:30:38 -08:00
Evan Martin
d7229a6927 prettify manual for tools 2011-12-05 13:22:09 -08:00
Evan Martin
a988cb23ae minor manual touchups 2011-12-05 12:59:41 -08:00
Peter Collingbourne
4836a86466 Add a "commands" tool
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.
2011-11-04 19:10:31 +00:00
Peter Collingbourne
0efbbbf67a Implement restat rules
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).
2011-10-24 01:16:38 +01:00
Peter Collingbourne
6fc220b8b9 Implement Make-style order-only dependencies
Previously, the implementation of order-only dependencies differed
between Make and Ninja in two important ways:

 1) If the order-only dependency existed but was out of date, it
    would never be rebuilt, whereas Make would always rebuild out of
    date order-only dependencies.

 2) If the order-only dependency did not exist, it would cause
    its reverse dependencies to always build, whereas Make would only
    rebuild a file if a non-order-only dependency was out of date.

A key distinction between Ninja and Make as seen through the above
two points was that in Ninja, order-only dependencies cared about
whether the target as a file exists (so perhaps a better name for
the old semantics would have been "missing-only dependencies").

These differences made it impossible to introduce an order-only
dependency on an always out-of-date (i.e. missing) target without
also causing the depender and its reverse dependencies to rebuild
unnecessarily on every build.  Build systems which must perform some
action (such as logging the build start time, or printing a message)
at the start of every build typically implement this by adding to
every target an order-only dependency which performs this action,
which would have forced an entire rebuild on every invocation of
Ninja under the old semantics.

This commit causes Ninja to conform to the Make-style behaviour.
2011-10-24 01:16:24 +01:00
Peter Collingbourne
5a7151a8a6 Make the command line interface for the clean tool consistent
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".
2011-10-15 20:37:11 +01:00
Peter Collingbourne
7cf2bdffe2 Implement generator rules
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.
2011-10-15 20:23:50 +01:00
Peter Collingbourne
f14039d44a Consider missing phony targets with no dependencies out of date
Commit 639c8f0 ("don't mark phony edges dirty if none of their
inputs are dirty") modified the behaviour of the "phony" built-in
rule.  Previously, when the output file was missing, it was marked
as dirty.  After 639c8f0, it was always marked as clean unless one
of the dependencies was dirty.  The depfile mechanism uses the old
behaviour of "phony" to rebuild an object file if any of the headers
were missing.

Restore the old "phony" behaviour only for the case where the build
statement has no dependencies.  This is slightly inconsistent, but I
can't really see any other use case for an alias of nothing.  Also,
document this behaviour.
2011-09-14 03:01:12 +01:00
Evan Martin
2e8d3c48c4 Merge pull request #91 from pcc/reload-manifest
Support for rebuilding and reloading manifest files
2011-09-06 14:01:17 -07:00
Evan Martin
873abda301 don't use "all" in the phony example, because we now have "default" 2011-09-06 12:52:22 -07:00
Evan Martin
bccfd9fec3 link to github in docs 2011-09-06 12:51:33 -07:00
Evan Martin
f1687612c6 update docs on other build system integration with recent news 2011-09-06 12:11:08 -07:00
Peter Collingbourne
85740c2ddb Support for rebuilding and reloading manifest files
This introduces support for rebuilding the top-level manifest file
using a provided build statement, and reloading it before building
the user-requested targets.
2011-09-03 23:05:35 +01:00
Peter Collingbourne
7a6c9d480d Implement default target statements
This introduces a new directive, the default target statement, which
may be used to control the list of targets built by default (i.e. if
no target is named on the command line).
2011-08-31 17:51:05 +01:00
Evan Martin
fd6e3582a3 add docs on variable expansion 2011-06-25 12:54:46 -07:00
Evan Martin
998aaac2ab mention python module in the docs 2011-06-25 12:54:46 -07:00
Evan Martin
511613ce25 expand $$ as $ 2011-05-26 20:15:05 -07:00
Evan Martin
55fd4232d3 switch to $ as the line continuation char
This means that backslashes are passed through without interpretation,
allowing us to support Windows paths without worrying about escaping.
2011-05-26 19:35:39 -07:00
Evan Martin
28eb6b792d update instructions on using gyp; mention cmake 2011-05-17 15:27:00 -07:00
Evan Martin
17a0335519 move various doc files out of top-level directory 2011-05-14 16:11:41 -07:00