xcode_emulation: work in the absence of xcodebuild

OS X systems running only the Command Line Tools for Xcode package,
without the full Xcode, don't have a functioning xcodebuild, but this
isn't mandatory for building many gyp projects (e.g. node.js, v8).
This commit handles xcodebuild failures and avoids populating
Xcode-specific CFLAGS/LDFLAGS when xcodebuild can't be run.

This has been tested on both Xcode and CLT-only systems by successfully
building node.js. The behaviour can be simulated on systems with Xcode
by setting the xcode-select path to something nonsensical, e.g.
xcode-select -switch /usr/bin

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

Patch from mistydemeo@gmail.com!



git-svn-id: http://gyp.googlecode.com/svn/trunk@1819 78cadc50-ecff-11dd-a971-7dbc132099af
win msvs: make mixed source/dir match gyp order

Make link order in VS match gyp order (redux).

Previous attempt(s) failed on a sources list of:

a.cc
dir\b.cc
c.cc

In this case, previously the link order would be [a.cc,
c.cc, dir\b.cc] because all the contents of each directory
would be processed before it recursed to subfolders.

We instead walk into folders immediately now. It's possible
that this will cause redundant folders in the IDE structure
on VS2008 (I don't have it installed any more), but it's OK
on 2010+ at least.

R=thakis@chromium.org
BUG=326030

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

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