+2007-08-15 Timothy Hatcher <timothy@apple.com>
+
+ Look for the new Xcode 3 preference key (PBXApplicationwideBuildSettings) for the global build locations.
+ The value of PBXApplicationwideBuildSettings is a dictionary, so we have to pull the SYMROOT out of it.
+
+ Also pass xcodebuild OBJROOT with the same value as SYMROOT if we fallback to the default WebKitBuild,
+ this prevents making "build" directories in each project folder.
+
+ * Scripts/webkitdirs.pm:
+
2007-08-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Kevin Mccullough.
return if defined $baseProductDir;
determineSourceDir();
if (isOSX()) {
- open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
- $baseProductDir = <PRODUCT>;
+ open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> /dev/null |" or die;
+ $baseProductDir = join '', <PRODUCT>;
close PRODUCT;
- if ($baseProductDir) {
- chomp $baseProductDir;
- undef $baseProductDir unless $baseProductDir =~ /^\//;
+
+ $baseProductDir = $1 if $baseProductDir =~ /SYMROOT\s*=\s*\"(.*?)\";/s;
+ undef $baseProductDir unless $baseProductDir =~ /^\//;
+
+ if (!defined($baseProductDir)) {
+ open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
+ $baseProductDir = <PRODUCT>;
+ close PRODUCT;
+ if ($baseProductDir) {
+ chomp $baseProductDir;
+ undef $baseProductDir unless $baseProductDir =~ /^\//;
+ }
}
} else {
$baseProductDir = $ENV{"WEBKITOUTPUTDIR"};
if (!defined($baseProductDir)) {
$baseProductDir = "$sourceDir/WebKitBuild";
- @baseProductDirOption = ("SYMROOT=$baseProductDir") if (isOSX());
+ @baseProductDirOption = ("SYMROOT=$baseProductDir", "OBJROOT=$baseProductDir") if (isOSX());
if (isCygwin()) {
my $dosBuildPath = `cygpath --windows \"$baseProductDir\"`;
chomp $dosBuildPath;