Squelch warnings from gyp where certain exclusion directives are used

When AdditionalDependencies! and DelayLoadDLLs! directives are used e.g.
in chrome_dll.gypi, warnings are emitted.  This CL supresses them.

BUG=246570
TEST=build\gyp_chromium with GYP_GENERATORS=msvs, no warnings generated
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1650 78cadc50-ecff-11dd-a971-7dbc132099af
Bump memory per linker to 4 to account for system overhead.

R=scottmg@chromium.org
BUG=

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1651 78cadc50-ecff-11dd-a971-7dbc132099af
Make the ninja pool math correct.

R=scottmg@chromium.org
BUG=

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1652 78cadc50-ecff-11dd-a971-7dbc132099af
Some enhancements to the msvs-ninja integration

As a follow up to r1618, these are some changes that make the generated msvs
projects easier to work with:

* Fix the SHARED_INTERMEDIATE_DIR variable to point to ninja's intermediate
  directory. This is only done if we are using the ninja flavor explicitly.

* Add rule files to sources. Previously, these files were not showing up in the
  project because they get added in the rule generation step, which we skip
  when using an external builder.

* Do not put action/rule inputs in 'excluded_sources'. Since we are using an
  external builder, we don't need to "exclude" these files from the build. With
  this change, these files show up in their proper source heirarchy, instead of
  a separate "_excluded_files" folder. Also, these files also now show up even
  when "msvs_list_excluded_files" is used.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1653 78cadc50-ecff-11dd-a971-7dbc132099af
Android backend: support multiple configurations.

Support building multiple configurations in the Android backend (by
setting GYP_CONFIGURATION when invoking make). Generate both sets of
compile/link flags into the makefile under different names and use the
right one at make time (the same way the make backend works).

Also, simplify cflags processing slightly: the android backend doesn't
differentiate between cflags and cflags_c so just combine them together
at the start of flags processing instead of waiting until make time.

BUG=gyp:349
R=benm@chromium.org, sbc@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1654 78cadc50-ecff-11dd-a971-7dbc132099af
Implement EmbedManifest handling for ninja windows.

BUG=gyp:321
R=alexeypa@chromium.org, scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1655 78cadc50-ecff-11dd-a971-7dbc132099af
Take the generator output directory into account when trying to invoke gyp

Otherwise, the gyp binary won't be found when trying to regenerator the output
files

R=thakis@chromium.org
TEST=test/hello/gyptest-regyp-output.py

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1656 78cadc50-ecff-11dd-a971-7dbc132099af
Adds support for the library_dirs key, which appears in the documentation but
was never actually implemented. 
library_dirs is essentially equivalent to adding "-Lfoo" to ldflags in Make,
modifying LIBRARY_SEARCH_PATHS in Xcode, or adding AdditionalLibraryPaths to the
VCLinkerTool or VCLibrarianTool in MSVS. I have attempted to make an analogous
change to the ninja generator, but have not been able to test it (ninja was not
in the tree I checked out) and I am fairly sure it's wrong. Guidance here would
be appreciated. 

I have created a modified version of the mac/libraries test to test this change;
a cross-platform test proved impossible because I needed to copy the lib
somewhere, and doing so with a copies section caused a circular dependency which
caused Make to fail (though it worked fine in Xcode). For some reason, although
the implementation of library_dirs is a straightforward addition to
LIBRARY_SEARCH_PATHS, simply substituting the former for the latter did not work
until I removed the <(DEPTH) reference from the library_dirs list. This may
indicate a bug in my code, but I'm not certain, since neither
test/mac/library_dir nor test/mac/libraries worked for me when I tried building
their gypfiles directly and building the products in Xcode.




git-svn-id: http://gyp.googlecode.com/svn/trunk@1657 78cadc50-ecff-11dd-a971-7dbc132099af
Fix handling of $(inherited): Renamed EscapeXCodeArgument to
EscapeXCodeDefine, changed escaping method for spaces, added test.

BUG=gyp:257
TEST=Run small tests on Mac. Also build a xcode project with a gyp file
containing $(inherited) in its 'defines' section, e.g.
----main.cc:
#include <stdio.h>

int main(int argc, char **argv) {
  printf("Hello, world!\n");
  return 0;
}
----main.gyp:
{
  'targets': [
    {
      'target_name': 'main',
      'type': 'executable',
      'mac_bundle': 1,
      'defines': [
        'TRY_QUOTE=with space',
        '$(inherited)',
      ],
      'sources': [ 'main.cc' ],
    }
  ],
}

Patch by Jan Svarovsky <honza@google.com>


git-svn-id: http://gyp.googlecode.com/svn/trunk@1658 78cadc50-ecff-11dd-a971-7dbc132099af
Add .def file to implicit deps

This is so that when the .def file is modified, a relink will be triggered.

R=scottmg@chromium.org
BUG=

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1659 78cadc50-ecff-11dd-a971-7dbc132099af
Delete a variable that's no longer used.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1660 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/mac: Only write pch flag variables if needed.

No intended functionality change:
These variables are empty in the majority of targets, they aren't defined in
the toplevel ninja file, and ninja expands undefined variables as empty strings.
Reduces ninja file line count by ~3000 for chromium (of 148000, so it's
only a 2% reduction).

Likewise, only write libtool_flags if they are not empty (they're _always_
empty in Chromium for example). Reduces ninja file line count by number of
static library targets (~hundreds).

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1661 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/mac: Drop a few useless "./" prefixes on built product paths.

Use `ExpandSpecial(join('$!PRODUCT_DIR', path))` instead of
`join(ExpandSpecial('$!PRODUCT_DIR'), path)`, because ExpandSpecial() knows
that a prefix of `$!PRODUCT_DIR/` can be dropped completely. The latter form
results in `./` prefixes.

No intended behavior change, just makes the generated ninja file a tiny bit
shorter and a bit more sane (for example,
https://github.com/ndmitchell/shake/commit/28be53f9c51 isn't needed after this
-- but other places in gyp still generate 'foo/..' in the middle of a path,
so that's only a small win).

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1662 78cadc50-ecff-11dd-a971-7dbc132099af
Properly escape Xcode defines containing ' 

BUG=gyp:257
TEST=python gyptest.py -a -f xcode,make

Patch by Jan Svarovsky <honza@google.com>
Review URL: https://codereview.chromium.org/18621003/


git-svn-id: http://gyp.googlecode.com/svn/trunk@1663 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Don't add a new ninja-level variable for libdirs.

$libdirs was always in front of $libs, so there's no need for a second variable.
If $libdirs is empty, the link line no longer contains two spaces, ninja needs
to do fewer variable lookups when parsing .ninja files, and libdirs evaluation
moves to WriteLink() -- there's no need to write libdirs for static libraries
for example.

No intended behavior change.

R=mark@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1664 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Only write ar_host, cc_host, cxx_host, ld_host in multi-toolset builds.

No intended functionality change: They are only used for targets with a toolset
of 'host', which only happens only if generator_supports_multiple_toolsets is
true.

Saves a whopping 4 lines (out of ~148000) in ninja files (but it's within
the first 8 lines of build.ninja, so it's at least somewhat visible 4 lines?)

R=fischman@chromium.org, michaelbai@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1665 78cadc50-ecff-11dd-a971-7dbc132099af
Default to parallel gyp on non-win platforms

Setting GYP_PARALLEL=0 on posix will turn off parallel gyp.

BUG=chromium:154205
R=dmazzoni@chromium.org, thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1666 78cadc50-ecff-11dd-a971-7dbc132099af
Make root invocation less crazy so that multiprocessing works on Windows

Previously gyp.bat runs "python gyp" and "gyp" imports "gyp" expecting to
get pylib/gyp/__init__.py. Multiprocessing tries to fork and doesn't find
the entry point named gyp because it doesn't search for non-.py
extensions.

Instead, make non-Windows match with a wrapper 'gyp' in bash, and make the
python entry point gyp_main.py so that importing works more normally.

Also, remove "Using parallel processing..." message so that tests pass,
otherwise they complain that there was output on stderr. This was failing
on other OSs too.

R=thakis@chromium.org
BUG=154205

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1667 78cadc50-ecff-11dd-a971-7dbc132099af
Fix fake assembler on vs2012

(causing tests to fail currently)

TBR=bradnelson@google.com

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1668 78cadc50-ecff-11dd-a971-7dbc132099af
fix interpreter and line endings for 'gyp'

After r1667.

TBR=thakis@chromium.org

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

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