platform/upstream/ninja.git
4 years agoMerge changes Iaa05196d,I8bd4f4de,I721e1ff9 into tizen accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_unified sandbox/backup/ninja-1.9.0_20201203 tizen tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.112412 accepted/tizen/6.0/unified/hotfix/20201102.231740 accepted/tizen/base/20201123.235218 accepted/tizen/unified/20191209.033557 submit/tizen/20191205.233912 submit/tizen_6.0/20201029.205503 submit/tizen_6.0_hotfix/20201102.192903 submit/tizen_6.0_hotfix/20201103.115103 submit/tizen_base/20201123.051759 submit/tizen_base/20201123.060445 submit/tizen_base/20201123.061605 submit/tizen_base/20201123.075326 tizen_6.0.m2_release
Donghun Kwak [Thu, 5 Dec 2019 23:33:30 +0000 (23:33 +0000)]
Merge changes Iaa05196d,I8bd4f4de,I721e1ff9 into tizen

* changes:
  Bump to ninja 1.9.0
  Merge branch 'tizen' of ssh://review.tizen.org:29418/platform/upstream/ninja into tizen
  Rebase for ninja 1.9.0

4 years agoMerge "Imported Upstream version 1.9.0" into tizen
Donghun Kwak [Thu, 5 Dec 2019 23:33:22 +0000 (23:33 +0000)]
Merge "Imported Upstream version 1.9.0" into tizen

4 years agoBump to ninja 1.9.0 78/219478/1
Hyunjee Kim [Thu, 5 Dec 2019 07:16:36 +0000 (16:16 +0900)]
Bump to ninja 1.9.0

Change-Id: Iaa05196d7920a7213d3336245eb4901626664968
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
4 years agoMerge branch 'tizen' of ssh://review.tizen.org:29418/platform/upstream/ninja into... 77/219477/1
Hyunjee Kim [Thu, 5 Dec 2019 07:16:09 +0000 (16:16 +0900)]
Merge branch 'tizen' of ssh://review.tizen.org:29418/platform/upstream/ninja into tizen

Change-Id: I8bd4f4de8468f2dcac5b0cba43b68e8227f16db2
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
4 years agoRebase for ninja 1.9.0 76/219476/1
WonYoung Choi [Thu, 13 Oct 2016 08:15:47 +0000 (17:15 +0900)]
Rebase for ninja 1.9.0

Change-Id: I721e1ff9aaf0a11751c7c5fc1324d03550fd8ba9
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
4 years agoImported Upstream version 1.9.0 72/219472/1 upstream/1.9.0
Hyunjee Kim [Thu, 5 Dec 2019 07:10:30 +0000 (16:10 +0900)]
Imported Upstream version 1.9.0

Change-Id: I5ed54866797f3d3647a92ac369e09f1e98ba760e
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
5 years agoBump to ninja 1.8.2 87/208987/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.012022 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074355 accepted/tizen/5.5/unified/wearable/hotfix/20201027.100710 accepted/tizen/unified/20190703.110618 submit/tizen/20190702.045552 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 submit/tizen_5.5_wearable_hotfix/20201026.184307 submit/tizen_base/20190702.044715 tizen_5.5.m2_release
Hyunjee Kim [Tue, 2 Jul 2019 00:50:29 +0000 (09:50 +0900)]
Bump to ninja 1.8.2

Change-Id: Icaa8fb4c579022623a37b9522a948263b365b13f
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
5 years agoMerge branch 'tizen_base' of ssh://review.tizen.org:29418/platform/upstream/ninja... 86/208986/1
Hyunjee Kim [Tue, 2 Jul 2019 00:47:08 +0000 (09:47 +0900)]
Merge branch 'tizen_base' of ssh://review.tizen.org:29418/platform/upstream/ninja into tizen_base

Change-Id: Ib69ec80dd36c0c58064da4be52b1ce42bd00091c
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
5 years agoRebase for ninja 1.8.2 85/208985/1
WonYoung Choi [Thu, 13 Oct 2016 08:15:47 +0000 (17:15 +0900)]
Rebase for ninja 1.8.2

Change-Id: Icb54fc90df38800f1b03836c5f2beb8701dfc11d
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
5 years agoImported Upstream version 1.8.2 upstream/1.8.2
Hyunjee Kim [Tue, 2 Jul 2019 00:43:26 +0000 (09:43 +0900)]
Imported Upstream version 1.8.2

5 years agoImported Upstream version 1.8.1
Hyunjee Kim [Tue, 2 Jul 2019 00:43:21 +0000 (09:43 +0900)]
Imported Upstream version 1.8.1

5 years agoImported Upstream version 1.8.0
Hyunjee Kim [Tue, 2 Jul 2019 00:43:17 +0000 (09:43 +0900)]
Imported Upstream version 1.8.0

5 years agoImported Upstream version 1.7.2
Hyunjee Kim [Tue, 2 Jul 2019 00:42:36 +0000 (09:42 +0900)]
Imported Upstream version 1.7.2

5 years agoImported Upstream version 1.7.1
Hyunjee Kim [Tue, 2 Jul 2019 00:42:23 +0000 (09:42 +0900)]
Imported Upstream version 1.7.1

7 years ago[4.0] stat syscall: Support large file more than 2GB. accepted/tizen_4.0_base accepted/tizen_5.0_unified sandbox/dh0128.kwak/ninja-1.7.0_20201123 sandbox/hj0426.kim/ninja_190702 tizen_4.0 tizen_4.0_base tizen_4.0_tv tizen_5.0 accepted/tizen/4.0/base/20170811.093003 accepted/tizen/4.0/base/20170828.221310 accepted/tizen/5.0/unified/20181102.030636 accepted/tizen/base/20170217.190137 accepted/tizen/unified/20180618.151440 submit/tizen/20180615.064603 submit/tizen_4.0/20180618.072001 submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_5.0/20181101.000007 submit/tizen_base/20170215.052753 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release
Geunsik Lim [Mon, 13 Feb 2017 09:51:09 +0000 (18:51 +0900)]
[4.0] stat syscall: Support large file more than 2GB.

This commit is to fix "Value too large for defined data type." issue in case of that
'stat' syscall executes to handle a large file(*.so) more than 2GB after moving to
m53 (Tizen 4.0) from m47 (Tizen 3.0).

@To maintainer of chromium-efl:
  In order to evaluate chromium-efl(m53) with gbs local build after applying this commit,
  Please, use "--keep-packs" option of GBS command.

* Reference:
  a. 28. Value too large for defined data type)
     https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Value-too-large-for-defined-data-type

  b. Make failing stat() calls abort the build.
     https://github.com/ninja-build/ninja/pull/937/commits/b334523f1da03adfcd23b6e7e7a66c8fcbf87840

*  GBS build error (chromium-efl, m53):
           . . . Upper Omission . . .
[ 1880s] /home/abuild/rpmbuild/BUILD/chromium-efl-53.2785.0.36/tizen_src/
         build/prebuild/ld: warning: hidden symbol 'SSL_get_peer_cert_chain' in
         obj/third_party/boringssl/libboringssl.a
         (obj/third_party/boringssl/src/ssl/boringssl.ssl_lib.o) is referenced by
         DSO //lib/libecore_con.so
[ 1880s] ninja: build stopped: stat(lib/libchromium-ewk.so): Value too large for defined data type.
[ 1880s] + tizen_src/build/apply_patches.sh -r
[ 1880s] error: Bad exit status from /var/tmp/rpm-tmp.Gnna3R (%build)

Reported-by: Youngsoo Choi <kenshin.choi@samsung.com>
Reviewed-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Chan Lee <chang45.lee@samsung.com>
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Change-Id: I77eb7cd60def255c002b74d643d194063ae9ebc8

8 years agoAdd rpm packaging for Tizen accepted/tizen_3.0.m2_base accepted/tizen_3.0_base sandbox/leemgs/stat tizen_3.0.m2_base tizen_3.0_base accepted/tizen/3.0.m2/base/20170104.082048 accepted/tizen/3.0/base/20161028.103031 accepted/tizen/base/20161016.035628 submit/tizen_3.0.m2_base/20170104.073748 submit/tizen_3.0_base/20161028.062323 submit/tizen_base/20161013.091521
WonYoung Choi [Thu, 13 Oct 2016 08:15:47 +0000 (17:15 +0900)]
Add rpm packaging for Tizen

Change-Id: Icb54fc90df38800f1b03836c5f2beb8701dfc11d

8 years agov1.7.0 upstream/1.7.0 v1.7.0
Nico Weber [Wed, 27 Apr 2016 19:17:10 +0000 (15:17 -0400)]
v1.7.0

8 years agomark this 1.7.0.git
Nico Weber [Wed, 27 Apr 2016 19:15:54 +0000 (15:15 -0400)]
mark this 1.7.0.git

8 years agoMerge pull request #1137 from nico/crashfix
Nico Weber [Wed, 27 Apr 2016 13:37:49 +0000 (09:37 -0400)]
Merge pull request #1137 from nico/crashfix

Fix crash with duplicate implicit outputs.

8 years agoFix crash with duplicate implicit outputs.
Nico Weber [Wed, 27 Apr 2016 01:55:20 +0000 (21:55 -0400)]
Fix crash with duplicate implicit outputs.

Sadly, duplicate outputs aren't an error by default in Ninja (see also
a new edge has no effect.  Remember to decrement the "number of
implicit outputs" counter for the new edge when this happens.

Fixes #1136.

8 years agoMerge pull request #1134 from danw/ubuntu-libc++
Nico Weber [Thu, 21 Apr 2016 01:57:14 +0000 (21:57 -0400)]
Merge pull request #1134 from danw/ubuntu-libc++

Add <stdlib.h> includes for clang++/libc++ on Ubuntu

8 years agoAdd <stdlib.h> includes for clang++/libc++ on Ubuntu
Dan Willemsen [Thu, 21 Apr 2016 00:29:00 +0000 (17:29 -0700)]
Add <stdlib.h> includes for clang++/libc++ on Ubuntu

There are a number of stdlib.h uses in these files without including
stdlib.h:

 hash_collision_bench.cc: rand, RAND_MAX, srand
 manifest_parser_perftest.cc: system, exit
 ninja_test.cc: EXIT_SUCCESS, EXIT_FAILURE
 test.cc: getenv, mkdtemp, system

This works on a Ubuntu g++/libstdc++ build, as the <algorithm> header
pulls in stdlib.h, and on a OSX clang++/libc++ build the <map> and
<string> headers pull in stdlib.h. But a Ubuntu clang++/libc++ build
does not pull in stdlib.h with any of these other headers.

 $ apt-get install clang-3.6 libc++-dev
 $ CXX=clang++-3.6 CFLAGS=-stdlib=libc++ LDFLAGS=-stdlib=libc++ \
   ./configure.py
 $ ninja ninja_test hash_collision_bench manifest_parser_perftest

This was originally discovered using the host toolchain provided with
Android, but the Ubuntu version is much easier to reproduce.

8 years agoMerge pull request #1116 from colincross/browse
Nico Weber [Tue, 19 Apr 2016 21:23:44 +0000 (17:23 -0400)]
Merge pull request #1116 from colincross/browse

Pass location of build.ninja file to browse script

8 years agoPass location of build.ninja file to browse script
Colin Cross [Mon, 7 Mar 2016 21:37:11 +0000 (13:37 -0800)]
Pass location of build.ninja file to browse script

Pass the value of -f to the browse python script so it can be passed
back to ninja -t query.

8 years agoMerge pull request #1131 from bradking/improve-EdgeFinished-signature
Nico Weber [Tue, 19 Apr 2016 20:18:05 +0000 (16:18 -0400)]
Merge pull request #1131 from bradking/improve-EdgeFinished-signature

Improve Plan::EdgeFinished signature

8 years agoImprove Plan::EdgeFinished signature
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>
8 years agoMerge pull request #1126 from bradking/pool-release-on-fail
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

8 years agoMerge pull request #1130 from JohnstonJ/fix-tests-on-vs2015
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.

8 years agoMerge pull request #1059 from bradking/avoid-double-scheduling-edge
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

8 years agoninja_test: Fix Visual C++ 2015 warnings/errors about name hiding.
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.

8 years agoAdd another test case covering pool release on edge failure
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.

8 years agoRelease the pool slot held by an edge whether it succeeds or fails
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>
8 years agoMerge pull request #1125 from nico/wintools
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.

8 years agoMake 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.

8 years agoMerge pull request #1118 from nico/posixspawn2
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().

8 years agoMerge pull request #1112 from Lekensteyn/browse-tool-fixes
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

8 years agoUse posix_spawn() instead of fork()/exec().
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.

8 years agobrowse: support --port and --no-browser options
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.

8 years agobrowse.py: Python 3 compatibility
Peter Wu [Thu, 25 Feb 2016 23:23:48 +0000 (00:23 +0100)]
browse.py: Python 3 compatibility

8 years agoMerge pull request #1113 from nico/nosetsid
Nico Weber [Sat, 5 Mar 2016 02:21:14 +0000 (18:21 -0800)]
Merge pull request #1113 from nico/nosetsid

Revert #910.

8 years agoRevert #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.

8 years agoMerge pull request #1102 from bradking/remove-unnecessary-StatIfNecessary
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

8 years agobrowse.py: allow port override via environment variable
Peter Wu [Thu, 25 Feb 2016 23:16:15 +0000 (00:16 +0100)]
browse.py: allow port override via environment variable

8 years agoRemove StatIfNecessary call that is never necessary
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.

8 years agoMerge pull request #1110 from G4m4/explicit_std_prefix
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

8 years agoFix 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>
8 years agoMerge pull request #1107 from nicolasdespres/ninja_syntax_implicit_outputs
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.

8 years agoMerge pull request #1108 from edbaunton/patch-1
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

8 years agoAdd 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.

8 years agoAdd support for implicit outputs in ninja_syntax.py.
Nicolas Despres [Sat, 6 Feb 2016 08:37:51 +0000 (09:37 +0100)]
Add support for implicit outputs in ninja_syntax.py.

8 years agoMerge pull request #1106 from nico/winfix
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.

8 years agowin: 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.

8 years agoMerge pull request #1101 from fbenkstein/vs2010
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

8 years agoMSVC: disable warning about constant 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

8 years agoMerge pull request #1100 from nico/doc
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.

8 years agoMinor 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.

8 years agoAvoid double-scheduling build edges in another case
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.

8 years agoMerge pull request #1033 from colincross/failed
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

8 years agoMerge pull request #989 from bradking/implicit-outputs
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

8 years agoMerge pull request #1060 from bradking/deduplicate-disk-interface
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

8 years agoMerge pull request #1099 from bradking/fix-perftest-compilation
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

8 years agoReplace ManifestParser::FileReader with general FileReader
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.

8 years agoExpose more details in FileReader::ReadFile signature
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.

8 years agoFactor a `FileReader` base class out of `DiskInterface`
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.

8 years agoAdd support for build statement implicit outputs
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.

8 years agoMerge pull request #1076 from colincross/canonicalize
Nico Weber [Tue, 2 Feb 2016 23:20:01 +0000 (18:20 -0500)]
Merge pull request #1076 from colincross/canonicalize

Canonicalize "." to "."

8 years agoperftest: fix compilation after dupe_edge_should_err change
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).

8 years agoMerge pull request #1096 from sgraham/dupe-edge-action
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

8 years agoMerge pull request #1098 from shinh/keepdep
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

8 years agoAdd -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.

8 years agodupe_edge_should_err from bool to enum
Scott Graham [Wed, 27 Jan 2016 19:10:34 +0000 (11:10 -0800)]
dupe_edge_should_err from bool to enum

8 years agoMerge pull request #1095 from sgraham/dupbuild-err
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

8 years agoMake dupbuild=err work in subninja
Scott Graham [Wed, 27 Jan 2016 03:44:27 +0000 (19:44 -0800)]
Make dupbuild=err work in subninja

8 years agoMerge pull request #1094 from sphawk/master
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

8 years agoMerge pull request #1085 from tetsuok/remove-unnecessary-std
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::`

8 years agofix for localized version of cl.exe
sphawk [Mon, 25 Jan 2016 13:38:08 +0000 (22:38 +0900)]
fix for localized version of cl.exe

8 years agoMerge pull request #1086 from tetsuok/use-container-based-infra-for-ci
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.

8 years agoUse 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.

8 years agoRemove unnecessary `std::`
Tetsuo Kiso [Sun, 10 Jan 2016 13:23:35 +0000 (05:23 -0800)]
Remove unnecessary `std::`

8 years agoMerge pull request #1073 from ninja-build/manual-font
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

8 years agoMerge pull request #1074 from ninja-build/manual-command
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

8 years agoMerge pull request #1082 from nicolasdespres/zshcomp-intermediary-targets
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.

8 years agoTeach 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.

8 years agoCanonicalize "." to "."
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 ".".

8 years agoadd a section to the manual discussing the command= variable
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.

8 years agouse the default font size for manual headings
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.

8 years agoMerge pull request #1069 from nicolasdespres/dry_manifest_regen
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.

8 years agoDo 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.

8 years agoMerge pull request #1042 from avallee/master
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

8 years agoMerge pull request #1062 from tfarina/bindings-typedef
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

8 years agoMerge pull request #1063 from ptzz/master
Evan Martin [Sun, 6 Dec 2015 19:16:42 +0000 (11:16 -0800)]
Merge pull request #1063 from ptzz/master

Fix typo

8 years agoMerge pull request #1064 from NiklasRosenstein/1043-msvc_deps_prefix-per-rule
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()

8 years agoadd "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

8 years agoFix typo
ptzz [Sun, 6 Dec 2015 01:23:49 +0000 (02:23 +0100)]
Fix typo

8 years agomake use of Bindings typedef
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.

8 years agoDisable long word wrapping entirely in comments.
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).

8 years agoprefer https in readme
Nico Weber [Thu, 19 Nov 2015 20:41:32 +0000 (12:41 -0800)]
prefer https in readme

8 years agoMerge pull request #1053 from ninja-build/configure
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

8 years agowhen building with cwd = source root, use relative paths
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.

8 years agorename the build-file variable $sourcedir to $root
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.