Brad King [Tue, 19 Apr 2016 19:57:49 +0000 (15:57 -0400)]
Improve Plan::EdgeFinished signature
Use an enumeration instead of a boolean to clarify the purpose of
arguments at call sites.
Suggested-by: Nico Weber <nicolasweber@gmx.de>
Nico Weber [Tue, 19 Apr 2016 19:13:59 +0000 (15:13 -0400)]
Merge pull request #1126 from bradking/pool-release-on-fail
Release the pool slot held by an edge whether it succeeds or fails
Nico Weber [Tue, 19 Apr 2016 18:10:47 +0000 (14:10 -0400)]
Merge pull request #1130 from JohnstonJ/fix-tests-on-vs2015
ninja_test: Fix Visual C++ 2015 warnings/errors about name hiding.
Nico Weber [Tue, 19 Apr 2016 15:22:53 +0000 (11:22 -0400)]
Merge pull request #1059 from bradking/avoid-double-scheduling-edge
Avoid double-scheduling build edges in another case
James Johnston [Mon, 18 Apr 2016 20:25:40 +0000 (20:25 +0000)]
ninja_test: Fix Visual C++ 2015 warnings/errors about name hiding.
Visual C++ 2015 warns if a local variable hides visibility of another variable
in a higher scope. Since this project declares warnings as errors, ninja_test
simply won't build on Visual C++ 2015.
The variables have been renamed and scope limited as appropriate, so that
ninja_test will build without error now on Visual C++ 2015.
David Emett [Sun, 20 Sep 2015 13:43:01 +0000 (14:43 +0100)]
Add another test case covering pool release on edge failure
With this build file:
pool failpool
depth = 1
rule fail
command = fail
pool = failpool
build out1: fail
build out2: fail
build out3: fail
build final: phony out1 out2 out3
Running `ninja -k 0` should run out1..3 sequentially before failing, but
until recently we would fail after just running out1. Add a test
covering this case.
Fredrik Medley [Sun, 12 Jul 2015 06:53:19 +0000 (08:53 +0200)]
Release the pool slot held by an edge whether it succeeds or fails
When an edge finishes building, it should be release from its pool.
Make sure that this also is the case when an edge fails to build.
The bug can be shown with a pool has size N, then `ninja -k N+1` will
still stop after N failing commands for that pool, even if there are
many more jobs to be done for that pool:
pool mypool
depth = 1
rule bad_rule
command = false
pool = mypool
build a : bad_rule
build b : bad_rule
Current behaviour:
$ ninja -k 0
[1/2] false
FAILED: false
ninja: build stopped: cannot make progress due to previous errors.
Expected behaviour:
$ ninja -k 0
[1/2] false
FAILED: false
[2/2] false
FAILED: false
ninja: build stopped: cannot make progress due to previous errors.
Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
Nico Weber [Wed, 6 Apr 2016 01:31:29 +0000 (21:31 -0400)]
Merge pull request #1125 from nico/wintools
Make deps=msvc experimentally available on non-Windows.
Nico Weber [Fri, 12 Jun 2015 06:53:32 +0000 (23:53 -0700)]
Make deps=msvc experimentally available on non-Windows.
This makes it possible to run most of the clparser tests on non-Windows,
and is potentially useful for cross-compiling on non-Windows hosts.
Also, the manual didn't document this as Windows-only previously.
If you use this on non-Windows, please let me know, else I might undo
this change again in the future.
Nico Weber [Tue, 5 Apr 2016 18:13:44 +0000 (14:13 -0400)]
Merge pull request #1118 from nico/posixspawn2
Use posix_spawn() instead of fork()/exec().
Nico Weber [Mon, 4 Apr 2016 21:29:04 +0000 (14:29 -0700)]
Merge pull request #1112 from Lekensteyn/browse-tool-fixes
browse tool: Allow customization of port number, Py3 fix
Nico Weber [Mon, 21 Mar 2016 01:41:15 +0000 (21:41 -0400)]
Use posix_spawn() instead of fork()/exec().
posix_spawn() is a syscall on OS X and Solaris and a bit faster. It's
also easier emulate for cygwin, and the code is a bit simpler.
Peter Wu [Fri, 11 Mar 2016 23:24:00 +0000 (00:24 +0100)]
browse: support --port and --no-browser options
Add --port option to override the default port (8000).
Add --no-browser option to avoid opening a web browser (useful over
SSH).
Make the target name optional, using "all" if omitted.
Peter Wu [Thu, 25 Feb 2016 23:23:48 +0000 (00:23 +0100)]
browse.py: Python 3 compatibility
Nico Weber [Sat, 5 Mar 2016 02:21:14 +0000 (18:21 -0800)]
Merge pull request #1113 from nico/nosetsid
Revert #910.
Nico Weber [Sat, 5 Mar 2016 01:51:06 +0000 (17:51 -0800)]
Revert #910.
The change caused some issues (it makes it impossible ot use
posix_spawn() and makes it harder to suspend children on ctrl-z). After
discussing with jln: Since it fixes a corner case that can be fixed by
explicitly running commands that need it in a wrapper that setsid()s
them, let's try reverting it for a while. Please shout if this is a
problem for you.
See also #1097.
Nico Weber [Sat, 5 Mar 2016 01:43:33 +0000 (17:43 -0800)]
Merge pull request #1102 from bradking/remove-unnecessary-StatIfNecessary
Remove StatIfNecessary call that is never necessary
Peter Wu [Thu, 25 Feb 2016 23:16:15 +0000 (00:16 +0100)]
browse.py: allow port override via environment variable
Brad King [Tue, 17 Nov 2015 19:28:11 +0000 (14:28 -0500)]
Remove StatIfNecessary call that is never necessary
The call to StatIfNecessary in DependencyScan::RecomputeOutputsDirty was
added by commit v1.4.0^2~7^2~1 (Share more code between CleanNode() and
RecomputeDirty(), 2013-09-02) while consolidating code paths. However,
it was needed only when called from RecomputeDirty because prior to
refactoring the CleanNode code path did not call it.
Later commit v1.6.0^2~46^2 (Let DependencyScan::RecomputeDirty() work
correclty with cyclic graphs, 2014-12-07) added back to RecomputeDirty a
loop over outputs that calls StatIfNecessary. Therefore
RecomputeOutputsDirty no longer needs to call StatIfNecessary for either
of its own callers.
Nico Weber [Wed, 17 Feb 2016 20:03:14 +0000 (15:03 -0500)]
Merge pull request #1110 from G4m4/explicit_std_prefix
Fix ambiguous call to set_terminate on Windows platform
g4m4 [Wed, 17 Feb 2016 10:35:52 +0000 (11:35 +0100)]
Fix ambiguous call to set_terminate on Windows platform
On Windows set_terminate() could either be the standard C++ one or (actually the same one but in the global namespace) the CRT one declared in corecrt_terminate.h
Hence this ambiguity - this patch solves it.
Signed-off-by: g4m4 <misept.dieseneuf@gmail.com>
Nico Weber [Sun, 7 Feb 2016 20:57:30 +0000 (15:57 -0500)]
Merge pull request #1107 from nicolasdespres/ninja_syntax_implicit_outputs
Add support for implicit outputs in ninja_syntax.py.
Nico Weber [Sun, 7 Feb 2016 20:56:19 +0000 (15:56 -0500)]
Merge pull request #1108 from edbaunton/patch-1
Add link to mailing list
Ed Baunton [Sat, 6 Feb 2016 22:56:20 +0000 (22:56 +0000)]
Add link to mailing list
As a convenience to new users, provide a link to the mailing list.
Nicolas Despres [Sat, 6 Feb 2016 08:37:51 +0000 (09:37 +0100)]
Add support for implicit outputs in ninja_syntax.py.
Nico Weber [Fri, 5 Feb 2016 21:26:52 +0000 (16:26 -0500)]
Merge pull request #1106 from nico/winfix
win: Only drop /showIncludes in bootstrap builds.
Nico Weber [Fri, 5 Feb 2016 18:28:56 +0000 (13:28 -0500)]
win: Only drop /showIncludes in bootstrap builds.
\vFixes #1103.
Nico Weber [Fri, 5 Feb 2016 16:39:40 +0000 (11:39 -0500)]
Merge pull request #1101 from fbenkstein/vs2010
disable warning about conditional expressions
Frank Benkstein [Thu, 4 Feb 2016 12:20:58 +0000 (13:20 +0100)]
MSVC: disable warning about constant conditional expressions
The standard headers for Visual Studio 2008 generate a warning about
constant conditional expressions when compiled with exception support
disabled. This is caused by the _CATCH_ALL macro in xstddef which is
defined thusly:
#ifdef _HAS_EXCEPTIONS
#define _CATCH_ALL } catch (...) {
#else
#define _CATCH_ALL } if (0) {
#endif
Nico Weber [Wed, 3 Feb 2016 22:16:49 +0000 (17:16 -0500)]
Merge pull request #1100 from nico/doc
Minor updates to the manual.
Nico Weber [Wed, 3 Feb 2016 22:01:45 +0000 (17:01 -0500)]
Minor updates to the manual.
* Update link to Chromium's ninja docs (fixes #1038)
* Update cmake URL to what it redirects to, and mention that ninja
is well-supported on all platforms in newer CMake versions.
* Let "others" link to the wiki page listing generators.
Brad King [Tue, 11 Aug 2015 17:17:12 +0000 (13:17 -0400)]
Avoid double-scheduling build edges in another case
The change in commit v1.2.0~3^2~3^2~3 (Fix duplicate edge Pool crash in
the minimally invasive way, 2013-03-18) avoids double-scheduling in a
case involving duplicate out edges. However, double-scheduling may also
occur on a consistent graph when an edge and one of its dependencies
share an order-only input:
$ cat build.ninja
...
build c: touch
build b: touch || c
build a: touch | b || c
$ ninja a
$ rm a c
$ ninja a
In this case 'c' will build first. When NodeFinished('c') loops over
the out edges it will find AllInputsReady is true for 'b' and call
EdgeFinished('b') since it is not wanted (up to date). This will
call NodeFinished('b') which will loop over its out edges, find
AllInputsReady is true for 'a', and call ScheduleEdge('a'). When
we eventually return to the loop in NodeFinished('c') it will move
on to its second output and find that AllInputsReady is true for
'a' and call ScheduleEdge('a') again.
Teach ScheduleEdge to tolerate duplicate calls for an edge that has
already been scheduled. Avoid calling EdgeScheduled more than once
for the same edge.
Nico Weber [Wed, 3 Feb 2016 21:11:28 +0000 (16:11 -0500)]
Merge pull request #1033 from colincross/failed
Print output file on failure
Nico Weber [Wed, 3 Feb 2016 21:07:11 +0000 (16:07 -0500)]
Merge pull request #989 from bradking/implicit-outputs
Add support for build statement implicit outputs
Nico Weber [Wed, 3 Feb 2016 20:57:10 +0000 (15:57 -0500)]
Merge pull request #1060 from bradking/deduplicate-disk-interface
Deduplicate disk abstraction infrastructure
Nico Weber [Wed, 3 Feb 2016 20:47:56 +0000 (15:47 -0500)]
Merge pull request #1099 from bradking/fix-perftest-compilation
perftest: fix compilation after dupe_edge_should_err change
Brad King [Wed, 3 Feb 2016 18:44:46 +0000 (13:44 -0500)]
Replace ManifestParser::FileReader with general FileReader
Avoid having two separate filesystem interfaces. Simplify test
infrastructure by avoiding custom `ManifestParser::FileReader`
implementations.
Brad King [Wed, 3 Feb 2016 18:20:00 +0000 (13:20 -0500)]
Expose more details in FileReader::ReadFile signature
Return a status so callers can distinguish a missing file from an empty
file. This allows our VirtualFileSystem test infrastructure to report
as missing any file for which it has no entry.
Brad King [Wed, 3 Feb 2016 18:18:37 +0000 (13:18 -0500)]
Factor a `FileReader` base class out of `DiskInterface`
Some clients will need only the ability to read files, so provide this
as a more narrow interface than the full disk interface.
Brad King [Mon, 13 Jul 2015 19:25:50 +0000 (15:25 -0400)]
Add support for build statement implicit outputs
Some build rules produce outputs that are not mentioned on the command
line but that should be part of the build graph. Such outputs should
not be named in the `$out` variable. Extend the build statement syntax
to support specification of implicit outputs using the syntax
`| out1 out2` after the explicit outputs and before the `:`.
For example, compilation of a Fortran source file `foo.f90` that defines
`MODULE FOO` may now be specified as:
rule fc
command = f95 -c $in -o $out
build foo.o | foo.mod: fc foo.f90
The `foo.mod` file is an implicit output generated by the compiler based
on the content of the source file and not mentioned on the command line.
Nico Weber [Tue, 2 Feb 2016 23:20:01 +0000 (18:20 -0500)]
Merge pull request #1076 from colincross/canonicalize
Canonicalize "." to "."
Brad King [Tue, 2 Feb 2016 14:34:53 +0000 (09:34 -0500)]
perftest: fix compilation after dupe_edge_should_err change
Fix some ManifestParser constructor calls missed by commit
56bab441b7
(dupe_edge_should_err from bool to enum, 2016-01-27).
Nico Weber [Fri, 29 Jan 2016 03:07:12 +0000 (22:07 -0500)]
Merge pull request #1096 from sgraham/dupe-edge-action
dupe_edge_should_err from bool to enum
Nico Weber [Fri, 29 Jan 2016 03:01:22 +0000 (22:01 -0500)]
Merge pull request #1098 from shinh/keepdep
Add -d keepdepfile to preserve depfiles
Shinichiro Hamaji [Thu, 28 Jan 2016 09:16:07 +0000 (18:16 +0900)]
Add -d keepdepfile to preserve depfiles
This is useful when you are developing a tool which generates
GCC-style depfiles.
Scott Graham [Wed, 27 Jan 2016 19:10:34 +0000 (11:10 -0800)]
dupe_edge_should_err from bool to enum
Nico Weber [Wed, 27 Jan 2016 15:17:31 +0000 (10:17 -0500)]
Merge pull request #1095 from sgraham/dupbuild-err
Make dupbuild=err work in subninja
Scott Graham [Wed, 27 Jan 2016 03:44:27 +0000 (19:44 -0800)]
Make dupbuild=err work in subninja
Nico Weber [Wed, 27 Jan 2016 02:18:11 +0000 (21:18 -0500)]
Merge pull request #1094 from sphawk/master
fix for localized version of cl.exe
Nico Weber [Wed, 27 Jan 2016 02:15:23 +0000 (21:15 -0500)]
Merge pull request #1085 from tetsuok/remove-unnecessary-std
Remove unnecessary `std::`
sphawk [Mon, 25 Jan 2016 13:38:08 +0000 (22:38 +0900)]
fix for localized version of cl.exe
Evan Martin [Sun, 10 Jan 2016 17:30:44 +0000 (09:30 -0800)]
Merge pull request #1086 from tetsuok/use-container-based-infra-for-ci
Use container-based infrastructure for travis-ci.
Tetsuo Kiso [Sun, 10 Jan 2016 13:35:45 +0000 (05:35 -0800)]
Use container-based infrastructure for travis-ci.
To start up faster.
Tetsuo Kiso [Sun, 10 Jan 2016 13:23:35 +0000 (05:23 -0800)]
Remove unnecessary `std::`
Nico Weber [Tue, 29 Dec 2015 15:08:42 +0000 (10:08 -0500)]
Merge pull request #1073 from ninja-build/manual-font
use the default font size for manual headings
Nico Weber [Tue, 29 Dec 2015 15:08:23 +0000 (10:08 -0500)]
Merge pull request #1074 from ninja-build/manual-command
add a section to the manual discussion the command= variable
Nico Weber [Tue, 29 Dec 2015 15:03:08 +0000 (10:03 -0500)]
Merge pull request #1082 from nicolasdespres/zshcomp-intermediary-targets
Teach zsh to complete intermediary targets.
Nicolas Despres [Thu, 24 Dec 2015 15:47:33 +0000 (16:47 +0100)]
Teach zsh to complete intermediary targets.
Bash completion script uses "-t targets all" to list the target which
is faster than "-t targets" and reports intermediary targets
(see the manual entry for the 'targets' tool).
See commit
fc135c45.
Colin Cross [Wed, 16 Dec 2015 23:29:02 +0000 (15:29 -0800)]
Canonicalize "." to "."
"." is a legal path, if the string is empty after canonicalization
return ".".
Evan Martin [Wed, 16 Dec 2015 16:44:23 +0000 (08:44 -0800)]
add a section to the manual discussing the command= variable
This includes a mention of using cmd /c on Windows.
This would have helped on issue #1070 for example.
Evan Martin [Wed, 16 Dec 2015 16:48:59 +0000 (08:48 -0800)]
use the default font size for manual headings
The third-level subsection headings were almost indistinguishable
from the second-level ones. Fix this by just using the default
styling.
Evan Martin [Wed, 9 Dec 2015 22:48:14 +0000 (14:48 -0800)]
Merge pull request #1069 from nicolasdespres/dry_manifest_regen
Do not attempt to rebuild infinitely in dry-run mode.
Nicolas Despres [Wed, 9 Dec 2015 22:18:18 +0000 (23:18 +0100)]
Do not attempt to rebuild infinitely in dry-run mode.
Evan Martin [Sun, 6 Dec 2015 19:17:55 +0000 (11:17 -0800)]
Merge pull request #1042 from avallee/master
Fix wrapping file paths in Writer.comment
Evan Martin [Sun, 6 Dec 2015 19:17:17 +0000 (11:17 -0800)]
Merge pull request #1062 from tfarina/bindings-typedef
make use of Bindings typedef
Evan Martin [Sun, 6 Dec 2015 19:16:42 +0000 (11:16 -0800)]
Merge pull request #1063 from ptzz/master
Fix typo
Evan Martin [Sun, 6 Dec 2015 19:16:26 +0000 (11:16 -0800)]
Merge pull request #1064 from NiklasRosenstein/1043-msvc_deps_prefix-per-rule
add "msvc_deps_prefix" to Rule::IsReservedBinding()
Niklas Rosenstein [Sun, 6 Dec 2015 15:14:33 +0000 (16:14 +0100)]
add "msvc_deps_prefix" to Rule::IsReservedBinding()
fixes the error about an unexpected variable for a rule that
declares the msvc_deps_prefix. The manual suggests that this
should work since Ninja 1.5
(https://ninja-build.org/manual.html#ref_rule).
Closes #1043
ptzz [Sun, 6 Dec 2015 01:23:49 +0000 (02:23 +0100)]
Fix typo
Thiago Farina [Fri, 4 Dec 2015 22:31:19 +0000 (20:31 -0200)]
make use of Bindings typedef
Looks like we declared this typedef but never used it.
It seems we just forgot to use it so this patch makes uses of it now.
Otherwise we could just delete it.
Alex Vallée [Fri, 27 Nov 2015 21:09:34 +0000 (16:09 -0500)]
Disable long word wrapping entirely in comments.
As pointed out by nico, we should unconditionally disable breaking of
long words in comments. It is unlikely long words that are in comments
should be split (like pathnames).
Nico Weber [Thu, 19 Nov 2015 20:41:32 +0000 (12:41 -0800)]
prefer https in readme
Nico Weber [Wed, 18 Nov 2015 05:34:10 +0000 (21:34 -0800)]
Merge pull request #1053 from ninja-build/configure
Minor tweaks to the configure script
Evan Martin [Tue, 17 Nov 2015 22:28:08 +0000 (14:28 -0800)]
when building with cwd = source root, use relative paths
The pull request that introduced building from a directory other
than the source dir, https://github.com/ninja-build/ninja/pull/979,
made it so all source paths are effectively absolute paths. This
change restores the old behavior in the case when you are building
in the source. See the comments there.
Evan Martin [Tue, 17 Nov 2015 22:26:18 +0000 (14:26 -0800)]
rename the build-file variable $sourcedir to $root
Confusingly, $sourcedir is the path to the root of the repository,
*not* the path to the src/ directory.
Evan Martin [Tue, 17 Nov 2015 22:23:13 +0000 (14:23 -0800)]
put warning flags together
Nico Weber [Tue, 17 Nov 2015 22:20:12 +0000 (14:20 -0800)]
Merge pull request #1052 from ninja-build/docs
Minor doc fixes
Evan Martin [Tue, 17 Nov 2015 22:13:44 +0000 (14:13 -0800)]
drop a [horizontal] definition table
The two columns of the table run together, making it hard to read.
Evan Martin [Tue, 17 Nov 2015 22:04:50 +0000 (14:04 -0800)]
improve docs generation, including PDF output
- Fix the manual build rules (missing the .xsl as an input).
- Add a README describing how the docs build works.
- Add rules that generate PDF, just 'cause we can.
Evan Martin [Tue, 17 Nov 2015 22:02:43 +0000 (14:02 -0800)]
provide a better title for the manual
In particular, this helps web search engines index it.
Nico Weber [Thu, 12 Nov 2015 05:46:33 +0000 (21:46 -0800)]
Merge pull request #1047 from pykello/master
Speed-up bash target auto-complete.
Nico Weber [Thu, 12 Nov 2015 05:46:19 +0000 (21:46 -0800)]
Merge pull request #1046 from zed0/master
Speed up zsh target completion
Alex Vallee [Thu, 12 Nov 2015 03:48:39 +0000 (22:48 -0500)]
Fix indent in pull request #1042.
Evan Martin [Thu, 12 Nov 2015 01:19:00 +0000 (17:19 -0800)]
Merge pull request #1007 from mikesep/aix
Support for AIX
Nico Weber [Thu, 12 Nov 2015 01:13:30 +0000 (17:13 -0800)]
Merge pull request #999 from colincross/dumbstatus
Print status when edge finishes on dumb terminals
Nico Weber [Thu, 12 Nov 2015 00:51:29 +0000 (16:51 -0800)]
Merge pull request #964 from nicolasdespres/sighup
Cleanup build on SIGHUP.
Nico Weber [Thu, 12 Nov 2015 00:34:38 +0000 (16:34 -0800)]
Merge pull request #763 from drbo/master
Allow paths with international characters in depfiles
Nico Weber [Wed, 11 Nov 2015 21:54:14 +0000 (13:54 -0800)]
Try to fix #685
Evan Martin [Wed, 11 Nov 2015 21:34:13 +0000 (13:34 -0800)]
drop more references to github/martine
Nico Weber [Wed, 11 Nov 2015 21:27:16 +0000 (13:27 -0800)]
Update link to point to ninja-build.org
Nico Weber [Wed, 11 Nov 2015 19:54:07 +0000 (11:54 -0800)]
Merge pull request #1049 from nico/update-links
Make links point to org page
Nico Weber [Wed, 11 Nov 2015 19:53:15 +0000 (11:53 -0800)]
Make links point to org page
Nico Weber [Wed, 11 Nov 2015 19:36:16 +0000 (11:36 -0800)]
test commit
Hadi Moshayedi [Sat, 31 Oct 2015 10:13:33 +0000 (06:13 -0400)]
Speed-up bash target auto-complete.
These speed-ups include:
* Let compgen do the command substitution. Similar to
https://lists.gnu.org/archive/html/bug-bash/2012-03/msg00115.html
* Use "cut" instead of "awk" for separating fields.
Ben Falconer [Fri, 30 Oct 2015 14:43:32 +0000 (14:43 +0000)]
Speed up zsh target completion
Alex Vallée [Fri, 23 Oct 2015 20:36:28 +0000 (16:36 -0400)]
Fix wrapping file paths in Writer.comment
Long file names, especially with hyphens will get incorrectly wrapped by
the comment method. Pass has_path=True to prevent this type of wrapping.
This is mainly so that longer path names can show up in comments on
their on line without breaking them up.
Mike Seplowitz [Wed, 21 Oct 2015 22:37:50 +0000 (18:37 -0400)]
Separate bootstrapped build from final build
AIX does not support rebuilding ninja in-place from the bootstrapped ninja.
Nico Weber [Thu, 22 Oct 2015 03:07:02 +0000 (20:07 -0700)]
Merge pull request #1015 from moroten/docs-relpath
Describe why to use relative paths
Nico Weber [Thu, 22 Oct 2015 01:49:56 +0000 (18:49 -0700)]
Merge pull request #1040 from peter1000/patch-1
Fixes typo
Nico Weber [Wed, 21 Oct 2015 23:35:03 +0000 (16:35 -0700)]
Merge pull request #1029 from nicolasdespres/fix-doc-typo
Fix typo.