platform/upstream/ninja.git
11 years agofix syntax errors in bootstrap.py
Matthew Woehlke [Fri, 10 Aug 2012 21:22:34 +0000 (17:22 -0400)]
fix syntax errors in bootstrap.py

11 years agowindows: fix integer truncation issues for helper binaries
Evan Martin [Fri, 10 Aug 2012 20:39:25 +0000 (13:39 -0700)]
windows: fix integer truncation issues for helper binaries

Disable the size_t truncation warning.  (Note that this leaves on
the other truncation-related warnings, like int->char.)

11 years agowindows: fix size_t<->int conversions in ninja.exe
Evan Martin [Fri, 10 Aug 2012 20:27:08 +0000 (13:27 -0700)]
windows: fix size_t<->int conversions in ninja.exe

11 years agorefactor
Evan Martin [Fri, 10 Aug 2012 19:45:39 +0000 (12:45 -0700)]
refactor

11 years agoadd bootstrap option to force 64-bit
Matthew Woehlke [Fri, 3 Aug 2012 22:42:44 +0000 (18:42 -0400)]
add bootstrap option to force 64-bit

11 years agowindows: ignore pdb files
Evan Martin [Fri, 10 Aug 2012 18:39:35 +0000 (11:39 -0700)]
windows: ignore pdb files

11 years agowindows bootstrap: clean up object files
Evan Martin [Wed, 1 Aug 2012 22:30:41 +0000 (15:30 -0700)]
windows bootstrap: clean up object files

11 years agodocument that \r and \t are disallowed
Evan Martin [Fri, 10 Aug 2012 17:58:36 +0000 (10:58 -0700)]
document that \r and \t are disallowed

Finishes #394.

11 years agofix windows build
Evan Martin [Wed, 8 Aug 2012 16:32:50 +0000 (09:32 -0700)]
fix windows build

11 years agouse DiskInterface to create the build directory
Evan Martin [Tue, 7 Aug 2012 20:58:55 +0000 (13:58 -0700)]
use DiskInterface to create the build directory

Fixes issue #392 (didn't handle creating nested build dirs right).

Moves MakeDir out of util.h; all code should go through
DiskInterface to simplify testing.  Moves ownership of the
DiskInterface into the client of the Builder, which also allows
removing some code that reached inside the object as well as
a minor leak.

11 years agoMerge pull request #397 from nico/mac105
Evan Martin [Sun, 5 Aug 2012 23:30:49 +0000 (16:30 -0700)]
Merge pull request #397 from nico/mac105

Include unistd.h in files that use unlink() on OS X.

11 years agoInclude unistd.h in files that use unlink() on OS X.
Nico Weber [Sun, 5 Aug 2012 19:02:01 +0000 (12:02 -0700)]
Include unistd.h in files that use unlink() on OS X.

`man unlink` says this is necessary, and according to a report by
Claus Klein, omitting them breaks the build on OS X 10.5 with gcc 4.7
(see issue #396).

(On Windows, ninja's util.h includes a define for unlink.)

11 years agoreject tabs (and CRs) in input files more aggressively
Evan Martin [Thu, 2 Aug 2012 22:24:32 +0000 (15:24 -0700)]
reject tabs (and CRs) in input files more aggressively

11 years agoMerge branch 'master' of github.com:martine/ninja
Evan Martin [Wed, 1 Aug 2012 23:13:31 +0000 (16:13 -0700)]
Merge branch 'master' of github.com:martine/ninja

11 years agoMerge branch 'factor-elide-middle' of git://github.com/polrop/ninja
Evan Martin [Wed, 1 Aug 2012 23:12:55 +0000 (16:12 -0700)]
Merge branch 'factor-elide-middle' of git://github.com/polrop/ninja

Conflicts:
src/util.cc

11 years agoMerge pull request #388 from sgraham/fix-hash-map-string-piece
Evan Martin [Wed, 1 Aug 2012 15:49:35 +0000 (08:49 -0700)]
Merge pull request #388 from sgraham/fix-hash-map-string-piece

fix hash_map StringPiece comparator

11 years agofix hash_map StringPiece comparator
Scott Graham [Tue, 31 Jul 2012 17:05:34 +0000 (10:05 -0700)]
fix hash_map StringPiece comparator

11 years agoRe-factor elide code and test it.
Nicolas Despres [Sat, 28 Jul 2012 12:41:20 +0000 (14:41 +0200)]
Re-factor elide code and test it.

11 years agouse chdir() define from util.h
Evan Martin [Sat, 28 Jul 2012 20:35:13 +0000 (13:35 -0700)]
use chdir() define from util.h

11 years agomove processor-count code to util.cc
Evan Martin [Sat, 28 Jul 2012 20:32:23 +0000 (13:32 -0700)]
move processor-count code to util.cc

11 years agonote that -l doesn't work on windows
Evan Martin [Sat, 28 Jul 2012 20:28:56 +0000 (13:28 -0700)]
note that -l doesn't work on windows

Filed issue #386 about it too.

11 years agosimplify load-average code
Evan Martin [Sat, 28 Jul 2012 20:27:27 +0000 (13:27 -0700)]
simplify load-average code

11 years agodelete vestigal declarations
Evan Martin [Sat, 28 Jul 2012 20:21:39 +0000 (13:21 -0700)]
delete vestigal declarations

11 years agoMerge pull request #385 from nico/nolotsonosx
Evan Martin [Sat, 28 Jul 2012 18:51:17 +0000 (11:51 -0700)]
Merge pull request #385 from nico/nolotsonosx

Disable SubprocessTest.TestWithLots on OS X.

11 years agoDisable SubprocessTest.TestWithLots on OS X.
Nico Weber [Sat, 28 Jul 2012 18:17:08 +0000 (11:17 -0700)]
Disable SubprocessTest.TestWithLots on OS X.

It fails on OS X, see issue #384.

11 years agoMerge pull request #383 from nico/fix380
Evan Martin [Sat, 28 Jul 2012 18:04:57 +0000 (11:04 -0700)]
Merge pull request #383 from nico/fix380

Fix issue #380.

11 years agoRevert "Make StringPiece data members private."
Nico Weber [Sat, 28 Jul 2012 16:56:59 +0000 (09:56 -0700)]
Revert "Make StringPiece data members private."

This reverts commit 904c9610fe66c4f4bd63a07d6f057c8603d24394.
The commit caused issue #380, this revert fixes it. The revert
also makes the test from the previous commit pass.

11 years agoAdd a regression test for issue #380 (which fails at the moment)
Nico Weber [Sat, 28 Jul 2012 16:56:55 +0000 (09:56 -0700)]
Add a regression test for issue #380 (which fails at the moment)

11 years agoMerge pull request #378 from syntheticpp/msvc-fixes
Evan Martin [Fri, 27 Jul 2012 22:49:30 +0000 (15:49 -0700)]
Merge pull request #378 from syntheticpp/msvc-fixes

also build with msvc

11 years agoalso build with msvc
Peter Kümmel [Fri, 27 Jul 2012 21:09:52 +0000 (23:09 +0200)]
also build with msvc

11 years agofix a warning and leak in windows-specific console output code
Evan Martin [Fri, 27 Jul 2012 20:46:46 +0000 (13:46 -0700)]
fix a warning and leak in windows-specific console output code

11 years agofix error and prevent warning in GetTimeMillis()
Claus Klein [Fri, 27 Jul 2012 20:06:03 +0000 (13:06 -0700)]
fix error and prevent warning in GetTimeMillis()

11 years agoMerge branch 'master' of github.com:martine/ninja
Evan Martin [Fri, 27 Jul 2012 19:39:12 +0000 (12:39 -0700)]
Merge branch 'master' of github.com:martine/ninja

11 years agoMerge pull request #352 from tfarina/string-piece-private
Evan Martin [Fri, 27 Jul 2012 19:39:02 +0000 (12:39 -0700)]
Merge pull request #352 from tfarina/string-piece-private

Make StringPiece data members private.

11 years agorename subprocess.cc to reflex its posixness
Evan Martin [Fri, 27 Jul 2012 19:24:40 +0000 (12:24 -0700)]
rename subprocess.cc to reflex its posixness

11 years agorearrange minidump patch to match ninja code style
Evan Martin [Fri, 27 Jul 2012 19:02:59 +0000 (12:02 -0700)]
rearrange minidump patch to match ninja code style

11 years agoMerge branch 'set_terminate' of git://github.com/gmoudry/ninja into minidump
Evan Martin [Fri, 27 Jul 2012 18:44:06 +0000 (11:44 -0700)]
Merge branch 'set_terminate' of git://github.com/gmoudry/ninja into minidump

(This likely doesn't compile, just getting all the history in place.)

Conflicts:
src/util.cc

11 years agoMerge pull request #351 from syntheticpp/rate
Evan Martin [Fri, 27 Jul 2012 17:59:19 +0000 (10:59 -0700)]
Merge pull request #351 from syntheticpp/rate

print edges per second

11 years agomake the build log test match the indended build log logic
Evan Martin [Fri, 27 Jul 2012 17:38:44 +0000 (10:38 -0700)]
make the build log test match the indended build log logic

As described on https://github.com/martine/ninja/pull/349 , this test
shouldn't have been passing.  Fixing a Valgrind issue showed that the
test was wrong.  Thankfully it wasn't a critical issue.

The new code verifies that we either succeed or report an error when
parsing -- the only behavior we really care about is not crashing.

11 years agoMinor: zero log buffer before reading data/parsing it
Maxim Kalaev [Thu, 28 Jun 2012 06:34:19 +0000 (09:34 +0300)]
Minor: zero log buffer before reading data/parsing it

Not a real problem, mainly to make valgrind happy

11 years agomingw: specify _WIN32_WINNT also in configure.py
Evan Martin [Fri, 27 Jul 2012 17:17:20 +0000 (10:17 -0700)]
mingw: specify _WIN32_WINNT also in configure.py

11 years agofix some mingw warnings in getopt.c
Evan Martin [Fri, 27 Jul 2012 17:15:34 +0000 (10:15 -0700)]
fix some mingw warnings in getopt.c

From a patch from Claus Klein <claus.klein@arcormail.de>.

11 years agowindows: fix printf format for process id
Evan Martin [Fri, 27 Jul 2012 17:08:06 +0000 (10:08 -0700)]
windows: fix printf format for process id

11 years agomingw: fix quoting of -DNINJA_PYTHON
Evan Martin [Fri, 27 Jul 2012 17:05:20 +0000 (10:05 -0700)]
mingw: fix quoting of -DNINJA_PYTHON

11 years agobootstrap: set _WIN32_WINNT to WinXP for mingw
Evan Martin [Fri, 27 Jul 2012 17:01:53 +0000 (10:01 -0700)]
bootstrap: set _WIN32_WINNT to WinXP for mingw

From a patch from Peter Kuemmel <syntheticpp@gmx.net>.

11 years agowrap at 80 columns
Evan Martin [Fri, 27 Jul 2012 16:53:40 +0000 (09:53 -0700)]
wrap at 80 columns

11 years agoMerge pull request #369 from maximuska/proposed/packaging-rpm
Evan Martin [Fri, 27 Jul 2012 16:45:06 +0000 (09:45 -0700)]
Merge pull request #369 from maximuska/proposed/packaging-rpm

packaging: added basic RPM building

11 years agopackaging: added basic RPM building
Maxim Kalaev [Thu, 26 Jul 2012 12:21:30 +0000 (15:21 +0300)]
packaging: added basic RPM building

11 years agoMerge pull request #368 from nico/toolpipe
Evan Martin [Wed, 25 Jul 2012 18:02:34 +0000 (11:02 -0700)]
Merge pull request #368 from nico/toolpipe

Don't print 'Entering directory' when running tools.

11 years agoDon't print 'Entering directory' when running tools.
Nico Weber [Wed, 25 Jul 2012 17:34:14 +0000 (10:34 -0700)]
Don't print 'Entering directory' when running tools.

11 years agoMerge pull request #367 from tfarina/lowercase
Evan Martin [Tue, 24 Jul 2012 06:55:22 +0000 (23:55 -0700)]
Merge pull request #367 from tfarina/lowercase

Use lowercase consistently.

11 years agoUse lowercase consistently.
Thiago Farina [Fri, 20 Jul 2012 15:19:18 +0000 (12:19 -0300)]
Use lowercase consistently.

https://github.com/martine/ninja/issues/360

Signed-off-by: Thiago Farina <tfarina@chromium.org>
11 years agoMerge pull request #366 from sgraham/no-noisy-cursor
Evan Martin [Fri, 20 Jul 2012 07:17:44 +0000 (00:17 -0700)]
Merge pull request #366 from sgraham/no-noisy-cursor

windows: use WriteConsoleOutput instead of printf to avoid moving cursor

11 years agowindows: use WriteConsoleOutput instead of printf to avoid moving cursor
Scott Graham [Thu, 19 Jul 2012 22:17:38 +0000 (15:17 -0700)]
windows: use WriteConsoleOutput instead of printf to avoid moving cursor

11 years agoMerge pull request #365 from maximuska/proposed/dep-file-parsing-more-specials
Evan Martin [Thu, 19 Jul 2012 18:35:37 +0000 (11:35 -0700)]
Merge pull request #365 from maximuska/proposed/dep-file-parsing-more-specials

dep file parsing: allow '@' and '=' in paths

11 years agodep file parsing: allow '@' and '=' in paths
Maxim Kalaev [Thu, 19 Jul 2012 05:49:34 +0000 (08:49 +0300)]
dep file parsing: allow '@' and '=' in paths

11 years agodisallow crlf in manifest files
Evan Martin [Wed, 18 Jul 2012 00:38:48 +0000 (17:38 -0700)]
disallow crlf in manifest files

It turns out to be trickier than expected to process these correctly.
It turns out to also be trickier than expected to give a nice error
message on encountering these.  But the behavior prior to this patch
would just be silent failures where we attempted to examine paths
that accidentally contained embedded \r.

For now, fix all regexes of the form [^...] to include \r in the
excluded block, then assert that we get a vague lexer error near the
problem.

In the future perhaps we can open manifest files in text mode on Windows
or just disallow Windows-style CRLF in the manual.

11 years agoexplain mode: show which input is more recent
Evan Martin [Tue, 17 Jul 2012 23:42:53 +0000 (16:42 -0700)]
explain mode: show which input is more recent

Patch from Scott Graham <scottmg@chromium.org>.

11 years agowindows: get correct path for ninja_syntax
Evan Martin [Tue, 17 Jul 2012 23:32:44 +0000 (16:32 -0700)]
windows: get correct path for ninja_syntax

Patch from Scott Graham <scottmg@chromium.org>.

11 years agogitignore unpacked gtest
Evan Martin [Tue, 17 Jul 2012 23:19:50 +0000 (16:19 -0700)]
gitignore unpacked gtest

Patch from Scott Graham <scottmg@chromium.org>.

11 years agosubprocess_test: make SetWithLots run on all non-Windows platforms
Evan Martin [Tue, 17 Jul 2012 16:34:10 +0000 (09:34 -0700)]
subprocess_test: make SetWithLots run on all non-Windows platforms

I think it might have been an oversight that this was marked
Linux-specific.

11 years agoninja_syntax: escape colons in paths
Evan Martin [Tue, 17 Jul 2012 20:26:11 +0000 (13:26 -0700)]
ninja_syntax: escape colons in paths

11 years agoMerge pull request #340 from sgraham/fix-win-build
Evan Martin [Tue, 17 Jul 2012 20:20:12 +0000 (13:20 -0700)]
Merge pull request #340 from sgraham/fix-win-build

fix win32 compile, fix BuildLogTest.WriteRead on 2nd run

11 years agoMerge pull request #363 from usovalx/subprocess_test_build_failure
Evan Martin [Tue, 17 Jul 2012 16:31:52 +0000 (09:31 -0700)]
Merge pull request #363 from usovalx/subprocess_test_build_failure

Add missing include of <sys/resouce.h>

11 years agofix manual to reflect reality of depfile cleaning
Evan Martin [Tue, 17 Jul 2012 15:59:55 +0000 (08:59 -0700)]
fix manual to reflect reality of depfile cleaning

Fixes issue #362.

11 years agoMerge pull request #364 from tfarina/pragma-once
Evan Martin [Tue, 17 Jul 2012 15:24:49 +0000 (08:24 -0700)]
Merge pull request #364 from tfarina/pragma-once

Remove #pragma once from our header files.

11 years agoRemove #pragma once from our header files.
Thiago Farina [Tue, 17 Jul 2012 14:35:12 +0000 (11:35 -0300)]
Remove #pragma once from our header files.

https://github.com/martine/ninja/issues/358

Signed-off-by: Thiago Farina <tfarina@chromium.org>
11 years agoAdd missing include of <sys/resouce.h>
Oleksandr Usov [Mon, 16 Jul 2012 13:05:53 +0000 (14:05 +0100)]
Add missing include of <sys/resouce.h>

11 years agoGCC 4.7 needs cstdio
Peter Kümmel [Fri, 6 Jul 2012 09:12:36 +0000 (11:12 +0200)]
GCC 4.7 needs cstdio

11 years agoprint edges per second
Peter Kuemmel [Fri, 29 Jun 2012 14:12:03 +0000 (16:12 +0200)]
print edges per second

prints the rate of finished edges per second to the console,
for instance with NINJA_STATUS="[%s/%t %o(%c)/s] ":

[132/1922 16.1(14)/s]

16.1 is the average for all processed files (here 132 since start)
14 is the average of the last n files while n is the number specifies by
-j (or its default)

11 years agoMerge pull request #361 from HeisSpiter/master
Evan Martin [Sun, 15 Jul 2012 00:20:30 +0000 (17:20 -0700)]
Merge pull request #361 from HeisSpiter/master

Check more efficiently for emptiness

11 years agoEfficiently check for emptiness
Pierre Schweitzer [Sat, 14 Jul 2012 15:54:17 +0000 (17:54 +0200)]
Efficiently check for emptiness

12 years agoMerge pull request #359 from tedv/old-arch
Evan Martin [Wed, 11 Jul 2012 21:40:28 +0000 (14:40 -0700)]
Merge pull request #359 from tedv/old-arch

Fix missing POLLRDHUP constant on older systems.

12 years agoClarify comment wording.
Ted Vessenes [Wed, 11 Jul 2012 15:33:45 +0000 (11:33 -0400)]
Clarify comment wording.

12 years agoFix missing POLLRDHUP constant on older systems.
Ted Vessenes [Wed, 11 Jul 2012 14:49:16 +0000 (10:49 -0400)]
Fix missing POLLRDHUP constant on older systems.

Attempting to compile with g++ 4.1.2 failed because the POLLRDHUP
constant was not defined when <poll.h> is included.

12 years agoMerge pull request #357 from tfarina/manifest-parser
Evan Martin [Mon, 9 Jul 2012 19:19:02 +0000 (12:19 -0700)]
Merge pull request #357 from tfarina/manifest-parser

Rename parsers.* to manifest_parser.*

12 years agoRename parsers.* to manifest_parser.*
Thiago Farina [Mon, 9 Jul 2012 19:09:31 +0000 (16:09 -0300)]
Rename parsers.* to manifest_parser.*

So it matches with the class name in there.

Signed-off-by: Thiago Farina <tfarina@chromium.org>
12 years agoMerge pull request #313 from wolfp/restat_missing_input
Evan Martin [Tue, 3 Jul 2012 16:45:37 +0000 (09:45 -0700)]
Merge pull request #313 from wolfp/restat_missing_input

Do not reset restat_mtime if an input is missing

12 years agoMake StringPiece data members private.
Thiago Farina [Sat, 30 Jun 2012 14:40:10 +0000 (11:40 -0300)]
Make StringPiece data members private.

Signed-off-by: Thiago Farina <tfarina@chromium.org>
12 years agoMerge pull request #350 from maximuska/proposed/improve-dump-edge-node
Evan Martin [Fri, 29 Jun 2012 16:15:09 +0000 (09:15 -0700)]
Merge pull request #350 from maximuska/proposed/improve-dump-edge-node

Improving Edge::Dump, introducing Node::Dump

12 years agoImproving Edge::Dump, introducing Node::Dump
Maxim Kalaev [Wed, 27 Jun 2012 21:28:32 +0000 (23:28 +0200)]
Improving Edge::Dump, introducing Node::Dump

- Edge::Dump could crash if called while inputs_ is being extended
- Node::Dump prints Node attributes, in-edge and lists of out-edges
- Dump functions now accept "prefix" parameter, printed along with the object
  for easier orientation. For example, edge->Dump("Re-reading deps files").

12 years agoAdd a test for missing input files in restat rules
wolfp [Wed, 27 Jun 2012 08:29:17 +0000 (10:29 +0200)]
Add a test for missing input files in restat rules

12 years agoDo not reset restat_mtime if an input is missing (issue #295)
wolfp [Tue, 22 May 2012 11:39:40 +0000 (13:39 +0200)]
Do not reset restat_mtime if an input is missing (issue #295)

12 years agoremove unnecessary manual Close()
Scott Graham [Tue, 19 Jun 2012 21:32:39 +0000 (14:32 -0700)]
remove unnecessary manual Close()

12 years agodon't leak file handle on fail-to-upgrade case
Scott Graham [Tue, 19 Jun 2012 21:32:04 +0000 (14:32 -0700)]
don't leak file handle on fail-to-upgrade case

12 years agofix win32 compile, fix BuildLogTest.WriteRead on 2nd run
Scott Graham [Tue, 19 Jun 2012 20:15:41 +0000 (13:15 -0700)]
fix win32 compile, fix BuildLogTest.WriteRead on 2nd run

12 years agoswitch build log to print hashes as hex
Evan Martin [Tue, 19 Jun 2012 17:31:14 +0000 (10:31 -0700)]
switch build log to print hashes as hex

Nico convinced me that it's safe to do this without revving the build
log format: the old decimal values will still parse as hex (just as
different numbers) and cause a superfluous rebuild.

12 years agoadd copyright header
Evan Martin [Tue, 19 Jun 2012 16:36:42 +0000 (09:36 -0700)]
add copyright header

12 years agoadd new binaries to gitignore
Evan Martin [Tue, 19 Jun 2012 16:31:26 +0000 (09:31 -0700)]
add new binaries to gitignore

12 years agodrop support of log formats < 4
Evan Martin [Mon, 18 Jun 2012 22:47:38 +0000 (15:47 -0700)]
drop support of log formats < 4

Log format 4 was introduced in January.
There's been plenty of time to migrate.

12 years agouse PRIu64 for printing 64-bit in, %d for printing int
Evan Martin [Mon, 18 Jun 2012 22:41:28 +0000 (15:41 -0700)]
use PRIu64 for printing 64-bit in, %d for printing int

Fixes a warning.

12 years agomake canon_perftest build, add license
Evan Martin [Mon, 18 Jun 2012 22:29:23 +0000 (15:29 -0700)]
make canon_perftest build, add license

12 years agoMerge pull request #338 from syntheticpp/empty-log-file
Evan Martin [Mon, 18 Jun 2012 18:51:24 +0000 (11:51 -0700)]
Merge pull request #338 from syntheticpp/empty-log-file

no recompacting needed when log file is empty

12 years agono recompacting needed when log file is empty
Peter Kuemmel [Mon, 18 Jun 2012 11:20:31 +0000 (13:20 +0200)]
no recompacting needed when log file is empty

12 years agoMerge pull request #316 from tfarina/struct
Evan Martin [Sun, 17 Jun 2012 01:54:07 +0000 (18:54 -0700)]
Merge pull request #316 from tfarina/struct

No need to write 'struct' before type name when declaraing variables in ...

12 years agofix quoting thinko
Evan Martin [Sat, 16 Jun 2012 20:29:09 +0000 (13:29 -0700)]
fix quoting thinko

12 years agorearrange shell quoting in configure.py
Evan Martin [Sat, 16 Jun 2012 20:27:14 +0000 (13:27 -0700)]
rearrange shell quoting in configure.py

12 years agoMerge pull request #333 from jonforums/no-main-multi-defs
Evan Martin [Sat, 16 Jun 2012 17:01:45 +0000 (10:01 -0700)]
Merge pull request #333 from jonforums/no-main-multi-defs

Prevent multiple definition link error

12 years agoPrevent multiple definition link error
Jon [Sat, 16 Jun 2012 15:52:58 +0000 (11:52 -0400)]
Prevent multiple definition link error

Globbed inclusion of `src/hash_collision_bench.cc` cause link errors

12 years agoMerge pull request #331 from sgraham/add-in_newline
Evan Martin [Fri, 15 Jun 2012 22:05:57 +0000 (15:05 -0700)]
Merge pull request #331 from sgraham/add-in_newline

Add $in_newline