Use xcrun instead of DEVELOPER_BIN_DIR to deal with tools that keep
moving around.

R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1775 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py
index a532cc3..331e78b 100644
--- a/pylib/gyp/generator/xcode.py
+++ b/pylib/gyp/generator/xcode.py
@@ -1032,7 +1032,7 @@
 if [ "${JOB_COUNT}" -gt 4 ]; then
   JOB_COUNT=4
 fi
-exec "${DEVELOPER_BIN_DIR}/make" -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}"
+exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}"
 exit 1
 """ % makefile_name
         ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
diff --git a/pylib/gyp/mac_tool.py b/pylib/gyp/mac_tool.py
index 239e7f6..ae4a587 100755
--- a/pylib/gyp/mac_tool.py
+++ b/pylib/gyp/mac_tool.py
@@ -60,10 +60,8 @@
 
   def _CopyXIBFile(self, source, dest):
     """Compiles a XIB file with ibtool into a binary plist in the bundle."""
-    tools_dir = os.environ.get('DEVELOPER_BIN_DIR', '/usr/bin')
-    args = [os.path.join(tools_dir, 'ibtool'), '--errors', '--warnings',
-        '--notices', '--output-format', 'human-readable-text', '--compile',
-        dest, source]
+    args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
+        '--output-format', 'human-readable-text', '--compile', dest, source]
     ibtool_section_re = re.compile(r'/\*.*\*/')
     ibtool_re = re.compile(r'.*note:.*is clipping its content')
     ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)