msvs: Fix rule dependencies for VS2013

This commit does two things to fix rules for VS2013:

* Don't exclude rule 'input' files (i.e. the files that will be used as
  'AdditionalDependencies' in the msbuild rule definition).
* Use a 'CustomBuild' element for 'AdditionalDependencies' files, instead of
  using 'None'.  This is similar to how the primary input of actions is added
  in '_AddMSBuildAction'.

Also, re-enable the test/rules-rebuild/gyptest-default.py test for VS2013.

BUG=gyp:465
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1997 78cadc50-ecff-11dd-a971-7dbc132099af
Set ZERO_AR_DATE=1 when running libtool.

Ref: http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c

Adhoc testing with base_unittests reduced non-deterministic bytes from ~2347 to
~174. It's definitely the lowest hanging fruit, which will permit us to focus on
the remaining bytes.

R=thakis@chromium.org
BUG=chromium:330262

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1998 78cadc50-ecff-11dd-a971-7dbc132099af
ninja win: Don't return unfound VS version, raise instead

Like r1978, but for ninja only.  The msvs generator can use the fallback, but
the ninja generator cannot do anything without knowing the path to the VS
installation.  It is better to fail here, than to fail further along when
trying to run the setup script.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1999 78cadc50-ecff-11dd-a971-7dbc132099af
Fix dependency broken on mac when building FAT binaries.

When trying to build shared_library or loadable_module, build.ninja
has a rule to depend on .dylib.TOC or .so.TOC.  However, WriteLink in
ninja.py forget to create the rule for .TOC for FAT binaries.
As a result, generated build.ninja won't has a rule for .TOC,
which cause build failure.

Note that I only fixed a part of the issue 411, which is needed for my goal.
I or somebody else need more work to make gyp in the issue 411 work
as epxected.

BUG=https://code.google.com/p/gyp/issues/detail?id=411
Review URL: https://codereview.chromium.org/629893002/

Patch from Yoshisato Yanagisawa <yyanagisawa@chromium.org>!


git-svn-id: http://gyp.googlecode.com/svn/trunk@2000 78cadc50-ecff-11dd-a971-7dbc132099af
Revert r1998, it breaks iOS builds

BUG=chromium:432483
TBR=maruel@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@2001 78cadc50-ecff-11dd-a971-7dbc132099af
win: Use the _winreg module for registry access

This commit changes the Visual Studio installation path detection code to use
_winreg to find the installation path in the registry.  The previous method of
using reg.exe is preserved as a fallback for when '_winreg' cannot be imported
(for example in cygwin).

Also, remove the '_RegistryKeyExists' function since it is not used anywhere.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@2002 78cadc50-ecff-11dd-a971-7dbc132099af
ninja win: Add msvs emulation for FloatingPointModel

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@2003 78cadc50-ecff-11dd-a971-7dbc132099af
Add support for "else if" in gyp conditions

Right now, a gyp condition consists of exactly two or three parts:

  [cond_expr, true_dict]
  [cond_expr, true_dict, false_dict]

This means if we want to have an "else if" condition, it needs to be inside a
nested 'conditions' list inside the false_dict.  This leads to unnecessarily
deep levels of nesting in gyp files.

This commit makes it so that if the 'false_dict' is not a dict, then we will
treat it as another cond_expr.  We keep looping like this until we find a
false_dict, or until we reach the end of the list.

This means we can now have conditions that look like this:

  [cond_expr1, true_dict1, cond_expr2, true_dict2, false_dict]

or:

  [cond_expr1, true_dict1, cond_expr2, true_dict2, cond_expr3, true_dict3]

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@2004 78cadc50-ecff-11dd-a971-7dbc132099af
Mechanical changes to cleanup pylint presubmit checks

BUG=gyp:469
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@2006 78cadc50-ecff-11dd-a971-7dbc132099af
Add back support for /Gv now that gyp-win64 has VS2013

This was removed in the last minute in r1984 because of failures in the
gyp-win64 bot.

BUG=
R=scottmg@chromium.org

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

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