https://bugs.webkit.org/show_bug.cgi?id=107863
Patch by David Farler <dfarler@apple.com> on 2013-01-26
Reviewed by David Kilzer.
* Makefile:
Removed references to legacy Xcode configurations.
* Makefile.shared:
Added default ARCHS + SDK settings and parameterized xcodebuild calls.
* Source/Makefile:
iOS does not build WebKit2.
Tools: Makefiles should work for arbitrary SDKs and architectures on Apple ports
https://bugs.webkit.org/show_bug.cgi?id=107863
Patch by David Farler <dfarler@apple.com> on 2013-01-26
Reviewed by David Kilzer.
* Makefile:
Added temporary filters for projects not yet building on iOS.
* DumpRenderTree/Makefile:
Building with iOS SDKs -> -target All-iOS
* Scripts/webkitdirs.pm:
(determineConfiguration):
Added --configuration switch detection.
(determineArchitecture):
Added --architecture and ARCH=(.*) switch detection.
(argumentsForConfiguration):
(determineXcodeSDK):
Look for --device, --simulator, and --sdk switches.
(xcodeSDK):
Added.
(XcodeOptions):
Determine Xcode SDK and generate -arch switches.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140912
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-01-26 David Farler <dfarler@apple.com>
+
+ Allow building with arbitrary SDK and ARCHS with make + Xcode
+ https://bugs.webkit.org/show_bug.cgi?id=107863
+
+ Reviewed by David Kilzer.
+
+ * Makefile:
+ Removed references to legacy Xcode configurations.
+ * Makefile.shared:
+ Added default ARCHS + SDK settings and parameterized xcodebuild calls.
+ * Source/Makefile:
+ iOS does not build WebKit2.
+
2013-01-25 Jussi Kukkonen <jussi.kukkonen@intel.com>
[CMake][EFL] Build ThirdParty/leveldb when IndexedDB is enabled
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-debug d development dev develop:
+debug d:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-release r deployment dep deploy:
+release r:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
SCRIPTS_PATH ?= ../Tools/Scripts
-XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()'` $(ARGS)
+SDK = /
+
+ifneq (,$(findstring iphoneos,$(SDK)))
+ ARCHS = armv7
+else ifneq (,$(findstring iphonesimulator,$(SDK)))
+ ARCHS = i386
+else ifneq (,$(findstring macosx,$(SDK)))
+ ARCHS = x86_64
+else
+ ARCHS = x86_64
+endif
+
+ARCH_FLAGS=$(addprefix --arch ,$(ARCHS))
DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default")
VERBOSITY ?= $(DEFAULT_VERBOSITY)
endif
endif
+define xcode-options
+ $(shell perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()' -- --sdk $(SDK) $1 $(ARCH_FLAGS) $(ARGS))
+endef
+
all:
- ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
+ xcodebuild $(OTHER_OPTIONS) $(call xcode-options,) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]}
-debug d development dev develop: force
+debug d: force
$(SCRIPTS_PATH)/set-webkit-configuration --debug
- ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
+ xcodebuild $(OTHER_OPTIONS) $(call xcode-options, --configuration Debug) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]}
-release r deployment dep deploy: force
+release r: force
$(SCRIPTS_PATH)/set-webkit-configuration --release
- ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
+ xcodebuild $(OTHER_OPTIONS) $(call xcode-options, --configuration Release) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]}
clean:
- ( xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
+ xcodebuild $(OTHER_OPTIONS) -alltargets clean $(call xcode-options,) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]}
force: ;
MODULES = WTF JavaScriptCore ThirdParty/ANGLE WebCore WebKit WebKit2
+IOS_DONT_BUILD = WebKit2
+
+ifneq (,$(findstring iphoneos,$(SDK)))
+ MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES))
+else ifneq (,$(findstring iphonesimulator,$(SDK)))
+ MODULES = $(subst $(IOS_DONT_BUILD),$(MODULES))
+endif
+
all:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-debug d development dev develop:
+debug d:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-release r deployment dep deploy:
+release r:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+2013-01-26 David Farler <dfarler@apple.com>
+
+ Makefiles should work for arbitrary SDKs and architectures on Apple ports
+ https://bugs.webkit.org/show_bug.cgi?id=107863
+
+ Reviewed by David Kilzer.
+
+ * Makefile:
+ Added temporary filters for projects not yet building on iOS.
+ * DumpRenderTree/Makefile:
+ Building with iOS SDKs -> -target All-iOS
+ * Scripts/webkitdirs.pm:
+ (determineConfiguration):
+ Added --configuration switch detection.
+ (determineArchitecture):
+ Added --architecture and ARCH=(.*) switch detection.
+ (argumentsForConfiguration):
+ (determineXcodeSDK):
+ Look for --device, --simulator, and --sdk switches.
+ (xcodeSDK):
+ Added.
+ (XcodeOptions):
+ Determine Xcode SDK and generate -arch switches.
+
2013-01-25 Jochen Eisinger <jochen@chromium.org>
[chromium] move tracking of the top loading frame to TestRunner library
SCRIPTS_PATH = ../Scripts
+
+ifneq (,$(findstring iphoneos,$(SDK)))
+ OTHER_OPTIONS += -target All-iOS
+else ifneq (,$(findstring iphonesimulator,$(SDK)))
+ OTHER_OPTIONS += -target All-iOS
+endif
+
include ../../Makefile.shared
MODULES = DumpRenderTree WebKitTestRunner MiniBrowser ../Source/ThirdParty/gtest/xcode TestWebKitAPI
+IOS_DONT_BUILD = WebKitTestRunner MiniBrowser TestWebKitAPI
+IPHONEOS_DONT_BUILD = DumpRenderTree
+
+ifneq (,$(findstring iphoneos,$(SDK)))
+ MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES))
+ MODULES = $(filter-out $(IPHONEOS_DONT_BUILD),$(MODULES))
+else ifneq (,$(findstring iphonesimulator,$(SDK)))
+ MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES))
+endif
+
all:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-debug d development dev develop:
+debug d:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-release r deployment dep deploy:
+release r:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
my $baseProductDir;
my @baseProductDirOption;
my $configuration;
+my $xcodeSDK;
+my $xcodeSDKVersion;
my $configurationForVisualStudio;
my $configurationProductDir;
my $sourceDir;
sub determineConfiguration
{
return if defined $configuration;
+
+ # Look for explicit setting first
+ for (my $i = 0; $i <= $#ARGV; $i++) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--config(uration)$/) {
+ splice(@ARGV, $i, 1);
+ $configuration = splice(@ARGV, $i, 1);
+ return;
+ }
+ }
+
determineBaseProductDir();
if (open CONFIGURATION, "$baseProductDir/Configuration") {
$configuration = <CONFIGURATION>;
determineBaseProductDir();
+ # Look for explicit setting first
+ my @explicitArchs;
+ for (my $i = 0; $i <= $#ARGV; $i++) {
+ my $opt = $ARGV[$i];
+
+ if ($opt =~ /^--arch(itecture)?$/) {
+ splice(@ARGV, $i, 1);
+ push @explicitArchs, splice(@ARGV, $i--, 1);
+ } elsif ($opt =~ /^ARCHS=(.*)$/) {
+ push @explicitArchs, split(/\w/, $1);
+ splice(@ARGV, $i--, 1);
+ }
+ }
+
+ # Make explicit arch settings forgiving – remove duplicate settings
+ # and allow for specifying architectures with both --arch and appending
+ # Xcode-style ARCHS=(.*)
+ @explicitArchs = sort keys %{{ map { $_ => 1 } @explicitArchs }};
+
+ if (scalar(@explicitArchs)) {
+ $architecture = join(' ', @explicitArchs) if @explicitArchs;
+ return;
+ }
+
if (isGtk()) {
determineConfigurationProductDir();
my $host_triple = `grep -E '^host = ' $configurationProductDir/GNUmakefile`;
push(@args, '--debug') if $configuration eq "Debug";
push(@args, '--release') if $configuration eq "Release";
push(@args, '--32-bit') if $architecture ne "x86_64";
+ push(@args, '--sdk', $xcodeSDK) if defined $xcodeSDK;
push(@args, '--qt') if isQt();
push(@args, '--gtk') if isGtk();
push(@args, '--efl') if isEfl();
return @args;
}
+sub determineXcodeSDK
+{
+ return if defined $xcodeSDK;
+ for (my $i = 0; $i <= $#ARGV; $i++) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--sdk$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = splice(@ARGV, $i, 1);
+ } elsif ($opt =~ /^--device$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphoneos.internal';
+ } elsif ($opt =~ /^--sim(ulator)?/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphonesimulator';
+ }
+ }
+ $xcodeSDK ||= '/';
+
+ chomp $xcodeSDK;
+}
+
+sub xcodeSDK
+{
+ determineXcodeSDK();
+ return $xcodeSDK;
+}
+
sub determineConfigurationForVisualStudio
{
return if defined $configurationForVisualStudio;
determineBaseProductDir();
determineConfiguration();
determineArchitecture();
- return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode());
+ determineXcodeSDK();
+ my @archFlags = map { ('-arch', $_) } split(/ /, $architecture);
+ return (@baseProductDirOption, "-configuration", $configuration, "-sdk", $xcodeSDK, @archFlags, argumentsForXcode());
}
sub XcodeOptionString