Fraser Cormack [Sat, 20 Dec 2014 00:12:52 +0000 (00:12 +0000)]
zsh-completion: remove use of 'head' with negative offset
Some systems - like OSX - don't come with a version of head that
supports a negative value for the -n flag. Such systems get a message
such as this when tab-completing ninja's -d flag:
ninja -dhead: illegal line count -- -1
Using sed instead should be more universally supported.
Nico Weber [Thu, 11 Dec 2014 05:11:32 +0000 (21:11 -0800)]
Merge pull request #882 from mathstuf/verbose-configure
configure: add a verbose mode
Ben Boeckel [Thu, 11 Dec 2014 04:09:38 +0000 (23:09 -0500)]
configure: add a verbose mode
Required for Fedora infrastructure so that the commands used to build
ninja are logged.
Nico Weber [Tue, 9 Dec 2014 20:26:41 +0000 (12:26 -0800)]
Merge pull request #881 from nico/depscancycles
Let DependencyScan::RecomputeDirty() work correclty with cyclic graphs.
Nico Weber [Mon, 8 Dec 2014 00:02:35 +0000 (16:02 -0800)]
Let DependencyScan::RecomputeDirty() work correclty with cyclic graphs.
RecomputDirty(edge) currently works roughly like this:
RecomputeDirty(edge):
LoadDeps(edge)
for in in edge.inputs:
if in.StatIfNecessary():
RecomputeDirty(in.in_edge) # recurse into inputs
for out in edge.outputs:
out.StatIfNecessary() # mark outputs as visited
It uses the stat state of each node to mark nodes as visited and doesn't
traverse across nodes that have been visited already. For cyclic graphs
with an edge with multiple outputs on the cycle, nothing prevents an
edge to be visited more than once if the cycle is entered through an
output that isn't on the cycle. In other words, RecomputeDirty() for
the same edge can be on the call stack more than once. This is bad for
at least two reasons:
1. Deps are added multiple times, making the graph confusing to reason
about.
2. LoadDeps() will insert into the inputs_ of an edge that's iterated
over in a callframe higher up. This can invalidate the iterator,
which causes a crash when the callframe with the loop over the
now-invalidated iterator resumes.
To fix this, let RecomputeDirty() mark all outputs of an edge as visited
as the first thing it does. This way, even if the edge is on a cycle
with several outputs, each output is already marked and no edge will
have its deps loaded more than once.
Fixes the crashes in #875. (In practice, it turns the crashes into
"stuck [this is a bug]" messages for now, due to the example without
duplicate rules in #867)
Nico Weber [Sun, 7 Dec 2014 22:49:49 +0000 (14:49 -0800)]
Rename a few iterators. No behavior change.
It confused me that the iterator iterating over `outputs_` was called
`i` -- this always made me think of "input", not "iterator".
Call iterators over edge outputs "o", iterators over edge inputs "i",
iterators over node input edges "oe", and general iterators over edges
"e".
Nico Weber [Sun, 7 Dec 2014 22:42:12 +0000 (14:42 -0800)]
remove two unneeded `explicit`s
Nico Weber [Thu, 4 Dec 2014 18:05:44 +0000 (10:05 -0800)]
Merge pull request #703 from ovinn/master
Added *.obj ignore rule
Nico Weber [Thu, 4 Dec 2014 18:03:49 +0000 (10:03 -0800)]
Merge pull request #835 from rainlabs-eu/fix-cygwin-compatibility
Fixed cygwin compatibility (issue #806)
Nico Weber [Thu, 4 Dec 2014 17:04:15 +0000 (09:04 -0800)]
Rename num_collisions to collision_count.
All other counting variables are called foo_count, not num_foos.
No behavior change.
Nico Weber [Thu, 4 Dec 2014 05:59:27 +0000 (21:59 -0800)]
Merge pull request #868 from Fanael/ninja-mode.el-refactor
Remove unneeded save-excursion.
Nico Weber [Thu, 4 Dec 2014 05:32:51 +0000 (21:32 -0800)]
Merge pull request #809 from andrey-malets/doc-for-first-output
Document target^ syntax.
Nico Weber [Thu, 4 Dec 2014 02:17:27 +0000 (18:17 -0800)]
Merge pull request #879 from nico/rev
Revert #223, fixes #874.
Nico Weber [Thu, 4 Dec 2014 02:04:26 +0000 (18:04 -0800)]
Revert #223, fixes #874.
No test since there's still no good way to test code in ninja.cc. Going
forward, either move NinjaMain to its own file with tests, or create a
system that makes it possible to run integration tests on the ninja
binary. Instead, add a comment that explains why the restat
optimization isn't done.
Nico Weber [Wed, 3 Dec 2014 16:16:32 +0000 (08:16 -0800)]
Merge pull request #878 from nico/py3
Make configure.py work with Python. Fixes issue #877.
Nico Weber [Wed, 3 Dec 2014 16:10:44 +0000 (08:10 -0800)]
Make configure.py work with Python. Fixes issue #877.
Patch from @TheOneRing!
Nico Weber [Tue, 2 Dec 2014 06:27:06 +0000 (22:27 -0800)]
Merge pull request #873 from nico/full
win: Use full console width for status messages.
Nico Weber [Tue, 2 Dec 2014 06:21:54 +0000 (22:21 -0800)]
win: Use full console width for status messages.
The original overprinting code, added in
7b3d8c8e, used printf for printing
the status. printf needs one column for the cursor, so the status message
could only take up `width - 1` columns.
fc554c22 changed Windows from printf
to WriteConsoleOutput which doesn't move the cursor, so keeping one column
empty is no longer needed. So stop doing that.
Also remove a duplicate call to GetConsoleScreenBufferInfo.
Nico Weber [Tue, 2 Dec 2014 06:15:50 +0000 (22:15 -0800)]
Merge pull request #872 from nico/vec
win/lineprinter: Use a vector instead of manual memory management.
Nico Weber [Tue, 2 Dec 2014 06:14:25 +0000 (22:14 -0800)]
win/lineprinter: Use a vector instead of manual memory management.
No behavior change. Based on a patch from gmisocpp@gmail.com!
Nico Weber [Tue, 2 Dec 2014 05:30:06 +0000 (21:30 -0800)]
Merge pull request #871 from nico/ctrls
win: Let the "Pause" key or Ctrl-S pause output.
Nico Weber [Tue, 2 Dec 2014 05:05:23 +0000 (21:05 -0800)]
win: Let the "Pause" key or Ctrl-S pause output.
In cmd.exe, hitting the "Pause" key or Ctrl-S will pause
programs until a key is pressed. This is apparently
implemented when stdout is writing to, so use printf
instead of Console functions to reset the cursor to
the start of the line. Also happens to simplify the code.
(This already worked in -v mode since that already
prints using printf.)
\vBased on a patch from gmisocpp@gmail.com!
Fanael Linithien [Mon, 24 Nov 2014 18:09:33 +0000 (19:09 +0100)]
Remove unneeded save-excursion.
syntax-propertize-function is allowed to move the point and mark.
Nico Weber [Mon, 24 Nov 2014 17:33:39 +0000 (09:33 -0800)]
mark this 1.5.3.git
Evan Martin [Mon, 24 Nov 2014 05:36:08 +0000 (21:36 -0800)]
Merge pull request #864 from Fanael/ninja-mode.el-refactor
Ninja mode.el refactor
Fanael Linithien [Sun, 23 Nov 2014 21:29:49 +0000 (22:29 +0100)]
Use lexical-binding.
There's no reason not to use lexical-binding when supporting only
Emacs 24+. Its semantics are just that much saner.
Fanael Linithien [Sun, 23 Nov 2014 21:26:54 +0000 (22:26 +0100)]
Add a Emacs 24 requirement.
Only Emacs >= 24 has prog-mode.
Fanael Linithien [Sun, 23 Nov 2014 15:05:48 +0000 (16:05 +0100)]
Correctly recognize a comment if the previous line is a comment ending in $.
Fanael Linithien [Sat, 22 Nov 2014 18:25:43 +0000 (19:25 +0100)]
Avoid putting properties past the end of the buffer.
Fanael Linithien [Sat, 22 Nov 2014 18:03:23 +0000 (19:03 +0100)]
Don't use dotted list syntax unless necessary.
Fanael Linithien [Sat, 22 Nov 2014 17:59:53 +0000 (18:59 +0100)]
Remove unnecessary regexp group.
Fanael Linithien [Sat, 22 Nov 2014 17:57:31 +0000 (18:57 +0100)]
Correctly recognize comments.
Fanael Linithien [Sat, 22 Nov 2014 17:35:46 +0000 (18:35 +0100)]
Set up a proper syntax table for ninja-mode.
Since quotes are not meant to be treated as string delimiters,
the syntax table is the place to tell Emacs so.
This also means syntactic fontification can be reenabled and the
font-lock keyword entry for comments removed.
Fanael Linithien [Sat, 22 Nov 2014 17:23:01 +0000 (18:23 +0100)]
Set comment-start buffer-locally, not globally.
Fanael Linithien [Sat, 22 Nov 2014 17:22:11 +0000 (18:22 +0100)]
Use quasi-quoting instead of list+cons.
Fanael Linithien [Sat, 22 Nov 2014 17:15:46 +0000 (18:15 +0100)]
Reindent ninja-mode.el using Emacs.
Emacs knows best how to indent Emacs Lisp.
Fanael Linithien [Sat, 22 Nov 2014 17:17:39 +0000 (18:17 +0100)]
Use double semicolon comments.
Fanael Linithien [Sat, 22 Nov 2014 17:15:09 +0000 (18:15 +0100)]
Don't leave lone closing parens.
Elan Ruusamäe [Tue, 21 Jan 2014 22:33:08 +0000 (00:33 +0200)]
no subshell
don't need subshell to send stderr to /dev/null
Evan Martin [Sun, 23 Nov 2014 20:14:02 +0000 (12:14 -0800)]
Merge pull request #772 from drbo/syntax_bugfix
Added highlighting in Emacs for ${...} variables
Nico Weber [Sat, 22 Nov 2014 19:45:18 +0000 (11:45 -0800)]
Merge pull request #866 from nico/winfix
Fix Windows build after #862. Thanks to @harig for the report.
Nico Weber [Sat, 22 Nov 2014 19:43:33 +0000 (11:43 -0800)]
Fix Windows build after #862. Thanks to @harig for the report.
Nico Weber [Sat, 22 Nov 2014 02:24:03 +0000 (18:24 -0800)]
Merge pull request #862 from nico/browse
Make browse detection consistent with other platform checks.
Nico Weber [Sat, 22 Nov 2014 02:23:07 +0000 (18:23 -0800)]
Merge pull request #863 from nico/nopthread
Stop linking pthread.
Nico Weber [Sat, 22 Nov 2014 02:18:30 +0000 (18:18 -0800)]
Remove now-unused variable test_libs.
Nico Weber [Sat, 22 Nov 2014 02:13:48 +0000 (18:13 -0800)]
Stop linking pthread.
It was only needed by gtest, which is no longer used.
(Intesting note: I checked when the -lpthread flag was added, and it's
been around since the first revision of build.ninja, which used to be
checked in before configure.py existed. Back then, it looks like '@' was
used to dereference built-in variables, and build outputs were also
prefixed by '@'!).
Nico Weber [Fri, 21 Nov 2014 00:56:17 +0000 (16:56 -0800)]
Make browse detection consistent with other platform checks.
Nico Weber [Fri, 21 Nov 2014 00:49:52 +0000 (16:49 -0800)]
Merge pull request #861 from nico/nosub
Remove duplicate import. No behavior change.
Nico Weber [Fri, 21 Nov 2014 00:46:52 +0000 (16:46 -0800)]
Remove duplicate import. No behavior change.
Evan Martin [Tue, 18 Nov 2014 19:50:09 +0000 (11:50 -0800)]
Merge pull request #859 from martine/platform-helper
merge platform_helper into configure script
Evan Martin [Tue, 18 Nov 2014 18:09:07 +0000 (10:09 -0800)]
merge platform_helper into configure script
With this code all in one place, it's easier to spot unused code and
simplification opportunities.
Evan Martin [Tue, 18 Nov 2014 17:58:45 +0000 (09:58 -0800)]
drop leftover references to bootstrap.py
Evan Martin [Tue, 18 Nov 2014 17:51:08 +0000 (09:51 -0800)]
Merge pull request #858 from martine/travis-bootstrap
switch travis to use new --bootstrap mode for building
Evan Martin [Tue, 18 Nov 2014 17:44:38 +0000 (09:44 -0800)]
Merge pull request #813 from cdlm/emacs-mode-require-newline
Emacs mode: inherit from prog-mode
Evan Martin [Tue, 18 Nov 2014 17:44:14 +0000 (09:44 -0800)]
Merge pull request #836 from nocnokneo/patch-1
Mention optional files in installation instructions
Evan Martin [Tue, 18 Nov 2014 17:07:43 +0000 (09:07 -0800)]
switch travis to use new --bootstrap mode for building
Evan Martin [Tue, 18 Nov 2014 17:06:48 +0000 (09:06 -0800)]
Merge pull request #854 from martine/bootstrap
add a --bootstrap mode for configure.py
Evan Martin [Tue, 18 Nov 2014 16:04:23 +0000 (08:04 -0800)]
drop NINJA_BOOTSTRAP define
Evan Martin [Tue, 18 Nov 2014 16:48:39 +0000 (08:48 -0800)]
Merge pull request #857 from martine/travis-python-test
also test ninja_syntax.py in travis
Evan Martin [Tue, 18 Nov 2014 16:22:42 +0000 (08:22 -0800)]
also test ninja_syntax.py in travis
Evan Martin [Fri, 14 Nov 2014 22:22:56 +0000 (14:22 -0800)]
drop bootstrap.py
We now use configure.py --bootstrap. Direct users of this script to
use the other one.
Evan Martin [Fri, 14 Nov 2014 18:53:33 +0000 (10:53 -0800)]
add a --bootstrap mode for configure.py
Instead of bootstrapping through a separate script, instead make
configure.py able to either generate a build.ninja *or* just execute
all the computed commands to build a ninja binary.
Evan Martin [Tue, 18 Nov 2014 15:48:26 +0000 (07:48 -0800)]
add an "expand" function to ninja_syntax
Implements basic variable expansion for use in configure.py.
Nico Weber [Mon, 17 Nov 2014 23:16:18 +0000 (15:16 -0800)]
Merge pull request #856 from nico/TABS
emacs: Remove an empty line, wrap a comment.
Nico Weber [Mon, 17 Nov 2014 23:15:10 +0000 (15:15 -0800)]
emacs: Remove an empty line, wrap a comment.
Nico Weber [Fri, 14 Nov 2014 01:57:53 +0000 (17:57 -0800)]
Merge pull request #842 from nico/solaris
Fix building on Solaris.
Nico Weber [Fri, 14 Nov 2014 01:56:12 +0000 (17:56 -0800)]
Merge pull request #852 from nico/browse
Make sure configure.py and ninja.cc always agree on if -t browse is incl...
Nico Weber [Fri, 14 Nov 2014 01:53:26 +0000 (17:53 -0800)]
Make sure configure.py and ninja.cc always agree on if -t browse is included.
No behavior change on most platforms. On solaris, -t browse was compiled in
in ninja.cc but browse.cc wasn't compiled in, which probably means that building
on Solaris didn't work. It might be better now.
This also makes browse.cc automatically not included in bootstrap builds;
previously this was done manually through the NINJA_BOOTSTRAP check.
Nico Weber [Fri, 14 Nov 2014 01:35:10 +0000 (17:35 -0800)]
Merge pull request #851 from nico/cleanup
Remove unused variables.
Nico Weber [Fri, 14 Nov 2014 01:31:37 +0000 (17:31 -0800)]
Remove unused variables.
Nico Weber [Wed, 12 Nov 2014 20:47:35 +0000 (12:47 -0800)]
Merge pull request #850 from sgraham/ocd
whitespace/comment/wrap fixes, no intended functionality change
Nico Weber [Wed, 12 Nov 2014 20:40:57 +0000 (12:40 -0800)]
Merge pull request #849 from sgraham/set-err-canon-components
set *err when too many components in CanonicalizePath
Scott Graham [Wed, 12 Nov 2014 20:39:20 +0000 (12:39 -0800)]
whitespace/comment/wrap fixes, no intended functionality change
Scott Graham [Wed, 12 Nov 2014 20:32:45 +0000 (12:32 -0800)]
set *err when too many components in CanonicalizePath
Nico Weber [Wed, 12 Nov 2014 18:10:29 +0000 (10:10 -0800)]
Merge pull request #848 from sgraham/canon-maintain
Maintain bitvector of original slashes from manifest when canonicalizing
Scott Graham [Wed, 12 Nov 2014 17:16:25 +0000 (09:16 -0800)]
properly guard against slash_bits overflow
Scott Graham [Tue, 11 Nov 2014 03:38:08 +0000 (19:38 -0800)]
fix not respecting length
Scott Graham [Tue, 11 Nov 2014 01:55:18 +0000 (17:55 -0800)]
no need to save slash_bits, add comment
Scott Graham [Tue, 11 Nov 2014 01:18:16 +0000 (17:18 -0800)]
save slash_bits in depslog
Scott Graham [Tue, 11 Nov 2014 00:35:31 +0000 (16:35 -0800)]
no need to Decanonicalize on non-Windows
Scott Graham [Mon, 10 Nov 2014 22:48:55 +0000 (14:48 -0800)]
fix CanonicalizePath going past StringPiece length + test
Scott Graham [Mon, 10 Nov 2014 20:38:55 +0000 (12:38 -0800)]
initialize slash_bits on non-win
Scott Graham [Mon, 10 Nov 2014 20:00:16 +0000 (12:00 -0800)]
make all GetNode explicit, add DepsLog canonicalize test
Scott Graham [Sun, 9 Nov 2014 07:36:26 +0000 (23:36 -0800)]
non-win compilation
Scott Graham [Sun, 9 Nov 2014 07:32:21 +0000 (23:32 -0800)]
improve test
Scott Graham [Sun, 9 Nov 2014 07:10:34 +0000 (23:10 -0800)]
assert no slashes in default GetNode
Scott Graham [Sun, 9 Nov 2014 07:01:23 +0000 (23:01 -0800)]
fix order of args to CanonicalizePath
Scott Graham [Sun, 9 Nov 2014 06:49:21 +0000 (22:49 -0800)]
remove CanonicalizePath overloads, test for toplevel behaviour
Scott Graham [Sat, 8 Nov 2014 19:47:22 +0000 (11:47 -0800)]
path decanonicalization when building command
Scott Graham [Sat, 8 Nov 2014 19:25:03 +0000 (11:25 -0800)]
fix multiple sequential slashes
Scott Graham [Sat, 8 Nov 2014 06:38:59 +0000 (22:38 -0800)]
wip on adding tests at higher level, some not right
Scott Graham [Sat, 8 Nov 2014 06:20:34 +0000 (22:20 -0800)]
track back->forward conversions in a bitmask
Nico Weber [Mon, 3 Nov 2014 22:35:55 +0000 (14:35 -0800)]
Merge pull request #822 from tzik/throttle
Throttle the number of pending commands by the parallelism configuration
Nico Weber [Sat, 1 Nov 2014 19:26:19 +0000 (12:26 -0700)]
Merge pull request #825 from Rapptz/master
Suppress warnings from building with MinGW
Nico Weber [Sat, 1 Nov 2014 19:20:42 +0000 (12:20 -0700)]
Fix building on Solaris.
"SunOS" and "Solaris" are the same thing these days, so make them go
down the same code paths. In particular, the browse feature was omitted
on solaris but not sunos5, causing trouble for some folks (see #838).
Nico Weber [Fri, 31 Oct 2014 01:58:28 +0000 (18:58 -0700)]
Merge pull request #841 from sgraham/strchr
Use strchr in \ conversion in CanonicalizePath on Windows
Scott Graham [Thu, 30 Oct 2014 23:52:55 +0000 (16:52 -0700)]
Use strchr in \ conversion in CanonicalizePath on Windows
Nico Weber [Thu, 30 Oct 2014 23:35:33 +0000 (16:35 -0700)]
Merge pull request #840 from sgraham/canon-win-squashed
CanonicalizePath handles \ on Windows
Scott Graham [Thu, 30 Oct 2014 22:34:25 +0000 (15:34 -0700)]
CanonicalizePath handles \ on Windows
Taylor Braun-Jones [Sun, 26 Oct 2014 20:36:36 +0000 (16:36 -0400)]
Mention optional files in installation instructions