platform/upstream/ninja.git
13 years agofix the error: 'asciidoc: To many arguments'
Hiroyuki Iwatsuki [Sun, 15 May 2011 23:38:11 +0000 (08:38 +0900)]
fix the error: 'asciidoc: To many arguments'

13 years agomove various doc files out of top-level directory
Evan Martin [Sat, 14 May 2011 23:11:41 +0000 (16:11 -0700)]
move various doc files out of top-level directory

13 years agoshow started, not finished, edges in progress
Evan Martin [Sat, 14 May 2011 22:43:23 +0000 (15:43 -0700)]
show started, not finished, edges in progress

In verbose mode (where we don't overprint) it's confusing to show
[0/XX] for the first N commands we start.  In smart terminal mode,
I can't really tell the difference.

13 years agocorrectly compute truncation margin
Evan Martin [Sat, 14 May 2011 22:34:13 +0000 (15:34 -0700)]
correctly compute truncation margin

13 years agorefactor status printing into BuildStatus
Evan Martin [Sat, 14 May 2011 22:17:50 +0000 (15:17 -0700)]
refactor status printing into BuildStatus

Centralizing printing allows being more careful about what is output.
1) Always include the [2/15] prefix on commands.
2) Make the header command match the error output command.

13 years agohide internals of BuildStatus
Evan Martin [Sat, 14 May 2011 21:29:27 +0000 (14:29 -0700)]
hide internals of BuildStatus

13 years agoremove order-only hacks now that semantics changed
Evan Martin [Fri, 13 May 2011 23:24:27 +0000 (16:24 -0700)]
remove order-only hacks now that semantics changed

13 years agoSEMANTIC CHANGE: implicit inputs are now required to exist
Evan Martin [Fri, 13 May 2011 17:47:26 +0000 (10:47 -0700)]
SEMANTIC CHANGE: implicit inputs are now required to exist

Edges found through depfiles are special: they get an extra
empty "phony" rule.  (This is identical to the way you hack this
with Makefiles.)

13 years agotweak browse appearance
Evan Martin [Fri, 13 May 2011 16:07:43 +0000 (09:07 -0700)]
tweak browse appearance

13 years agomake browse work for all ninja paths
Evan Martin [Fri, 13 May 2011 15:53:02 +0000 (08:53 -0700)]
make browse work for all ninja paths

Pass the path to the ninja binary in to the Python script.
Confusingly, in some places the variables were already in place
to do this, but they were accidentally used for something else
entirely.

13 years agorefix recompaction
Evan Martin [Thu, 12 May 2011 21:01:52 +0000 (14:01 -0700)]
refix recompaction

Like all untested quick fixes, my previous quick fix actually introduced
a reliable segfault.

13 years agoquick fix: write out signature in recompaction
Evan Martin [Wed, 11 May 2011 18:33:55 +0000 (11:33 -0700)]
quick fix: write out signature in recompaction

This needs refactoring but I already pushed the bad code so this
hopefully makes it less broken.

13 years agodon't crash on truncated log files
Evan Martin [Wed, 11 May 2011 16:58:29 +0000 (09:58 -0700)]
don't crash on truncated log files

Add a test that tries all truncations of a log file and verifies it
doesn't crash.

13 years agoadd a versioning header to build log, switch to v2
Evan Martin [Mon, 9 May 2011 23:24:24 +0000 (16:24 -0700)]
add a versioning header to build log, switch to v2

In v2 we store both the start and end time of the command.
This allows better visualization of the build process.

13 years agoclang note
Evan Martin [Tue, 10 May 2011 16:35:10 +0000 (09:35 -0700)]
clang note

13 years agoMerge pull request #44 from polrop/update-todo
Evan Martin [Tue, 10 May 2011 16:04:09 +0000 (09:04 -0700)]
Merge pull request #44 from polrop/update-todo

Update the todo list since -k is implemented now.

13 years agoMerge pull request #43 from polrop/fix-bootstrap-for-dash
Evan Martin [Tue, 10 May 2011 16:03:58 +0000 (09:03 -0700)]
Merge pull request #43 from polrop/fix-bootstrap-for-dash

Fix bootstrap script for dash.

13 years agoUpdate the todo list since -k is implemented now.
Nicolas Despres [Tue, 10 May 2011 13:58:47 +0000 (15:58 +0200)]
Update the todo list since -k is implemented now.

13 years agoFix bootstrap script for dash.
Nicolas Despres [Tue, 10 May 2011 13:55:21 +0000 (15:55 +0200)]
Fix bootstrap script for dash.

On Ubuntu /bin/sh is a link to dash.  The bootstrap script reported a
'Bad substitution' error line 39 when interpreted by dash.  This patch fix the
problem.

13 years agofix test
Evan Martin [Mon, 9 May 2011 23:24:47 +0000 (16:24 -0700)]
fix test

13 years agomake platform a command-line arg to configure
Evan Martin [Mon, 9 May 2011 15:58:13 +0000 (08:58 -0700)]
make platform a command-line arg to configure

13 years agoexpose -k flag to users
Evan Martin [Mon, 9 May 2011 15:50:25 +0000 (08:50 -0700)]
expose -k flag to users

13 years agoadd support for ignoring failures of some subtasks
Evan Martin [Mon, 9 May 2011 04:47:03 +0000 (21:47 -0700)]
add support for ignoring failures of some subtasks

13 years agorename gen-build-file to configure
Evan Martin [Mon, 9 May 2011 04:53:34 +0000 (21:53 -0700)]
rename gen-build-file to configure

Change it so it always writes build.ninja; easier to run directly.

13 years agowindows: remove extra print
Evan Martin [Sun, 8 May 2011 21:08:30 +0000 (14:08 -0700)]
windows: remove extra print

13 years agowindows: fix more signedness warnings
Evan Martin [Sun, 8 May 2011 20:59:30 +0000 (13:59 -0700)]
windows: fix more signedness warnings

13 years agowindows: pass subprocess tests
Evan Martin [Fri, 6 May 2011 21:20:34 +0000 (14:20 -0700)]
windows: pass subprocess tests

13 years agowindows: pass the DiskInterface tests
Evan Martin [Sun, 8 May 2011 03:11:19 +0000 (20:11 -0700)]
windows: pass the DiskInterface tests

13 years agoMerge pull request #42 from ascherkus/master
Evan Martin [Sun, 8 May 2011 20:33:34 +0000 (13:33 -0700)]
Merge pull request #42 from ascherkus/master

Quick fix for bootstrap.sh due to win32 files

13 years agoFix bootstrap.sh to include the correct subprocess{-win32}.cc based on the platform.
Andrew Scherkus [Sun, 8 May 2011 03:52:27 +0000 (20:52 -0700)]
Fix bootstrap.sh to include the correct subprocess{-win32}.cc based on the platform.

13 years agoamend HACKING with how to dev for windows
Evan Martin [Fri, 6 May 2011 21:24:02 +0000 (14:24 -0700)]
amend HACKING with how to dev for windows

13 years agowindows: successfully link tests
Evan Martin [Fri, 6 May 2011 21:17:07 +0000 (14:17 -0700)]
windows: successfully link tests

It links, with some hacks.
Tests still fail.

13 years agofix tests broken by previous commit
Evan Martin [Fri, 6 May 2011 21:12:10 +0000 (14:12 -0700)]
fix tests broken by previous commit

13 years agoMerge pull request #40 from fischman/master
Evan Martin [Fri, 6 May 2011 20:55:45 +0000 (13:55 -0700)]
Merge pull request #40 from fischman/master

CC vs CXX in ninja/gen-build-file.py

13 years agoUse $CXX instead of $CC when building C++ ninja source.
Ami Fischman [Fri, 6 May 2011 20:04:38 +0000 (13:04 -0700)]
Use $CXX instead of $CC when building C++ ninja source.

13 years agowindows: subprocess implementation for Windows
Evan Martin [Fri, 6 May 2011 18:46:11 +0000 (11:46 -0700)]
windows: subprocess implementation for Windows

Heavily based on a patch from Sergey Nenakhov <nenakhov.sergey@gmail.com>.

13 years agomore refactoring for windows
Evan Martin [Tue, 3 May 2011 17:56:37 +0000 (10:56 -0700)]
more refactoring for windows

13 years agoMerge pull request #38 from SByer/path_fix.
Evan Martin [Tue, 3 May 2011 23:26:46 +0000 (16:26 -0700)]
Merge pull request #38 from SByer/path_fix.

Needed more path components to build Chrome.

13 years agoNeeded more path components to build Chrome. One path component in an uncommon
Scott Byer [Tue, 3 May 2011 17:34:44 +0000 (10:34 -0700)]
Needed more path components to build Chrome. One path component in an uncommon
sub-library ended up with 27 slashes in it.

13 years agowindows: build win32 subprocess file on windows
Evan Martin [Tue, 3 May 2011 04:43:18 +0000 (21:43 -0700)]
windows: build win32 subprocess file on windows

13 years agorefactor subprocess to make it easier for windows port
Evan Martin [Tue, 3 May 2011 04:42:11 +0000 (21:42 -0700)]
refactor subprocess to make it easier for windows port

Rather than tracking stdout/stderr explicitly, just keep an opaque
pointer to a platform-specific 'stream' type.  Also provide API
to get at the process output.

13 years agogenerate mingw build files if requested
Evan Martin [Mon, 2 May 2011 03:33:16 +0000 (20:33 -0700)]
generate mingw build files if requested

Set NINJA_PLATFORM=mingw to get them.

13 years agofix unit test
Evan Martin [Mon, 2 May 2011 19:18:35 +0000 (12:18 -0700)]
fix unit test

13 years agoMerge pull request #37 from polrop/add-guidelines.
Evan Martin [Mon, 2 May 2011 18:41:53 +0000 (11:41 -0700)]
Merge pull request #37 from polrop/add-guidelines.

Add coding and documentation guidelines.

13 years agoMerge pull request #36 from polrop/test-clean-tool.
Evan Martin [Mon, 2 May 2011 18:39:45 +0000 (11:39 -0700)]
Merge pull request #36 from polrop/test-clean-tool.

Test clean tool

13 years agoMerge pull request #35 from polrop/add-warning-funcion.
Evan Martin [Mon, 2 May 2011 18:38:20 +0000 (11:38 -0700)]
Merge pull request #35 from polrop/add-warning-funcion.

Add a Warning() report function.

13 years agoMerge pull request #34 from polrop/fix-typo.
Evan Martin [Mon, 2 May 2011 18:37:56 +0000 (11:37 -0700)]
Merge pull request #34 from polrop/fix-typo.

Fix typo in documentation.

13 years agoAdd coding and documentation guidelines.
Nicolas Despres [Mon, 2 May 2011 15:56:45 +0000 (17:56 +0200)]
Add coding and documentation guidelines.

As discussed on the mailing list.

13 years agoThe cleaner can be used multiple times now.
Nicolas Despres [Mon, 2 May 2011 14:50:33 +0000 (16:50 +0200)]
The cleaner can be used multiple times now.

13 years agoReturn non-zero status when errors occur.
Nicolas Despres [Mon, 2 May 2011 14:46:31 +0000 (16:46 +0200)]
Return non-zero status when errors occur.

Clean all was not returning non-zero when an error occur (like when
failing to remove a directory). This patch fix the problem and add a test
for it.

13 years agoAdd a test for the clean tool.
Nicolas Despres [Mon, 2 May 2011 14:09:10 +0000 (16:09 +0200)]
Add a test for the clean tool.

It also fix a bug about the count of removed file reported.

13 years agoAdd a Warning() report function.
Nicolas Despres [Sun, 1 May 2011 15:31:50 +0000 (17:31 +0200)]
Add a Warning() report function.

Also fix sites where Error() was misused.

13 years agoFix typo in documentation.
Nicolas Despres [Sat, 30 Apr 2011 23:17:19 +0000 (01:17 +0200)]
Fix typo in documentation.

13 years agowindows: use abstractions in ninja.cc
Evan Martin [Mon, 2 May 2011 03:08:26 +0000 (20:08 -0700)]
windows: use abstractions in ninja.cc

13 years agowindows: getopt const clean hack
Evan Martin [Mon, 2 May 2011 03:08:01 +0000 (20:08 -0700)]
windows: getopt const clean hack

13 years agowindows: use millis abstraction instead of non-portable gettimeofday
Evan Martin [Mon, 2 May 2011 03:01:46 +0000 (20:01 -0700)]
windows: use millis abstraction instead of non-portable gettimeofday

13 years agoremove ROOT_HACK hack; it is unused
Evan Martin [Mon, 2 May 2011 02:53:50 +0000 (19:53 -0700)]
remove ROOT_HACK hack; it is unused

13 years agowindows: abstract around mkdir vs _mkdir
Evan Martin [Mon, 2 May 2011 02:43:51 +0000 (19:43 -0700)]
windows: abstract around mkdir vs _mkdir

13 years agowindows: use portable replacement of setlinebuf()
Evan Martin [Mon, 2 May 2011 02:37:41 +0000 (19:37 -0700)]
windows: use portable replacement of setlinebuf()

13 years agocheck in a script that generates build.ninja
Evan Martin [Mon, 2 May 2011 00:48:39 +0000 (17:48 -0700)]
check in a script that generates build.ninja

This will allow us to:
1) simplify bootstrap
2) generate windows-style paths on windows

It is also in line with ninja's philosophy: the build file syntax
is simple because the build files are easy to generate.

13 years agodrop "all" target from build
Evan Martin [Sun, 1 May 2011 02:55:11 +0000 (19:55 -0700)]
drop "all" target from build

13 years agouse refactored function to support implicit "all" target
Evan Martin [Sun, 1 May 2011 02:50:49 +0000 (19:50 -0700)]
use refactored function to support implicit "all" target

13 years agocanonicalize paths in refactored function
Evan Martin [Sun, 1 May 2011 02:46:33 +0000 (19:46 -0700)]
canonicalize paths in refactored function

13 years agorefactor out adding "all" to graph tool
Evan Martin [Sun, 1 May 2011 02:42:41 +0000 (19:42 -0700)]
refactor out adding "all" to graph tool

13 years agoadd test for RootNodes(); fix comment
Evan Martin [Sun, 1 May 2011 02:30:30 +0000 (19:30 -0700)]
add test for RootNodes(); fix comment

13 years agogit: ignore python droppings
Evan Martin [Sun, 1 May 2011 02:04:23 +0000 (19:04 -0700)]
git: ignore python droppings

13 years agodrop reserved words 'build'/'rule'/'subninja'/etc.
Evan Martin [Sun, 1 May 2011 01:49:50 +0000 (18:49 -0700)]
drop reserved words 'build'/'rule'/'subninja'/etc.

Instead, parse them as normal words, which makes them work as paths.
We instead rely on the *position* (i.e., we start a statement with a
keyword and not a path) to distinguish the keyword 'build' from the file
'build'.

13 years agodoc shell semantics of rule commands
Evan Martin [Sun, 1 May 2011 02:01:33 +0000 (19:01 -0700)]
doc shell semantics of rule commands

13 years agorename the manual phony target to "manual"
Evan Martin [Sun, 1 May 2011 01:48:48 +0000 (18:48 -0700)]
rename the manual phony target to "manual"

13 years agodoxygen: restore references docs
Evan Martin [Sun, 1 May 2011 01:44:55 +0000 (18:44 -0700)]
doxygen: restore references docs

13 years agoMerge pull request #33 from arnaudgelas/master.
Evan Martin [Sat, 30 Apr 2011 22:13:33 +0000 (15:13 -0700)]
Merge pull request #33 from arnaudgelas/master.

fix compilation error / warning on Mac 10.5

13 years agocheck in a ninja file generator Python module
Evan Martin [Sat, 30 Apr 2011 19:14:50 +0000 (12:14 -0700)]
check in a ninja file generator Python module

13 years agofix warnings on Mac 10.5
Arnaud Gelas [Sat, 30 Apr 2011 12:39:48 +0000 (08:39 -0400)]
fix warnings on Mac 10.5

structures had virtual functions but not virtual destructors

13 years agofix compilation error on Mac 10.5
Arnaud Gelas [Sat, 30 Apr 2011 12:37:38 +0000 (08:37 -0400)]
fix compilation error on Mac 10.5

std::vector<>::data() does not exist

13 years agoMerged pull request #32 from iwadon/fix-graph-test.
Evan Martin [Sat, 30 Apr 2011 09:35:28 +0000 (02:35 -0700)]
Merged pull request #32 from iwadon/fix-graph-test.

fix SEGV in graph_test

13 years agofix SEGV in graph_test
Hiroyuki Iwatsuki [Fri, 29 Apr 2011 23:08:56 +0000 (08:08 +0900)]
fix SEGV in graph_test

13 years agoreduce doxygen output
Evan Martin [Fri, 29 Apr 2011 18:19:11 +0000 (11:19 -0700)]
reduce doxygen output

13 years agoadd doxygen-compatibile comments to most classes
Evan Martin [Fri, 29 Apr 2011 18:03:03 +0000 (11:03 -0700)]
add doxygen-compatibile comments to most classes

13 years agofix a signedness warning
Evan Martin [Fri, 29 Apr 2011 17:58:43 +0000 (10:58 -0700)]
fix a signedness warning

13 years agoMerged pull request #31 from polrop/generate-whole-graph.
Evan Martin [Fri, 29 Apr 2011 17:57:46 +0000 (10:57 -0700)]
Merged pull request #31 from polrop/generate-whole-graph.

The 'graph' tool now generates a graph based on all root nodes when called without any target. The build.ninja file is also adjusted so that we get the whole graph generated (including the doxygen part).

13 years agoMerged pull request #30 from polrop/more-tools.
Evan Martin [Fri, 29 Apr 2011 17:55:26 +0000 (10:55 -0700)]
Merged pull request #30 from polrop/more-tools.

adds the -C option and the following tools: targets, rules and clean

13 years agoMerged pull request #29 from polrop/minor-bug-fix.
Evan Martin [Thu, 28 Apr 2011 07:45:00 +0000 (00:45 -0700)]
Merged pull request #29 from polrop/minor-bug-fix.

Minor bug fix

13 years agoinclude location of error in parse error messages in EvalEnv strings
Alexei Svitkine [Tue, 26 Apr 2011 18:49:49 +0000 (11:49 -0700)]
include location of error in parse error messages in EvalEnv strings

E.g. when parsing "foo = ${bar", point at the correct location of
the missing curly brace.

13 years agoGenerate the entire graph not only for the 'all' target.
Nicolas Despres [Mon, 18 Apr 2011 16:24:42 +0000 (18:24 +0200)]
Generate the entire graph not only for the 'all' target.

This way we can see the 'doxygen' target and also some object file we
forgot to add as input of the link rule.

13 years agoAdd the 'clean' tool.
Nicolas Despres [Thu, 14 Apr 2011 13:28:43 +0000 (15:28 +0200)]
Add the 'clean' tool.

It removes built files either by rule or target or everything.

13 years agograph: Assume all root nodes if no target given.
Nicolas Despres [Sun, 10 Apr 2011 16:18:31 +0000 (18:18 +0200)]
graph: Assume all root nodes if no target given.

This way we can generate the complete graph.

13 years agoAdd the 'rules' tool.
Nicolas Despres [Sun, 10 Apr 2011 16:29:13 +0000 (18:29 +0200)]
Add the 'rules' tool.

It can be useful in conjunction with the 'targets' tool for writing shell
completion scripts and when debugging.

13 years agoAdd the 'targets' tool.
Nicolas Despres [Sun, 10 Apr 2011 11:32:24 +0000 (13:32 +0200)]
Add the 'targets' tool.

This tool list targets by depth or by rule. It can be useful:
- for shell completion script ;
- to know what are the primary targets: ninja -t targets depth 1 ;
- to know targets that are linked: ninja -t rule link ;
- when debugging.

It works by first listing the root nodes and then following the input nodes
of their in edge.

13 years agoAdd -C DIR option.
Nicolas Despres [Sat, 9 Apr 2011 17:45:24 +0000 (19:45 +0200)]
Add -C DIR option.

Can be useful when calling ninja from a script or a code editor or in many
other occasions.  It costs nothing and does not bring more complexity, so
I think we can afford it.

13 years agograph: Report errors if a target does not exist.
Nicolas Despres [Tue, 26 Apr 2011 08:06:54 +0000 (10:06 +0200)]
graph: Report errors if a target does not exist.

13 years agoDo not always require a target when a tool is run.
Nicolas Despres [Sun, 10 Apr 2011 17:57:28 +0000 (19:57 +0200)]
Do not always require a target when a tool is run.

Adjust tools options parser and documentation.

13 years agoRemove no longer used current working directory.
Nicolas Despres [Sun, 10 Apr 2011 17:57:28 +0000 (19:57 +0200)]
Remove no longer used current working directory.

It has been introduced by 761a3c when ManifestParser::set_root() existed.
It is no longer the case so we can save some time querying it now.

13 years agoDocument.
Nicolas Despres [Thu, 14 Apr 2011 12:51:15 +0000 (14:51 +0200)]
Document.

13 years agoRemove useless inclusion of stdio.h.
Nicolas Despres [Thu, 14 Apr 2011 09:00:19 +0000 (11:00 +0200)]
Remove useless inclusion of stdio.h.

13 years agoUse Error() to report error.
Nicolas Despres [Thu, 14 Apr 2011 08:59:13 +0000 (10:59 +0200)]
Use Error() to report error.

This way we get the error message prefixed by the program name. It helps
while debugging.

13 years agoPrefix perror(3) messages with program name.
Nicolas Despres [Sat, 9 Apr 2011 17:51:21 +0000 (19:51 +0200)]
Prefix perror(3) messages with program name.

It make it easier while debugging to know who is reporting the error:
Ninja itself or one of the command called by Ninja during the build
process or one of the generator which called Ninja.

13 years agodon't close null log files
Evan Martin [Mon, 25 Apr 2011 18:58:02 +0000 (11:58 -0700)]
don't close null log files

13 years agoClose() and unlink() files in ways that make Windows happy
Philip Craig [Sat, 23 Apr 2011 10:36:49 +0000 (11:36 +0100)]
Close() and unlink() files in ways that make Windows happy

This will make the build log compaction work on Windows.
It will also make the tests no longer leave a temp log file around.

13 years ago[windows] disable smart terminal support
Sergey Nenakhov [Sat, 23 Apr 2011 21:19:16 +0000 (14:19 -0700)]
[windows] disable smart terminal support

13 years ago[windows] disable browse tool on Windows for now
Sergey Nenakhov [Sat, 23 Apr 2011 21:16:23 +0000 (14:16 -0700)]
[windows] disable browse tool on Windows for now