Add support for building targets directly from gyp.

A new --build option has been added which can be used to
build configurations directly from gyp.  Each generator
has a new method (PerformBuild) which knows how to invoke
the underlying build environment to build a certain
configuration.  e.g.

  $ gyp hello.gyp --format=ninja --build=Default

This allows gyp call sites to do actual builds without
having to know the exact method for running the underlying
build environment.

The motivation here is to remove the complexity and
duplication involved with building from gyp.  Currently
there are several places where gyp is run and then the
underlying build is run right away in all cases.  (e.g
the Gyp tests, the buildbots).  NaCl and the NaCL SDK
are also about to add two more places where this is
desirable.

Rational for putting this logic in the generators
themselves is that the generator maintainer is best
placed to know how to invoke the build.  Also the
details of how to run Foo seem best placed in the
Foo generator (especially if you think of generators
as plugins for gyp).

BUG=

Review URL: https://chromiumcodereview.appspot.com/10909158

git-svn-id: http://gyp.googlecode.com/svn/trunk@1499 78cadc50-ecff-11dd-a971-7dbc132099af
Fix for msvs output on non-windows.

Its a useful feature of gyp that one can generate
msvs project on a non-windows machine. This change
fixes the output of .vcproj files on non-windows.

$ ./gyp --toplevel-dir=test/hello --format=msvs  test/hello/hello.gyp

This would previously generate a file called:

"test\\hello\\hello.vcproj"

Tested that the generated vcproj files for chromium
are unaffected.

BUG=

Review URL: https://codereview.chromium.org/10914295

git-svn-id: http://gyp.googlecode.com/svn/trunk@1500 78cadc50-ecff-11dd-a971-7dbc132099af
Make gyp/win32 compatible with upstream ninja.

BUG=147451
Review URL: https://codereview.chromium.org/10907263

git-svn-id: http://gyp.googlecode.com/svn/trunk@1501 78cadc50-ecff-11dd-a971-7dbc132099af
Ensure that all entries in .sln files are sorted.

Previously this the NestedProjects section was sorted
according to dictionary key ordering which resulted
in differing sln files between gyp runs.

BUG=http://code.google.com/p/gyp/issues/detail?id=296

Review URL: https://chromiumcodereview.appspot.com/10943017

git-svn-id: http://gyp.googlecode.com/svn/trunk@1503 78cadc50-ecff-11dd-a971-7dbc132099af
Adding a test to cover XCode UID collisions.

CL https://codereview.appspot.com/6476070/ fixed the issue, this
test verifies that the collision is no longer happening.

BUG=gyp:114
Review URL: https://chromiumcodereview.appspot.com/10911280/

Patch from Eric Noyau <noyau@chromium.org>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1504 78cadc50-ecff-11dd-a971-7dbc132099af
Allow library entries of the form '-lfoo' on MSVS.

This allows libraries to be specified in way that
works on all platforms.

BUG=

Review URL: https://codereview.chromium.org/10948014

git-svn-id: http://gyp.googlecode.com/svn/trunk@1505 78cadc50-ecff-11dd-a971-7dbc132099af
Correct dump_dependency_json on windows.

Fills in variables that are supplied by other generators and relied upon
by existing gyp files.

Patch by twiz@chromium.org.

git-svn-id: http://gyp.googlecode.com/svn/trunk@1506 78cadc50-ecff-11dd-a971-7dbc132099af
make: drop all system tests

Rather than probing for ARFLAGS at gyp time, just always use "crsT".
Linux and Android (the two platforms that used ARFLAGS) both support
thin archives, so there is no need to test for it.

BUG=gyp:250
Review URL: https://codereview.chromium.org/10990023

git-svn-id: http://gyp.googlecode.com/svn/trunk@1507 78cadc50-ecff-11dd-a971-7dbc132099af
Load target build files in parallel using Python multiprocessing. 

This parallelizes the portion of the processing that took the largest fraction of runtime previously. There's more opportunity for parallelization elsewhere, but this seems to have the biggest impact. 

Linux & Mac only currently. Raw numbers: 

GYP_GENERATORS=ninja 
time build/gyp_chromium 

1. Linux, z600, chromium src + src-internal + full WebKit:
   23.14 s -> 16.04 s (30% speedup) 
2. MacBook Pro, chromium src only:
   36.83 s -> 27.87 (25% speedup) 
3. Linux, z620, SSD, chromium src + src-internal: 
   21.41 s -> 14.14 s (34% speedup)

Review URL: http://codereview.chromium.org/10911082



git-svn-id: http://gyp.googlecode.com/svn/trunk@1508 78cadc50-ecff-11dd-a971-7dbc132099af
Ninja --generator-output to match other generators.
https://codereview.appspot.com/6566059/


git-svn-id: http://gyp.googlecode.com/svn/trunk@1509 78cadc50-ecff-11dd-a971-7dbc132099af
Add "standalone_static_library" target flag

This flag is only valid for targets of type "static_library"

Adding 'standalone_static_library': 1, ensures:
1) "thin" archive optimisation is disabled for this target (it will contain
symbols)
2) The static_library will be "installed" to PRODUCT_DIR

Review URL: http://codereview.chromium.org/11031005/
Patch from Eric Boren <borenet@google.com>!
Review URL: https://codereview.chromium.org/11048018

git-svn-id: http://gyp.googlecode.com/svn/trunk@1510 78cadc50-ecff-11dd-a971-7dbc132099af
nit followup to r1510: Add '.'s at the end of two comments.
Review URL: https://codereview.chromium.org/11052013

git-svn-id: http://gyp.googlecode.com/svn/trunk@1511 78cadc50-ecff-11dd-a971-7dbc132099af
Try to fix the bots after 1510.
Review URL: https://codereview.chromium.org/11047015

git-svn-id: http://gyp.googlecode.com/svn/trunk@1512 78cadc50-ecff-11dd-a971-7dbc132099af
Revert 1510-1512. The new test fails on all bots.

git-svn-id: http://gyp.googlecode.com/svn/trunk@1513 78cadc50-ecff-11dd-a971-7dbc132099af
Android backend: add CONFIGURATION_NAME.

The recently added CONFIGURATION_NAME variable needs to be defined by the
generator in order to be able to parse various gyp files in the Chromium tree,
even though none of the targets build using the Android backend actually use
it. The Android backend doesn't have a concept of separate configurations, so
define it to a value that will cause an obvious error if a target uses it
inappropriately.
Review URL: https://codereview.chromium.org/11013023

git-svn-id: http://gyp.googlecode.com/svn/trunk@1514 78cadc50-ecff-11dd-a971-7dbc132099af
Fix lint error in parallel processing.

gyp.input fails the presubmit lint check because of an uninitialised global.
The last rewrite of the parallel processing CL eliminated the need for this to
be global, so just remove the global declaration.
Review URL: https://codereview.chromium.org/11026036

git-svn-id: http://gyp.googlecode.com/svn/trunk@1515 78cadc50-ecff-11dd-a971-7dbc132099af
Add "standalone_static_library" target flag

This flag is only valid for targets of type "static_library"

Adding 'standalone_static_library': 1, ensures:
1) "thin" archive optimisation is disabled for this target (it will contain
symbols)
2) The static_library will be "installed" to PRODUCT_DIR

This change re-lands r1510-1512.

Review URL: https://codereview.chromium.org/11031005/
Patch from Eric Boren <borenet@google.com>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1516 78cadc50-ecff-11dd-a971-7dbc132099af
Fix my patch-applying-fail from r1516.

TBR=borenet

git-svn-id: http://gyp.googlecode.com/svn/trunk@1517 78cadc50-ecff-11dd-a971-7dbc132099af
Parallelize ninja generation when GYP_PARALLEL=1. 

This is a really easy approach, parallelizing by configs (Debug/Release). 
It's probably not worth parallelizing this step much more because there's 
some overhead and the total time of this step isn't that large.

This gives a huge speedup on Windows, and it's about even on a fast
Mac/Linux box.

Review URL: http://codereview.chromium.org/11026061/



git-svn-id: http://gyp.googlecode.com/svn/trunk@1518 78cadc50-ecff-11dd-a971-7dbc132099af
Make Ctrl+C kill gyp when parallel processing is on. 

Manually tested these cases: 
* Normal success case 
* Ctrl+C during input file processing 
* Syntax error in input file 
* Ctrl+C during ninja generation 
* Bug in Python code in ninja generation 

Solution to Ctrl+C adapted from John Reese's solution here: 
http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-multiprocessing-pool

Review url: http://codereview.chromium.org/11098023/



git-svn-id: http://gyp.googlecode.com/svn/trunk@1519 78cadc50-ecff-11dd-a971-7dbc132099af