xcode_emulation: work in the absence of xcodebuild
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: e7e1075985beda50ea81ac4472467b4f6e91fc78@1819 78cadc50-ecff-11dd-a971-7dbc132099af

azunite/gyp_20150930,azunite/gyp_20150930,springmeyer/gyp,sanyaade-teachings/gyp,sanyaade-teachings/gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,azunite/gyp,springmeyer/gyp,turbulenz/gyp,AOSPU/external_chromium_org_tools_gyp,Danath/gyp,bnq4ever/gypgoogle,AWhetter/gyp,chromium/gyp,android-ia/platform_external_chromium_org_tools_gyp,pandaxcl/gyp,ttyangf/gyp,ttyangf/pdfium_gyp,pyokagan/gyp,AOSPU/external_chromium_org_tools_gyp,mapbox/gyp,mgamer/gyp,clar/gyp,omasanori/gyp,azunite/gyp_20150930,sport-monkey/GYP,geekboxzone/lollipop_external_chromium_org_tools_gyp,amoikevin/gyp,bulldy80/gyp_unofficial,trafi/gyp,cchamberlain/gyp,LazyCodingCat/gyp,chromium/gyp,cysp/gyp,openpeer/webrtc-gyp,chromium/gyp,okumura/gyp,azunite/gyp,alexcrichton/gyp,svn2github/kgyp,Phuehvk/gyp,turbulenz/gyp,ryfx/gyp,bulldy80/gyp_unofficial,omasanori/gyp,cchamberlain/gyp,luvit/gyp,adblockplus/gyp,carlTLR/gyp,bpsinc-native/src_tools_gyp,mgamer/gyp,carlTLR/gyp,bnq4ever/gypgoogle,Danath/gyp,carlTLR/gyp,Danath/gyp,enkripsi/gyp,sdklite/gyp,openpeer/webrtc-gyp,pandaxcl/gyp,adblockplus/gyp,Chilledheart/gyp,alexcrichton/gyp,ttyangf/pdfium_gyp,erikge/watch_gyp,android-ia/platform_external_chromium_org_tools_gyp,bulldy80/gyp_unofficial,adblockplus/gyp,openpeer/webrtc-gyp,ryfx/gyp,android-ia/platform_external_chromium_org_tools_gyp,trafi/gyp,svn2github/gyp,Danath/gyp,dougbeal/gyp,enkripsi/gyp,saghul/gyn,cchamberlain/gyp,Omegaphora/external_chromium_org_tools_gyp,Jack-Q/GYP-copy,duanhjlt/gyp,svn2github/kgyp,luvit/gyp,omasanori/gyp,Phuehvk/gyp,LazyCodingCat/gyp,ryfx/gyp,yjhjstz/gyp,mapbox/gyp,mistydemeo/gyp,erikge/watch_gyp,mistydemeo/gyp,erikge/watch_gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,azunite/gyp_20150930,enkripsi/gyp,sanyaade-teachings/gyp,ttyangf/gyp,sdklite/gyp,bnq4ever/gypgoogle,duanhjlt/gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,cchamberlain/gyp,erikge/watch_gyp,bnoordhuis/gyp,okumura/gyp,pandaxcl/gyp,mistydemeo/gyp,okumura/gyp,ryfx/gyp,azunite/gyp,svn2github/kgyp,bpsinc-native/src_tools_gyp,trafi/gyp,okumura/gyp,Phuehvk/gyp,msc-/gyp,xin3liang/platform_external_chromium_org_tools_gyp,msc-/gyp,pyokagan/gyp,saghul/gyn,springmeyer/gyp,mapbox/gyp,luvit/gyp,azunite/gyp,Chilledheart/gyp,bnoordhuis/gyp,amoikevin/gyp,svn2github/kgyp,ttyangf/pdfium_gyp,duanhjlt/gyp,enkripsi/gyp,sanyaade-teachings/gyp,bnq4ever/gypgoogle,cchamberlain/gyp,cysp/gyp,chromium/gyp,yjhjstz/gyp,dougbeal/gyp,dougbeal/gyp,Jack-Q/GYP-copy,ttyangf/pdfium_gyp,bulldy80/gyp_unofficial,LazyCodingCat/gyp,svn2github/gyp,mapbox/gyp,mapbox/gyp,AWhetter/gyp,alexcrichton/gyp,adblockplus/gyp,ryfx/gyp,amoikevin/gyp,sanyaade-teachings/gyp,ttyangf/pdfium_gyp,msc-/gyp,pyokagan/gyp,openpeer/webrtc-gyp,duanhjlt/gyp,saghul/gyn,xin3liang/platform_external_chromium_org_tools_gyp,bnoordhuis/gyp,Chilledheart/gyp,bulldy80/gyp_unofficial,alexcrichton/gyp,yjhjstz/gyp,Omegaphora/external_chromium_org_tools_gyp,Jack-Q/GYP-copy,mistydemeo/gyp,cysp/gyp,azunite/gyp,luvit/gyp,mgamer/gyp,LazyCodingCat/gyp,pandaxcl/gyp,android-ia/platform_external_chromium_org_tools_gyp,Phuehvk/gyp,Danath/gyp,sport-monkey/GYP,AOSPU/external_chromium_org_tools_gyp,sport-monkey/GYP,clar/gyp,trafi/gyp,turbulenz/gyp,trafi/gyp,tarc/gyp,Jack-Q/GYP-copy,sdklite/gyp,dougbeal/gyp,sport-monkey/GYP,AOSPU/external_chromium_org_tools_gyp,saghul/gyn,sport-monkey/GYP,mgamer/gyp,msc-/gyp,pyokagan/gyp,svn2github/gyp,LazyCodingCat/gyp,carlTLR/gyp,clar/gyp,Jack-Q/GYP-copy,Omegaphora/external_chromium_org_tools_gyp,amoikevin/gyp,cysp/gyp,AWhetter/gyp,omasanori/gyp,springmeyer/gyp,adblockplus/gyp,sdklite/gyp,amoikevin/gyp,bnq4ever/gypgoogle,xin3liang/platform_external_chromium_org_tools_gyp,Chilledheart/gyp,xin3liang/platform_external_chromium_org_tools_gyp,bpsinc-native/src_tools_gyp,springmeyer/gyp,Phuehvk/gyp,dougbeal/gyp,bnoordhuis/gyp,msc-/gyp,tarc/gyp,tarc/gyp,enkripsi/gyp,turbulenz/gyp,ttyangf/gyp,bnoordhuis/gyp,Omegaphora/external_chromium_org_tools_gyp,svn2github/kgyp,yjhjstz/gyp,clar/gyp,yjhjstz/gyp,pyokagan/gyp,svn2github/gyp,ttyangf/gyp,bpsinc-native/src_tools_gyp,pandaxcl/gyp,erikge/watch_gyp,sdklite/gyp,AWhetter/gyp,turbulenz/gyp,openpeer/webrtc-gyp,cysp/gyp,ttyangf/gyp,duanhjlt/gyp,tarc/gyp,chromium/gyp,AWhetter/gyp,carlTLR/gyp,tarc/gyp,Chilledheart/gyp,azunite/gyp_20150930,svn2github/gyp,saghul/gyn,mgamer/gyp,clar/gyp