Changes analyzer to search for targets

Here's a list of the changes:
. I'm changing input file to be a JSON file. This allows for passing
  in more information, such as the set of targets to search for.
. Changing output format to be JSON as well. This allows for more
  structure in outputting other random data. I'm a bit iffy on whether
  this is good, but it's requested by the recipes side of things which
  uses analyzer.
. You can now specify a set of targets to search for in addition to
  files. This is intended for things like 'unittests' so that only the
  set of targets that are effected by the change get run.

To enable the new functionality you have to pass in a new switch. Once
I integrate these changes into the rest of the stack. I'll remove the
old flow.

BUG=109173
TEST=covered by tests
R=mark@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1956 78cadc50-ecff-11dd-a971-7dbc132099af
Enable custom suffixes for Mac bundles.

Patch by Johannes Sartisohn <jsartisohn@google.com>

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


git-svn-id: http://gyp.googlecode.com/svn/trunk@1957 78cadc50-ecff-11dd-a971-7dbc132099af
Avoid infinite recursion with identity variables.

Some generators like gypd and gypsh define the generator_default_variables
as an identity expansion. For example, the variable 'INTERMEDIATE_DIR'
would expand to '<(INTERMEDIATE_DIR)' which lends to an infinite recursion
if a .gyp file uses any of those variables.

This patch detects trivial infinite recursive variable expansions like
this one and leaves them that way.

Patch by Alejandro Deymonnaz <deymo@chromium.org>

BUG=141
TEST=`gyp --debug=variables --format=gypd test.gyp` shows avoiding
infinite recursion message when test.gyp has an INTERMEDIATE_DIR
variable expansion.

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


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