Index: base/base_paths_mac.mm |
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm |
index a9cd471b7516b145163fa530f396c3b33b909a2b..a0c82b6983efe5cb19d14070a27f548edec93983 100644 |
--- a/base/base_paths_mac.mm |
+++ b/base/base_paths_mac.mm |
@@ -18,6 +18,10 @@ |
namespace { |
+// The name of this file relative to the source root. This is used for checking |
+// that the source checkout is in the correct place. |
+static const char kThisSourceFile[] = "base/base_paths_mac.mm"; |
+ |
bool GetNSExecutablePath(FilePath* path) WARN_UNUSED_RESULT; |
bool GetNSExecutablePath(FilePath* path) { |
@@ -82,6 +86,11 @@ bool PathProviderMac(int key, FilePath* result) { |
// Unit tests execute two levels deep from the source root, eg: |
// src/xcodebuild/{Debug|Release}/base_unittests |
*result = result->DirName().DirName(); |
+ // In a case of a WebKit-only checkout, using make instead of |
+ // xcodebuild, we should return <root of |
+ // checkout>/Source/WebKit/chromium. |
+ if (!file_util::PathExists(result->Append(kThisSourceFile))) |
+ *result = result->Append("Source/WebKit/chromium"); |
Nico
2011/11/17 14:54:11
Do you know why this is necessary? Does the make b
|
} |
return true; |
} |