platform/upstream/ninja.git
12 years agogitignore exe files
Evan Martin [Tue, 20 Dec 2011 19:44:08 +0000 (11:44 -0800)]
gitignore exe files

12 years agofactor out windows perror equivalent
Evan Martin [Tue, 20 Dec 2011 19:43:57 +0000 (11:43 -0800)]
factor out windows perror equivalent

12 years agoinline gtest to simplify windows build
Evan Martin [Tue, 20 Dec 2011 19:38:56 +0000 (11:38 -0800)]
inline gtest to simplify windows build

12 years agofix bad merge
Evan Martin [Tue, 20 Dec 2011 19:10:26 +0000 (11:10 -0800)]
fix bad merge

12 years agofix mingw cross-compile
Evan Martin [Tue, 20 Dec 2011 19:01:04 +0000 (11:01 -0800)]
fix mingw cross-compile

12 years agorearrange manual to centralize quoting rules
Evan Martin [Tue, 20 Dec 2011 18:54:10 +0000 (10:54 -0800)]
rearrange manual to centralize quoting rules

12 years agoremove weird accidental double-return
Evan Martin [Tue, 20 Dec 2011 18:40:40 +0000 (10:40 -0800)]
remove weird accidental double-return

Surprised this isn't a compiler warning.

12 years agoMerge pull request #146 from nornagon/escape-spaces
Evan Martin [Tue, 20 Dec 2011 18:33:42 +0000 (10:33 -0800)]
Merge pull request #146 from nornagon/escape-spaces

Escape spaces

12 years agoadjust depfile test now that parsing is more lax
Evan Martin [Mon, 19 Dec 2011 19:18:29 +0000 (11:18 -0800)]
adjust depfile test now that parsing is more lax

12 years agohandle backslashes and isolated colons in depfile parser
Evan Martin [Mon, 19 Dec 2011 19:14:35 +0000 (11:14 -0800)]
handle backslashes and isolated colons in depfile parser

The logic was wrong if the input looked like
  foo : bar baz
with a space before the colon.

Test from Frances <frances.buontempo@gmail.com>.

12 years agosplit out depfile parser tests into new file
Evan Martin [Mon, 19 Dec 2011 18:59:29 +0000 (10:59 -0800)]
split out depfile parser tests into new file

12 years agoprint 'entering directory' when -C is used
Evan Martin [Thu, 15 Dec 2011 20:24:34 +0000 (12:24 -0800)]
print 'entering directory' when -C is used

This allows Emacs to track what directory you're in.

Patch from Ami Fischman <fischman@chromium.org>.

12 years agoMerge pull request #153 from polrop/fix-bootstrap
Evan Martin [Fri, 9 Dec 2011 22:49:30 +0000 (14:49 -0800)]
Merge pull request #153 from polrop/fix-bootstrap

Fix bootstrap

12 years agoFix 'list' tool.
Nicolas Despres [Fri, 9 Dec 2011 15:45:25 +0000 (16:45 +0100)]
Fix 'list' tool.

12 years agoFactor source file listing code in bootstrap script.
Nicolas Despres [Fri, 9 Dec 2011 10:05:37 +0000 (11:05 +0100)]
Factor source file listing code in bootstrap script.

12 years agoFix bootstrap script.
Nicolas Despres [Fri, 9 Dec 2011 09:59:35 +0000 (10:59 +0100)]
Fix bootstrap script.

- Make regexp more robust.
- Exclude .in.cc files.

12 years agoUse getter instead of private member.
Nicolas Despres [Fri, 9 Dec 2011 09:45:05 +0000 (10:45 +0100)]
Use getter instead of private member.

Fix a compilation error.

12 years agoperformance testing note
Evan Martin [Wed, 7 Dec 2011 20:30:59 +0000 (12:30 -0800)]
performance testing note

12 years agoremove makefile parsing code, use depfile code instead
Evan Martin [Wed, 7 Dec 2011 20:14:30 +0000 (12:14 -0800)]
remove makefile parsing code, use depfile code instead

12 years agouse re2c to parse depfiles
Evan Martin [Wed, 7 Dec 2011 20:08:00 +0000 (12:08 -0800)]
use re2c to parse depfiles

12 years agorefactor EdgeEnv
Evan Martin [Wed, 7 Dec 2011 18:01:00 +0000 (10:01 -0800)]
refactor EdgeEnv

12 years agomake Rule::generator_ and restat_ private
Evan Martin [Wed, 7 Dec 2011 17:51:14 +0000 (09:51 -0800)]
make Rule::generator_ and restat_ private

12 years agomake Rule::name_ private
Evan Martin [Wed, 7 Dec 2011 17:43:29 +0000 (09:43 -0800)]
make Rule::name_ private

12 years agoremove unused function
Evan Martin [Wed, 7 Dec 2011 17:41:07 +0000 (09:41 -0800)]
remove unused function

12 years agomake Node::out_edges_ private
Evan Martin [Wed, 7 Dec 2011 17:38:10 +0000 (09:38 -0800)]
make Node::out_edges_ private

12 years agomake Node::in_edge_ private
Evan Martin [Wed, 7 Dec 2011 17:35:02 +0000 (09:35 -0800)]
make Node::in_edge_ private

12 years agomake Node::dirty_ private
Evan Martin [Wed, 7 Dec 2011 17:27:01 +0000 (09:27 -0800)]
make Node::dirty_ private

12 years agomore whitespace
Evan Martin [Wed, 7 Dec 2011 16:59:08 +0000 (08:59 -0800)]
more whitespace

12 years agomerge StatCache into State
Evan Martin [Wed, 7 Dec 2011 16:55:46 +0000 (08:55 -0800)]
merge StatCache into State

I think I had originally imagined StatCache would contain more state,
but at this point it's clear it was just managing a single map, which
could just as well be in the already-small State object.

12 years agomerge FileStat into Node
Evan Martin [Wed, 7 Dec 2011 16:45:16 +0000 (08:45 -0800)]
merge FileStat into Node

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.

12 years agorefactor to remove Node::ready()
Evan Martin [Wed, 7 Dec 2011 16:33:49 +0000 (08:33 -0800)]
refactor to remove Node::ready()

12 years agoadd and use getter for Edge::rule_
Evan Martin [Wed, 7 Dec 2011 01:32:25 +0000 (17:32 -0800)]
add and use getter for Edge::rule_

12 years agomove build/install to README
Evan Martin [Tue, 6 Dec 2011 17:32:08 +0000 (09:32 -0800)]
move build/install to README

12 years agoMerge pull request #152 from pcc/clean-depfiles
Evan Martin [Tue, 6 Dec 2011 16:26:39 +0000 (08:26 -0800)]
Merge pull request #152 from pcc/clean-depfiles

Have the clean tool remove depfiles

12 years agoMerge pull request #151 from pcc/restat-depfiles
Evan Martin [Tue, 6 Dec 2011 16:25:59 +0000 (08:25 -0800)]
Merge pull request #151 from pcc/restat-depfiles

Use the modification time of the depfile when computing restat_mtime

12 years agoHave the clean tool remove depfiles
Peter Collingbourne [Fri, 25 Nov 2011 15:18:49 +0000 (15:18 +0000)]
Have the clean tool remove depfiles

12 years agoUse the modification time of the depfile when computing restat_mtime
Peter Collingbourne [Sun, 4 Dec 2011 02:51:30 +0000 (02:51 +0000)]
Use the modification time of the depfile when computing restat_mtime

Fixes issue #144.

12 years agoFactor out Edge::EvaluateDepFile
Peter Collingbourne [Fri, 25 Nov 2011 15:18:03 +0000 (15:18 +0000)]
Factor out Edge::EvaluateDepFile

12 years agomore whitespace in build output
Evan Martin [Mon, 5 Dec 2011 21:38:31 +0000 (13:38 -0800)]
more whitespace in build output

12 years agoremove reference to nonexistent file
Evan Martin [Mon, 5 Dec 2011 21:30:38 +0000 (13:30 -0800)]
remove reference to nonexistent file

12 years agoadd help output to clean tool
Evan Martin [Mon, 5 Dec 2011 21:25:56 +0000 (13:25 -0800)]
add help output to clean tool

12 years agoprettify manual for tools
Evan Martin [Mon, 5 Dec 2011 21:22:09 +0000 (13:22 -0800)]
prettify manual for tools

12 years agoalso spell-check the 'clean' tool; abort on misspelling
Evan Martin [Mon, 5 Dec 2011 21:20:49 +0000 (13:20 -0800)]
also spell-check the 'clean' tool; abort on misspelling

12 years agominor manual touchups
Evan Martin [Mon, 5 Dec 2011 20:22:54 +0000 (12:22 -0800)]
minor manual touchups

12 years agosplit out tool list into a separate subcommand
Evan Martin [Mon, 5 Dec 2011 20:03:04 +0000 (12:03 -0800)]
split out tool list into a separate subcommand

Fits the -h output on one screen again, and allows more whitespace
in both the -h output and the tool list.

12 years agodisable the 'unused parameter' warning
Evan Martin [Mon, 5 Dec 2011 19:53:33 +0000 (11:53 -0800)]
disable the 'unused parameter' warning

It was firing too often, and hadn't uncovered any bugs.

12 years agoMerge pull request #150 from luislavena/mingw-no-visibility
Evan Martin [Mon, 5 Dec 2011 18:24:07 +0000 (10:24 -0800)]
Merge pull request #150 from luislavena/mingw-no-visibility

visibility=hidden should not be used for Windows

12 years agoMerge pull request #149 from luislavena/mingw-static
Evan Martin [Mon, 5 Dec 2011 18:22:12 +0000 (10:22 -0800)]
Merge pull request #149 from luislavena/mingw-static

Use g++'s -static option instead of specific libs

12 years agovisibility=hidden should not be used for Windows
Luis Lavena [Mon, 5 Dec 2011 15:08:47 +0000 (12:08 -0300)]
visibility=hidden should not be used for Windows

While GCC 4.x supports the usage of -fvisibility=hidden and the related
pragmas, usage of it under MinGW is a noop and should not be used.

Instead, __declspec(dllexport/dllimport) should be used instead to
indicate exportable functions.

Since Ninja builds a static library, no functions are exported and
visibility, at least under MinGW, is not an issue.

12 years agoUse g++'s -static option instead of specific libs
Luis Lavena [Mon, 5 Dec 2011 14:55:05 +0000 (11:55 -0300)]
Use g++'s -static option instead of specific libs

MinGW g++ recognizes -static as option to avoid the need to specify
individual libraries to be statically linked into the executable.

It also solves the warning of -static-libstdc++ not being recorgnized by
GCC 4.5.2 (TDM build)

12 years agofix some minor style issues in RecomputeDirty
Evan Martin [Sun, 4 Dec 2011 21:11:05 +0000 (13:11 -0800)]
fix some minor style issues in RecomputeDirty

12 years agowhen an edge is dirty, mark all outputs dirty
Evan Martin [Sun, 4 Dec 2011 21:07:11 +0000 (13:07 -0800)]
when an edge is dirty, mark all outputs dirty

The logic before was like:
  for each output:
    if edge_dirty or output.dirty:
      output.dirty = true
      edge_dirty = true

This was wrong in the case where the second output would case the edge
to be dirty; we needed to go back and mark the first output dirty as
well.  Fixed by taking two passes: one to compute the dirty state,
then a latter sweep to mark all outputs.

Fixes issue 148.

12 years agorefactor RecomputeOutputDirty to return true/false for dirty
Evan Martin [Sun, 4 Dec 2011 20:15:27 +0000 (12:15 -0800)]
refactor RecomputeOutputDirty to return true/false for dirty

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.

12 years agoadd a test case from issue 148
Evan Martin [Sun, 4 Dec 2011 20:14:28 +0000 (12:14 -0800)]
add a test case from issue 148

12 years agowindows: don't buffer stdout
Evan Martin [Fri, 2 Dec 2011 05:53:00 +0000 (21:53 -0800)]
windows: don't buffer stdout

12 years agoHACKING: windows notes
Evan Martin [Fri, 2 Dec 2011 05:35:27 +0000 (21:35 -0800)]
HACKING: windows notes

12 years agobootstrap.sh: windows (mingw) fixes
Evan Martin [Fri, 2 Dec 2011 05:34:34 +0000 (21:34 -0800)]
bootstrap.sh: windows (mingw) fixes

- Don't build browse.cc in bootstrap.sh.
- Explicitly call out to Python to run configure.py.
- Run ninja-bootstrap with no arguments to build the default target,
which is "ninja.exe" on Windows.

12 years agoconfigure.py: windows updates
Evan Martin [Fri, 2 Dec 2011 05:33:33 +0000 (21:33 -0800)]
configure.py: windows updates

- Drop unused 'windows' platform
- Make 'mingw' platform actually work on mingw-on-Windows.

12 years agowindows: clear process launch structs before using them
Evan Martin [Fri, 2 Dec 2011 04:39:39 +0000 (20:39 -0800)]
windows: clear process launch structs before using them

12 years agoUpdate ninja_syntax.py and tests to reflect '$ ' syntax.
Jeremy Apthorp [Mon, 28 Nov 2011 03:27:02 +0000 (14:27 +1100)]
Update ninja_syntax.py and tests to reflect '$ ' syntax.

12 years agoAdd tests for escaping spaces with '$ '.
Jeremy Apthorp [Mon, 28 Nov 2011 03:25:16 +0000 (14:25 +1100)]
Add tests for escaping spaces with '$ '.

12 years agoRevert "Merge pull request #143 from cipriancraciun/patches/python2"
Evan Martin [Fri, 25 Nov 2011 07:30:19 +0000 (23:30 -0800)]
Revert "Merge pull request #143 from cipriancraciun/patches/python2"

This reverts commit 38ab41f45ff818b437942b753328a0168914fc86, reversing
changes made to 819d6347b424f583d651b86dd1280605ddb23b88.

Platforms that don't have /usr/bin/python pointing to python2 are broken.

12 years agoMerge pull request #143 from cipriancraciun/patches/python2
Evan Martin [Tue, 22 Nov 2011 01:21:31 +0000 (17:21 -0800)]
Merge pull request #143 from cipriancraciun/patches/python2

Rename all occurences of `python` to `python2`

12 years agoMerge pull request #142 from cipriancraciun/patches/custom-cflags-ldflags
Evan Martin [Tue, 22 Nov 2011 01:15:47 +0000 (17:15 -0800)]
Merge pull request #142 from cipriancraciun/patches/custom-cflags-ldflags

Added support for custom CFLAGS and LDFLAGS.

12 years agoRenamed `python` to `python2`.
Ciprian Dorin, Craciun [Tue, 22 Nov 2011 00:11:50 +0000 (02:11 +0200)]
Renamed `python` to `python2`.

12 years agoFixed Python 2 scripts prologue (i.e. `#!/usr/bin/env python2`).
Ciprian Dorin, Craciun [Wed, 31 Aug 2011 11:28:08 +0000 (14:28 +0300)]
Fixed Python 2 scripts prologue (i.e. `#!/usr/bin/env python2`).

12 years agoAdded support for custom CFLAGS and LDFLAGS.
Ciprian Dorin, Craciun [Wed, 31 Aug 2011 11:28:47 +0000 (14:28 +0300)]
Added support for custom CFLAGS and LDFLAGS.

12 years agoMerge pull request #138 from polrop/fix-warning-in-test
Evan Martin [Mon, 21 Nov 2011 18:16:08 +0000 (10:16 -0800)]
Merge pull request #138 from polrop/fix-warning-in-test

Fix compilation warning in Ninja's test suite.

12 years agoFix compilation warning in Ninja's test suite.
Nicolas Despres [Mon, 21 Nov 2011 11:52:49 +0000 (12:52 +0100)]
Fix compilation warning in Ninja's test suite.

12 years agoAllow '$ ' to escape spaces in identifiers.
Jeremy Apthorp [Mon, 21 Nov 2011 03:07:56 +0000 (14:07 +1100)]
Allow '$ ' to escape spaces in identifiers.

12 years agoMerge pull request #136 from polrop/add-extra-warning
Evan Martin [Sun, 20 Nov 2011 00:19:10 +0000 (16:19 -0800)]
Merge pull request #136 from polrop/add-extra-warning

Add -Wextra compilation flags

12 years agoRemove warning triggered by -Wextra on MinGW.
Nicolas Despres [Sat, 19 Nov 2011 19:22:42 +0000 (20:22 +0100)]
Remove warning triggered by -Wextra on MinGW.

12 years agoAdd -Wextra warning flag.
Nicolas Despres [Sat, 19 Nov 2011 15:13:48 +0000 (16:13 +0100)]
Add -Wextra warning flag.

Fix triggered warnings:
- unused parameter
- type qualifiers ignored on function return type
- missing initializer for member

12 years agoMerge pull request #135 from polrop/fix-mingw
Evan Martin [Sat, 19 Nov 2011 18:24:17 +0000 (10:24 -0800)]
Merge pull request #135 from polrop/fix-mingw

Fix mingw.

12 years agoMerge pull request #133 from polrop/fix-duplication
Evan Martin [Sat, 19 Nov 2011 18:23:06 +0000 (10:23 -0800)]
Merge pull request #133 from polrop/fix-duplication

Fix duplicated list of profilers.

12 years agoFix compilation warning with getopt() on MinGW.
Nicolas Despres [Sat, 19 Nov 2011 17:54:05 +0000 (18:54 +0100)]
Fix compilation warning with getopt() on MinGW.

12 years agoFix compilation warning with getopt_long() on MinGW.
Nicolas Despres [Sat, 19 Nov 2011 17:49:38 +0000 (18:49 +0100)]
Fix compilation warning with getopt_long() on MinGW.

12 years agoUse more portable way to get the current process ID.
Nicolas Despres [Sat, 19 Nov 2011 17:40:21 +0000 (18:40 +0100)]
Use more portable way to get the current process ID.

GetProcessId() is available only since Windows XP.  Since
MinGW define WINVER to 0x0400 which is Windows 2000 I think, we have
a compilation error.  Using GetCurrentProcessId() instead of
GetProcessId(GetCurrentProcess()) fix this issue.

12 years agoFix duplicated list of profilers.
Nicolas Despres [Sat, 19 Nov 2011 14:48:30 +0000 (15:48 +0100)]
Fix duplicated list of profilers.

12 years agoMerge pull request #132 from nico/spell
Evan Martin [Wed, 16 Nov 2011 21:21:46 +0000 (13:21 -0800)]
Merge pull request #132 from nico/spell

Add spelling suggestions for four cases:

12 years agoAdd spelling suggestions for four cases:
Nico Weber [Wed, 16 Nov 2011 05:38:21 +0000 (21:38 -0800)]
Add spelling suggestions for four cases:

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.

12 years agofix TODO: correct dependencies for inline.sh
Evan Martin [Sun, 13 Nov 2011 20:48:32 +0000 (12:48 -0800)]
fix TODO: correct dependencies for inline.sh

Not sure why I just didn't write this right the first time; when running
a script for its output, the script is always an implicit input of the
output.

12 years agoAdd a EditDistance() function based on the one in llvm/lib/Support/StringRef.cpp.
Nico Weber [Thu, 10 Nov 2011 20:58:00 +0000 (12:58 -0800)]
Add a EditDistance() function based on the one in llvm/lib/Support/StringRef.cpp.

12 years agoMerge pull request #131 from secondplanet/patch-1
Evan Martin [Sun, 13 Nov 2011 20:16:09 +0000 (12:16 -0800)]
Merge pull request #131 from secondplanet/patch-1

Improvements to ninja-mode

12 years agoImprovements to ninja-mode
Humza [Sun, 13 Nov 2011 16:30:10 +0000 (11:30 -0500)]
Improvements to ninja-mode

* provide ninja-mode feature
* highlight rule names

12 years agoMerge pull request #127 from tiresdonexits/master
Evan Martin [Sun, 6 Nov 2011 00:02:06 +0000 (17:02 -0700)]
Merge pull request #127 from tiresdonexits/master

Minor code change to address a warning in g++ 4.6.

12 years agoAdded a cast to NULL to remove a warning issues by g++ 4.6.
Jonathan Sternberg [Sat, 5 Nov 2011 19:58:51 +0000 (15:58 -0400)]
Added a cast to NULL to remove a warning issues by g++ 4.6.

12 years agoMerge pull request #123 from pcc/commands-tool
Evan Martin [Fri, 4 Nov 2011 23:31:35 +0000 (16:31 -0700)]
Merge pull request #123 from pcc/commands-tool

Add a "commands" tool

12 years agoAdd a "commands" tool
Peter Collingbourne [Mon, 3 Oct 2011 03:02:11 +0000 (04:02 +0100)]
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.

12 years agoMerge pull request #125 from pcc/outputs-ready
Evan Martin [Wed, 2 Nov 2011 06:26:33 +0000 (23:26 -0700)]
Merge pull request #125 from pcc/outputs-ready

CMake requirements: Make-style order-only dependencies, restat rules

12 years agodon't leak fds into subprocesses
Evan Martin [Mon, 31 Oct 2011 22:39:03 +0000 (15:39 -0700)]
don't leak fds into subprocesses

Patch from Antoine Labour <piman@chromium.org>, (hacky) test by me.

12 years agomove SetCloseOnExec to util
Evan Martin [Mon, 31 Oct 2011 22:30:29 +0000 (15:30 -0700)]
move SetCloseOnExec to util

12 years agoImplement restat rules
Peter Collingbourne [Mon, 19 Sep 2011 01:56:15 +0000 (02:56 +0100)]
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).

12 years agoCreate log entries in BuildLog::RecordCommand without requiring a log file
Peter Collingbourne [Sun, 2 Oct 2011 00:57:41 +0000 (01:57 +0100)]
Create log entries in BuildLog::RecordCommand without requiring a log file

This permits us to write tests that write and later read from
the build log without needing a temporary log file.

12 years agoImplement Make-style order-only dependencies
Peter Collingbourne [Sun, 18 Sep 2011 02:28:44 +0000 (03:28 +0100)]
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.

12 years agoSplit Node::dirty_ into two flags: Node::dirty_ and Edge::outputs_ready_
Peter Collingbourne [Sun, 18 Sep 2011 02:07:35 +0000 (03:07 +0100)]
Split Node::dirty_ into two flags: Node::dirty_ and Edge::outputs_ready_

dirty_ is intended to remain static during the build (unless a restat
occurs), while outputs_ready_ reflects the dynamic state of the build.

12 years agoMerge pull request #120 from pcc/generator
Evan Martin [Mon, 17 Oct 2011 22:16:49 +0000 (15:16 -0700)]
Merge pull request #120 from pcc/generator

Implement generator rules

12 years agoMake the command line interface for the clean tool consistent
Peter Collingbourne [Sat, 15 Oct 2011 18:55:33 +0000 (19:55 +0100)]
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".

12 years agoImplement generator rules
Peter Collingbourne [Thu, 22 Sep 2011 16:04:03 +0000 (17:04 +0100)]
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.

12 years agopass extra flags into the tool
Evan Martin [Fri, 14 Oct 2011 01:00:47 +0000 (18:00 -0700)]
pass extra flags into the tool